zfs: fix build w/gibc-2.32

This commit is contained in:
Maximilian Bosch 2020-08-15 16:09:09 +02:00
parent 0258849e61
commit bafe7eb14d
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E

View file

@ -9,6 +9,7 @@
, nfs-utils , nfs-utils
, gawk, gnugrep, gnused, systemd , gawk, gnugrep, gnused, systemd
, smartmontools, sysstat, sudo , smartmontools, sysstat, sudo
, pkgconfig
# Kernel dependencies # Kernel dependencies
, kernel ? null , kernel ? null
@ -94,17 +95,14 @@ let
substituteInPlace ./cmd/vdev_id/vdev_id \ substituteInPlace ./cmd/vdev_id/vdev_id \
--replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \
"PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" "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 ] nativeBuildInputs = [ autoreconfHook nukeReferences ]
++ optionals buildKernel (kernel.moduleBuildDependencies ++ [ perl ]); ++ optionals buildKernel (kernel.moduleBuildDependencies ++ [ perl ])
buildInputs = optionals buildUser [ zlib libuuid attr ] ++ optional buildUser pkgconfig;
buildInputs = optionals buildUser [ zlib libuuid attr libtirpc ]
++ optional buildUser openssl ++ optional buildUser openssl
++ optional (buildUser && enablePython) python3 ++ optional (buildUser && enablePython) python3;
++ optional stdenv.hostPlatform.isMusl libtirpc;
# for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work # for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work
NIX_CFLAGS_LINK = "-lgcc_s"; NIX_CFLAGS_LINK = "-lgcc_s";
@ -113,6 +111,7 @@ let
configureFlags = [ configureFlags = [
"--with-config=${configFile}" "--with-config=${configFile}"
"--with-tirpc=1"
(withFeatureAs (buildUser && enablePython) "python" python3.interpreter) (withFeatureAs (buildUser && enablePython) "python" python3.interpreter)
] ++ optionals buildUser [ ] ++ optionals buildUser [
"--with-dracutdir=$(out)/lib/dracut" "--with-dracutdir=$(out)/lib/dracut"