!pbdtvoHxUGLhcEvnlu:nixos.org

Exotic Nix Targets

319 Members
96 Servers

Load older messages


SenderMessageTime
1 Sep 2023
@rhelmot:matrix.orgrhelmotis there a way to check whether I've got a fully bootstrapped stdenv? I think I've just done it.03:58:00
@rhelmot:matrix.orgrhelmot
[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:matrix.org@trofi:matrix.org

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
@opna2608:matrix.orgPuna joined the room.16:53:21
2 Sep 2023
@rhelmot:matrix.orgrhelmotcan 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 natively03:49:47
@rhelmot:matrix.orgrhelmotand like have the environment be properly bootstrapped and stuff03:50:02
@rhelmot:matrix.orgrhelmotmy 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:matrix.org@trofi:matrix.org you asked where /bin/sh comes from on NixOS. That is the easy way to inspect. 06:43:57
@trofi:matrix.org@trofi:matrix.org 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:matrix.org@trofi:matrix.org

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
@kity:kity.wtfproblems why is pkgsCross so inconsistently named? 21:51:14
3 Sep 2023
@rick:matrix.ciphernetics.nl@rick:matrix.ciphernetics.nlIt's theoretically meant as a set of examples 07:05:36
@trofi:matrix.org@trofi:matrix.org 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@rick:matrix.ciphernetics.nlThere were also voices that said they wanted to get rid of it11:18:48
@raitobezarius:matrix.orgraitobezariusI still think getting rid of it is faster11:28:17
@artemis:arty.chatartemispkgsCross is like the only reason i use nix haha11:40:58
@raitobezarius:matrix.orgraitobezariusWell, the good news is you will still be able to use it :)11:41:43
@artemis:arty.chatartemiswhat does getting rid of it entail then, moving it out of the nixpkgs tree?11:42:03
@raitobezarius:matrix.orgraitobezariusNo12:08:59
@raitobezarius:matrix.orgraitobezariuspkgsCross is just convenience for12:09:08
@raitobezarius:matrix.orgraitobezariusnix-build -A something --argstr crossSystem "a system config"12:09:35
@raitobezarius:matrix.orgraitobezariusIt is an arbitrary limitation of the full power of the cross compilation infra12:09:55
@raitobezarius:matrix.orgraitobezariusAnd is useful to refer to cross compiled package internally to nixpkgs via the available examples12:10:16
@kity:kity.wtfproblemsalright i'm back on the case17:02:06
@kity:kity.wtfproblemsgetting firefox to build for ppc64le-musl17:02:19
@kity:kity.wtfproblemswith obnoxiously cryptic errors17:02:36
@kity:kity.wtfproblemsdoes anyone want to try their hand? i pushed my nixpkgs changes to github: https://github.com/ashkitten/nixpkgs/tree/fix-firefox-ppc64le-musl17:06:56
@kity:kity.wtfproblems nix build github:ashkitten/nixpkgs/fix-firefox-ppc64le-musl#pkgsCross.musl-power.firefox 17:07:38
@kity:kity.wtfproblemshere's my build log: https://gist.github.com/ashkitten/5bfa92664c80e5e4082eca94f5dbfdfd17:08:19
@kity:kity.wtfproblemsit truly beats me why exit status 0 is an error here...17:10:52

Show newer messages


Back to Room ListRoom Version: 6