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.

Refers to cri-o/cri-o#7911

Signed-off-by: Sascha Grunert <[email protected]>
  • Loading branch information
saschagrunert committed Apr 24, 2024
1 parent affab49 commit 5d979b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion nix/default-s390x.nix
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 6 additions & 3 deletions nix/derivation.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{ pkgs }:
{ stdenv
, pkgs
}:
with pkgs; stdenv.mkDerivation rec {
name = "conmon";
src = ./..;
Expand All @@ -12,10 +14,11 @@ with pkgs; stdenv.mkDerivation rec {
pkg-config
which
];
buildInputs = [
glib
buildInputs = lib.optionals (!stdenv.hostPlatform.isMusl) [
glibc
glibc.static
] ++ [
glib
libseccomp
pcre2
];
Expand Down

0 comments on commit 5d979b0

Please sign in to comment.