{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/10853","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/10853/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/10853/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/10853/events","html_url":"https://github.com/NixOS/nixpkgs/issues/10853","id":115623797,"number":10853,"title":"nix-push fails on Darwin when build-use-chroot = true","user":{"login":"dhess","id":2438,"avatar_url":"https://avatars.githubusercontent.com/u/2438?v=3","gravatar_id":"","url":"https://api.github.com/users/dhess","html_url":"https://github.com/dhess","followers_url":"https://api.github.com/users/dhess/followers","following_url":"https://api.github.com/users/dhess/following{/other_user}","gists_url":"https://api.github.com/users/dhess/gists{/gist_id}","starred_url":"https://api.github.com/users/dhess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhess/subscriptions","organizations_url":"https://api.github.com/users/dhess/orgs","repos_url":"https://api.github.com/users/dhess/repos","events_url":"https://api.github.com/users/dhess/events{/privacy}","received_events_url":"https://api.github.com/users/dhess/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20darwin","name":"6.topic: darwin","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-07T01:47:22Z","updated_at":"2016-04-21T18:18:07Z","closed_at":null,"body":"(I filed this bug on `nix` as well but I'm not getting any traction there. See https://github.com/NixOS/nix/issues/673. Anyway, it's not clear to me where this should be filed so I'll try here as well.)\r\n\r\nI use Nix on several OS X machines, all with an identical environment, so I've recently been building packages on one of them and then pushing the binary packages to my own binary cache, so that the other machines can simply download and install them directly. The relevant part of the script looks like this:\r\n\r\n`nix-push --dest ~/Documents/nix-binary-cache/ --link --url-prefix http://nix-binary-cache.drewhess.com/ $(nix-instantiate '<nixpkgs>' -A meta-env)`\r\n\r\n(`meta-env` is the collection of all the packages I use in my environment, so that I can rebuild them with a single `nix-env` command.)\r\n\r\nI've switched to the new Darwin pure stdenv and sandboxed builds. That all works great and I was able to rebuild my whole environment from scratch successfully. However, now the binary cache script fails on the `nix-push` step like so:\r\n\r\n```shell\r\nwarning: you did not specify ‘--add-root’; the result might be removed by the garbage collector\r\nwarning: you did not specify ‘--add-root’; the result might be removed by the garbage collector\r\nbuilding compressed archives...\r\n...\r\n  /nix/store/znd6apsyigf80vzyxg5651ip345fzxay-bash43-033\r\n  /nix/store/zsifjqz8x8r2w5wb7379d00hbqv5pzhh-nss-3.20.1.tar.gz\r\n  /nix/store/zzxwmlxqygvi1micr7715xfnw33l4y8q-Libc-997.90.3\r\nbuilding path(s) ‘/nix/store/c5q2ry5qmgb0wh000lz9vfrinf5ks6s4-nar’\r\ndyld: Library not loaded: /usr/lib/system/libcache.dylib\r\n  Referenced from: /nix/store/v81lhzyangi203cgbx1w82dxscmlgyqf-Libsystem-1197.1.1/lib/libSystem.dylib\r\n  Reason: no suitable image found.  Did find:\r\n\t/usr/lib/system/libcache.dylib: stat() failed with errno=1\r\nbuilder for ‘/nix/store/01rphiz5ppz5g38sivx24949013xd6dk-nar.drv’ failed due to signal 5 (Trace/BPT trap: 5)\r\nerror: build of ‘/nix/store/01rphiz5ppz5g38sivx24949013xd6dk-nar.drv’ failed\r\nnix-build failed: 25600 at /Users/dhess/.nix-profile/bin/nix-push line 168.\r\n```\r\n\r\nIf I remove `build-use-chroot = true` from my `nix.conf`, it appears to work but starts a full rebuild of `meta-env`, which is obviously not what I want.\r\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/213045735","html_url":"https://github.com/NixOS/nixpkgs/issues/10853#issuecomment-213045735","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/10853","id":213045735,"user":{"login":"copumpkin","id":2623,"avatar_url":"https://avatars.githubusercontent.com/u/2623?v=3","gravatar_id":"","url":"https://api.github.com/users/copumpkin","html_url":"https://github.com/copumpkin","followers_url":"https://api.github.com/users/copumpkin/followers","following_url":"https://api.github.com/users/copumpkin/following{/other_user}","gists_url":"https://api.github.com/users/copumpkin/gists{/gist_id}","starred_url":"https://api.github.com/users/copumpkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/copumpkin/subscriptions","organizations_url":"https://api.github.com/users/copumpkin/orgs","repos_url":"https://api.github.com/users/copumpkin/repos","events_url":"https://api.github.com/users/copumpkin/events{/privacy}","received_events_url":"https://api.github.com/users/copumpkin/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T18:18:07Z","updated_at":"2016-04-21T18:18:07Z","body":"@dhess is there an issue filed for that? I fixed a bug in the stdenv a few days ago and it seemed to work fine after I fixed it. I haven't had much time for nixing recently so I'm not actively monitoring whether something passes or fails, but if someone highlights me in a bug that breaks the entire platform, I'll generally make some time to look into it."}}