From 7f27e359c58560b33cb5acac30f922b3fa877ab9 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Wed, 24 Apr 2024 10:22:52 +0200 Subject: [PATCH] Build s390x binaries using musl libc Building using musl until NixOS/nixpkgs#306473 is resolved. Refers to cri-o/cri-o#7911 Signed-off-by: Sascha Grunert --- nix/default-s390x.nix | 5 ++++- nix/derivation.nix | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nix/default-s390x.nix b/nix/default-s390x.nix index dc80f08688..3be20a055d 100644 --- a/nix/default-s390x.nix +++ b/nix/default-s390x.nix @@ -1,6 +1,9 @@ (import ./nixpkgs.nix { crossSystem = { - config = "s390x-unknown-linux-gnu"; + # TODO: Switch back to glibc when + # https://github.com/NixOS/nixpkgs/issues/306473 + # is resolved. + config = "s390x-unknown-linux-musl"; }; overlays = [ (import ./overlay.nix) ]; }).callPackage ./derivation.nix diff --git a/nix/derivation.nix b/nix/derivation.nix index a77993f29a..0b8aa0dd02 100644 --- a/nix/derivation.nix +++ b/nix/derivation.nix @@ -7,7 +7,7 @@ with pkgs; rustPlatform.buildRustPackage { capnproto protobuf ]; - buildInputs = [ + buildInputs = lib.optionals (!stdenv.hostPlatform.isMusl) [ glibc glibc.static ];