| 31 Aug 2023 |
Alyssa Ross | right now BSD only really works if you cross-compile to it from Linux | 18:13:12 |
rhelmot | so you copy an entire nix store from linux to bsd and some of the binaries in it are bsd elves? | 18:14:29 |
Alyssa Ross | well a more sensible thing to do would be to nix-copy-closure just the stuff you build for BSD | 18:16:02 |
rhelmot | woah | 18:16:10 |
rhelmot | sorry, I'm very new to nix, so I'm not familar with the tools | 18:16:24 |
Alyssa Ross | pretty sure it doesn't need Nix on the other end | 18:16:26 |
John Ericson | You can copy to a fresh local store (in non standard location) on the Linux side and then just copy that directly over to BSD | 18:21:18 |
John Ericson | * You can also copy to a fresh local store (in non standard location) on the Linux side and then just copy that directly over to BSD | 18:21:44 |
@penguincoder:matrix.wolfie.pw | so with the change to CI, will the binaries be built and pushed to the binary cache? could I then download those on my machine? | 18:27:02 |
@penguincoder:matrix.wolfie.pw | (I'm pretty new to the community, as well) | 18:27:12 |
John Ericson | penguincoder: if the PR is merged, the binaries will be available from cache.nixos.org | 19:56:33 |
| 1 Sep 2023 |
rhelmot | what derivation usually provides /bin/sh on nixos? | 03:26:56 |
rhelmot | I do not have a nix system to query myself | 03:27:16 |
tomberek | bash-interactive | 03:28:05 |
rhelmot | okay, lemme poke around | 03:28:24 |
rhelmot | ty | 03:28:24 |
rhelmot | is there a way to check whether I've got a fully bootstrapped stdenv? I think I've just done it. | 03:58:00 |
rhelmot | [nix-shell:~]$ ldd $(which cat)
/nix/store/x57ywg678k81cx6v99zvapnjffsl4fsv-coreutils-9.3/bin/cat:
libintl.so.8 => /nix/store/r6sxrxdlq9pxyyfzqr5xrzqxfsg0av8q-gettext-0.21.1/lib/libintl.so.8 (0x2e3df42ee000)
libc.so.7 => /nix/store/2fpdxqwr59c3qgxzhzl78sf2nbymv65q-world-patched-lib/lib/libc.so.7 (0x2e3df30ca000)
[vdso] (0x2e3df2950000)
| 03:59:16 |
trofi | ldd is treacherous as it uses interpreter embedded into ldd script. lddtree or readelf might be more direct.
I strongly suggest running NixOS in qemu :) It's very easy out of nixpkgs directly:
$ nix run --impure --expr 'with import <nixpkgs> {}; (pkgs.nixos [ ({...}: {users.extraUsers.root.password = "";})]).config.system.build.vm'
User: root; password: <empty>
| 06:47:05 |
| Puna joined the room. | 16:53:21 |
| 2 Sep 2023 |
rhelmot | can you elaborate on what the point of running NixOS in qemu would be? My goal for now is to just be able to build binaries for my freebsd system natively | 03:49:47 |
rhelmot | and like have the environment be properly bootstrapped and stuff | 03:50:02 |
rhelmot | my question was more of the form of "is there a better way to verify self-sufficiency than manually deleting the bootstrap tools from the store and seeing if it needs to rebuild" | 05:00:26 |
trofi | you asked where /bin/sh comes from on NixOS. That is the easy way to inspect. | 06:43:57 |
trofi | Otherwise if you want to make sure bootstrapTools are not used anywhere it's a bit harder question. You can assert that there are no bootstraoTools references in the stdenv, like : disallowedRequisites = [ bootstrapTools.out ]; https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/linux/default.nix#L631C7-L631C53 | 06:46:18 |
trofi | Generally it's not so easy to make sure that your stdenv does not copy sneakily bits of files from bootstrapTools. I usually abuse strings to search for a GCC string:
$ find $(nix build nixpkgs#stdenv; nix path-info -r ./result) -type f -exec strings '{}' + | fgrep 'GCC: (GNU)' | sort -u
AGCC: (GNU) 12.3.0
GCC: (GNU) 12.3.0
Does not look too bad. No 8.3.0 references from bootstrapTools.
| 06:52:55 |