-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nix terminates with uncaught exception of type nix::SysError: error: getting status of /etc/ssl/certs/ca-certificates.crt
on Darwin with sandbox enabled
#8485
Comments
Yup, I'm seeing this issue too. I have the sandbox enabled and also auto-optimise-store (as in #7273). I also tried adding |
Still getting this with Nix 2.15.1, fwiw, since that version apparently made it into |
P.S. @al3xtjames I suspect you might need an extra closing paren in the string written by |
Is it possible this is the same issue that was fixed by @thufschmitt in #8240? If so, I think it's in Nix 2.16, which hasn't hit |
@al3xtjames Fwiw, I seem to have worked around this issue locally by disabling |
I am seeing this issue on Nix 2.16.1, so that PR does not fix this. |
@amarshall Huh, it's certainly hard to trigger consistently, so I'm not too surprised. |
FWIW, while Nix on the host is 2.16.1, the Nix in the drv itself is 2.15.1. However, I can’t figure out where the source for this drv is… Here’s the {
"/nix/store/3d23aqkp753x9wm1a2k8bk98rrzmqgs7-options-db.xml.drv": {
"args": [
"-e",
"/nix/store/6xg259477c90a229xwmb53pdfkn6ig3g-default-builder.sh"
],
"builder": "/nix/store/y0sbqh18cqlha5inki7aj6bcncx3fy85-bash-5.2-p15/bin/bash",
"env": {
"__darwinAllowLocalNetworking": "",
"__impureHostDeps": "/bin/sh /usr/lib/libSystem.B.dylib /usr/lib/system/libunc.dylib /dev/zero /dev/random /dev/urandom /bin/sh",
"__propagatedImpureHostDeps": "",
"__propagatedSandboxProfile": "",
"__sandboxProfile": "",
"__structuredAttrs": "",
"buildCommand": "# Make sure we don't try to access paths outside the sandbox.\n# This should be redundant with --store dummy:// if not for Nix bugs...\nexport NIX_STORE_DIR=$TMPDIR/store\nexport NIX_STATE_DIR=$TMPDIR/state\nnix-instantiate \\\n --store dummy:// \\\n --eval --xml --strict \\\n --expr '{file}: builtins.fromJSON (builtins.readFile file)' \\\n --argstr file /nix/store/166miqzhkia3h3cv3c70lvlm66mlfk51-options.json \\\n > options.xml\n\nmkdir -p $out/nmd-result\n\nxsltproc \\\n --stringparam elementId 'home-manager-options' \\\n --stringparam optionIdPrefix 'opt' \\\n --nonet \\\n -o $out/nmd-result/home-manager-options.xml \\\n /nix/store/41vh9fr1znwk5vjjprk046s6g4f3jc2m-options-to-docbook.xsl options.xml\n",
"buildInputs": "",
"builder": "/nix/store/y0sbqh18cqlha5inki7aj6bcncx3fy85-bash-5.2-p15/bin/bash",
"cmakeFlags": "",
"configureFlags": "",
"depsBuildBuild": "",
"depsBuildBuildPropagated": "",
"depsBuildTarget": "",
"depsBuildTargetPropagated": "",
"depsHostHost": "",
"depsHostHostPropagated": "",
"depsTargetTarget": "",
"depsTargetTargetPropagated": "",
"doCheck": "",
"doInstallCheck": "",
"enableParallelBuilding": "1",
"enableParallelChecking": "1",
"enableParallelInstalling": "1",
"mesonFlags": "",
"name": "options-db.xml",
"nativeBuildInputs": "/nix/store/07ml5pxrzbch3ihlmdyhgfcs0dpib10w-nix-2.15.1-dev /nix/store/pndc3wg6idzzlqipgxmpd0zql2fd2d2k-libxslt-1.1.37-bin",
"out": "/nix/store/5fhcafdkhqwclqgm23vjfnrwrh6vjjr9-options-db.xml",
"outputs": "out",
"passAsFile": "buildCommand",
"patches": "",
"propagatedBuildInputs": "",
"propagatedNativeBuildInputs": "",
"stdenv": "/nix/store/fdwwz5dah6ik07psv3jz1agb2i2aic5z-stdenv-darwin",
"strictDeps": "",
"system": "x86_64-darwin"
},
"inputDrvs": {
"/nix/store/4irgdm88jilqxhdflnx99mhk6zp94hci-options.json.drv": [
"out"
],
"/nix/store/7n4pcnh87whkmsid8zasr6r9kwydph7v-stdenv-darwin.drv": [
"out"
],
"/nix/store/bzr49ah58krc9zy6lagqdga6ijwdqm91-libxslt-1.1.37.drv": [
"bin"
],
"/nix/store/daiw8gs04p2sj0caifpj8699bdkc8pfr-nix-2.15.1.drv": [
"dev"
],
"/nix/store/vzcl2b1fib9628ldmgj7v1q6ggagpn7d-bash-5.2-p15.drv": [
"out"
]
},
"inputSrcs": [
"/nix/store/41vh9fr1znwk5vjjprk046s6g4f3jc2m-options-to-docbook.xsl",
"/nix/store/6xg259477c90a229xwmb53pdfkn6ig3g-default-builder.sh"
],
"name": "options-db.xml",
"outputs": {
"out": {
"path": "/nix/store/5fhcafdkhqwclqgm23vjfnrwrh6vjjr9-options-db.xml"
}
},
"system": "x86_64-darwin"
}
} |
Okay, it’s in nmd, included from Home Manager. It looks like nmd is quite out-of-date compared with what is in nixpkgs, even though it purports to be a standalone extraction of it. |
Yeah, there's a somewhat related issue in |
I install all of my packages using |
This works for me with |
Okay, it is just this :) I wrote this PR off because of the title and missed the additional commits that are clearly related until I searched the git log myself. Opened a backport for 2.15: #8535 |
Thanks for investigating this! I was able to run final: prev: {
nix = prev.nix.overrideAttrs (old: {
patches = (old.patches or []) ++ [
(final.fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/NixOS/nix/pull/8535.patch";
hash = "sha256-CTbwtlB/veZWP+xqYSSZeUJiAUhIn3r6QJgZwRx4QRM=";
})
];
});
} Using Nix 2.16 also worked: final: prev: {
nix = final.nixVersions.nix_2_16;
} |
Disable home-manager manual because it fails to build again, see NixOS/nix#8485
I believe this is fixed and can be closed. |
Describe the bug
After running into #7273 while running
darwin-rebuild
from nix-darwin, I tried deleting/nix/store/.links
and rebuilding.darwin-rebuild
then failed with the following error:Steps To Reproduce
nix.settings.sandbox = true
in my flake, which setssandbox = true
in /etc/nix/nix.conf).sudo rm -rf /nix/store/.links
darwin-rebuild --flake .#
I'm not sure how to easily reproduce this since I only saw it after encountering #7273.
Expected behavior
darwin-rebuild
should have succeeded.nix-env --version
outputAdditional context
I see that Nix adds the cert bundle to the chroot on Linux here:
nix/src/libstore/build/local-derivation-goal.cc
Lines 1780 to 1781 in bf7dc3c
On Darwin, should Nix add it to the sandbox profile? Maybe like this (untested):
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: