| 13 Oct 2021 |
Janne Heß | a full system configuration | 15:42:21 |
Janne Heß | It's about a PR that changes top-level.nix 👀 | 15:42:59 |
sterni | Janne Heß: have you tried (pkgsCross.<platform>.nixos /path/to/configuration.nix).build? | 15:43:46 |
sterni | ah it's not called build isn't it | 15:44:50 |
sterni | * ah it's not called build is it | 15:44:55 |
sterni | * Janne Heß: have you tried (pkgsCross.<platform>.nixos /path/to/configuration.nix).toplevel? | 15:45:07 |
Janne Heß | config.system.build.toplevel probably | 15:45:13 |
sterni | yeah | 15:45:17 |
sterni | you probably need a quite minimal configuration to try | 15:45:52 |
sterni | mine fails instantly because we can't cross compile perl :) | 15:46:01 |
Janne Heß | oh we can't cross-compile perl? | 15:46:16 |
sterni | oh hm we can | 15:46:46 |
sterni | ah we can't compile it statically? iirc | 15:46:57 |
sterni | seems like git can't be cross compiled with perlSupport rather | 15:47:38 |
sterni | so no gitFull for me | 15:47:59 |
Janne Heß | Thanks, your hints worked \o/ So the trick is to use
((import <nixpkgs> {}).pkgsCross.aarch64-multiplatform.nixos /tmp/lal.nix ).config.system.build.toplevel
and then the minimal configuration:
{ boot.loader.grub.enable = false; fileSystems."/".device = "tmpfs"; }
| 15:49:32 |
Janne Heß | * Thanks, your hints worked \o/ So the trick is to use
((import <nixpkgs> {}).pkgsCross.aarch64-multiplatform.nixos /tmp/lal.nix).config.system.build.toplevel
and then the minimal configuration:
{ boot.loader.grub.enable = false; fileSystems."/".device = "tmpfs"; }
| 15:49:55 |
Janne Heß | Let's see if it builds from a stock nixpkgs… | 15:51:11 |
sterni | alternatively you can pass crossSystem to nixpkgs | 15:51:15 |
sterni | I think you can set the system in the configuration as well, but not quite sure | 15:51:39 |
Janne Heß | Ah yes there's nixpkgs.config I think… but if it works like this I'm happy (or rather Alyssa because I don't break her setup again) | 15:52:20 |
| 15 Oct 2021 |
| Janne Heß left the room. | 09:42:35 |
| 17 Oct 2021 |
trofi | How does one portably detects musl to work on nixos? gnulib assumes that --host= has musl substring: https://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/musl.m4#n16 | 13:40:56 |
trofi | But nixpkgs does not have a habit of passing --host=, as a result icnov() wrappers in gnulib break occasionally: https://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/unicodeio.c#n151 | 13:42:16 |
trofi | iconv() idiosyncrasy seems to be intentional: https://wiki.musl-libc.org/functional-differences-from-glibc.html#iconv | 13:52:47 |
sterni | trofi: configurePlatforms = [ "build" "host" ]; will pass --host as desired | 14:26:10 |
trofi | Ah, nice. That should be cleaner than https://github.com/NixOS/nixpkgs/pull/141210/commits/0c0ed6f143c66fa10ddf3db24c02889f28d4cd4d. | 14:27:25 |
trofi | Was about to ask why those don't get passed unconditionall, but the TODO is already there :) https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/make-derivation.nix#L58-L61 | 14:33:15 |
| mars joined the room. | 19:03:15 |
| 18 Oct 2021 |
trofi | I'd like to update locally a bootstrap binary tarball for musl (to make pkgsMusl use current versions of musl & co.). Can I do it from a glibc system?
I tried as nix build -f pkgs/stdenv/linux/make-bootstrap-tools.nix --arg localSystem '{ config = "x86_64-unknown-linux-gnu"; libc = "musl"; }', but it seems to pass --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu to bison.
| 06:58:28 |