Skip to content
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

darwin bundlers do not work #7

Open
colin-arnott-xero opened this issue Oct 7, 2022 · 1 comment
Open

darwin bundlers do not work #7

colin-arnott-xero opened this issue Oct 7, 2022 · 1 comment

Comments

@colin-arnott-xero
Copy link

colin-arnott-xero commented Oct 7, 2022

x86_64-darwin and aarch64-darwin are listed as "supportedSystems", but the following error is returned:

supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];

$ nix bundle --bundler github:NixOS/bundlers nixpkgs#hello
error: Package ‘nix-user-chroot-2c52b5f’ in /nix/store/1rc10ydlf4c2aphrg2z2dxaaikbggba0-source/default.nix:49 is not supported on ‘x86_64-darwin’, refusing to evaluate.

       a) For `nixos-rebuild` you can set
         { nixpkgs.config.allowUnsupportedSystem = true; }
       in configuration.nix to override this.

       b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowUnsupportedSystem = true; }
       to ~/.config/nixpkgs/config.nix.
(use '--show-trace' to show detailed location information)

reading the upstream documentation for the tool this was based upon, it seems this is expected, just not documented here?

similarly, toDockerImage succeeds, but packs a mach-o binary into into a docker image: (nixpkgs#pkgsCross.musl64.hello works as expected)

$ nix bundle --bundler github:NixOS/bundlers#toDockerImage nixpkgs#hello --verbose
$ docker load < hello-2.12.1.tar.gz
78fcfc116447: Loading layer [==================================================>]  655.4kB/655.4kB
0d5cb48ad5d9: Loading layer [==================================================>]  1.085MB/1.085MB
88746dbbf806: Loading layer [==================================================>]  112.6kB/112.6kB
37ac77f97851: Loading layer [==================================================>]   2.14MB/2.14MB
c186ef70529c: Loading layer [==================================================>]  19.51MB/19.51MB
7b033f88ff6d: Loading layer [==================================================>]  4.833MB/4.833MB
881c3383a4c5: Loading layer [==================================================>]  1.208MB/1.208MB
770296159cae: Loading layer [==================================================>]  1.884MB/1.884MB
f40b9120a89c: Loading layer [==================================================>]  1.976MB/1.976MB
dee763386703: Loading layer [==================================================>]  153.6kB/153.6kB
a75b5721a144: Loading layer [==================================================>]  1.741MB/1.741MB
b6c1c599d6d2: Loading layer [==================================================>]  245.8kB/245.8kB
962272f441a3: Loading layer [==================================================>]  184.3kB/184.3kB
a2136da04750: Loading layer [==================================================>]  1.106MB/1.106MB
bad5e5760d0b: Loading layer [==================================================>]   42.4MB/42.4MB
384935350f01: Loading layer [==================================================>]  614.4kB/614.4kB
585453de14b2: Loading layer [==================================================>]  1.372MB/1.372MB
cf30a0d06dfa: Loading layer [==================================================>]  3.666MB/3.666MB
065694f29ee1: Loading layer [==================================================>]  81.92kB/81.92kB
1ab22814d143: Loading layer [==================================================>]  10.24kB/10.24kB
Loaded image: hello-2.12.1:latest
$ docker run hello-2.12.1:latest hello
exec /bin/hello: exec format error

this will be made moot if #2 is fixed.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-bundle-on-darwin/24481/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants