| 31 Aug 2023 |
@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 |
ash (it/its) 🏳️⚧️ | why is pkgsCross so inconsistently named? | 21:51:14 |
| 3 Sep 2023 |
@rick:matrix.ciphernetics.nl | It's theoretically meant as a set of examples | 07:05:36 |
trofi | Would be nice to clean it up and all at least all nixpkgs targets as is (instead of examples that sometimes match and sometimes don't). | 07:48:19 |
@rick:matrix.ciphernetics.nl | There were also voices that said they wanted to get rid of it | 11:18:48 |
raitobezarius | I still think getting rid of it is faster | 11:28:17 |
artemis | pkgsCross is like the only reason i use nix haha | 11:40:58 |
raitobezarius | Well, the good news is you will still be able to use it :) | 11:41:43 |
artemis | what does getting rid of it entail then, moving it out of the nixpkgs tree? | 11:42:03 |
raitobezarius | No | 12:08:59 |
raitobezarius | pkgsCross is just convenience for | 12:09:08 |
raitobezarius | nix-build -A something --argstr crossSystem "a system config" | 12:09:35 |
raitobezarius | It is an arbitrary limitation of the full power of the cross compilation infra | 12:09:55 |
raitobezarius | And is useful to refer to cross compiled package internally to nixpkgs via the available examples | 12:10:16 |