Merge pull request #194443 from pborzenkov/libnfs-pthread

This commit is contained in:
Sandro 2022-12-06 23:43:12 +01:00 committed by GitHub
commit 2efcb93ac3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook }: { lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libnfs"; pname = "libnfs";
@ -13,7 +13,22 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [ autoreconfHook ];
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=tautological-compare"; patches = [
# Fixes 100% CPU usage in multi-threaded mode
(fetchpatch {
url = "https://github.com/sahlberg/libnfs/commit/34d6fe37e986da5b0ced86cd028a88e482537d5a.patch";
sha256 = "sha256-i7mi+TVdkLb4MztT5Ic/Q8XBIWk9lo8v5bNjHOr6LaI=";
})
# Fixes deprecation warnings on macOS
(fetchpatch {
url = "https://github.com/sahlberg/libnfs/commit/f6631c54a7b0385988f11357bf96728a6d7345b9.patch";
sha256 = "sha256-xLRZ9J1vr04n//gNv9ljUBt5LHUGBRRVIXJCMlFbHFI=";
})
];
configureFlags = [
"--enable-pthread"
];
enableParallelBuilding = true; enableParallelBuilding = true;