Skip to content

Commit

Permalink
Build s390x binaries using musl libc
Browse files Browse the repository at this point in the history
Building using musl until NixOS/nixpkgs#306473
is resolved.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
  • Loading branch information
saschagrunert committed Apr 24, 2024
1 parent 37670c8 commit f566c0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion nix/default-s390x.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{ enableSystemd ? false }:
(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
Expand Down
6 changes: 4 additions & 2 deletions nix/derivation.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ pkgs
{ stdenv
, pkgs
, enableCriu
, enableSystemd
}:
Expand All @@ -17,9 +18,10 @@ with pkgs; stdenv.mkDerivation {
python3
which
];
buildInputs = [
buildInputs = lib.optionals (!stdenv.hostPlatform.isMusl) [
glibc
glibc.static
] ++ [
libcap
libseccomp
libsystemd
Expand Down

0 comments on commit f566c0d

Please sign in to comment.