From bafe7eb14db7e0bf16dfe1e4356ecb4de59cf0b5 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 15 Aug 2020 16:09:09 +0200 Subject: [PATCH] zfs: fix build w/gibc-2.32 --- pkgs/os-specific/linux/zfs/default.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index 27e26b13a533..14854396c8aa 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -9,6 +9,7 @@ , nfs-utils , gawk, gnugrep, gnused, systemd , smartmontools, sysstat, sudo +, pkgconfig # Kernel dependencies , kernel ? null @@ -94,17 +95,14 @@ let substituteInPlace ./cmd/vdev_id/vdev_id \ --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" - '' + optionalString stdenv.hostPlatform.isMusl '' - substituteInPlace config/user-libtirpc.m4 \ - --replace /usr/include/tirpc ${libtirpc}/include/tirpc ''; nativeBuildInputs = [ autoreconfHook nukeReferences ] - ++ optionals buildKernel (kernel.moduleBuildDependencies ++ [ perl ]); - buildInputs = optionals buildUser [ zlib libuuid attr ] + ++ optionals buildKernel (kernel.moduleBuildDependencies ++ [ perl ]) + ++ optional buildUser pkgconfig; + buildInputs = optionals buildUser [ zlib libuuid attr libtirpc ] ++ optional buildUser openssl - ++ optional (buildUser && enablePython) python3 - ++ optional stdenv.hostPlatform.isMusl libtirpc; + ++ optional (buildUser && enablePython) python3; # for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work NIX_CFLAGS_LINK = "-lgcc_s"; @@ -113,6 +111,7 @@ let configureFlags = [ "--with-config=${configFile}" + "--with-tirpc=1" (withFeatureAs (buildUser && enablePython) "python" python3.interpreter) ] ++ optionals buildUser [ "--with-dracutdir=$(out)/lib/dracut"