!pbdtvoHxUGLhcEvnlu:nixos.org

Exotic Nix Targets

326 Members
101 Servers

Load older messages


SenderMessageTime
31 Aug 2023
@penguincoder:matrix.wolfie.pw@penguincoder:matrix.wolfie.pw(I'm pretty new to the community, as well)18:27:12
@Ericson2314:matrix.orgJohn Ericson penguincoder: if the PR is merged, the binaries will be available from cache.nixos.org 19:56:33
1 Sep 2023
@rhelmot:matrix.orgrhelmotwhat derivation usually provides /bin/sh on nixos?03:26:56
@rhelmot:matrix.orgrhelmotI do not have a nix system to query myself03:27:16
@tomberek:matrix.orgtomberekbash-interactive03:28:05
@rhelmot:matrix.orgrhelmotokay, lemme poke around03:28:24
@rhelmot:matrix.orgrhelmotty03:28:24
@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.orgtrofi

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.orgtrofi you asked where /bin/sh comes from on NixOS. That is the easy way to inspect. 06:43:57
@trofi:matrix.orgtrofi 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.orgtrofi

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.wtfash (it/its) 🏳️‍⚧️ 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.orgtrofi 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

Show newer messages


Back to Room ListRoom Version: 6