openxray: 2188-november-2023-rc1 -> 2921-january-2025-rc1 (#375925)
[NixPkgs.git] / pkgs / by-name / li / libnfs / package.nix
blobe1a896d031ecee7ac762754fc00966a6d195d46e
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   fetchpatch,
6   autoreconfHook,
7 }:
9 stdenv.mkDerivation rec {
10   pname = "libnfs";
11   version = "5.0.2";
13   src = fetchFromGitHub {
14     owner = "sahlberg";
15     repo = "libnfs";
16     rev = "libnfs-${version}";
17     sha256 = "sha256-rdxi5bPXHTICZQIj/CmHgZ/V70svnITJj/OSF4mmC3o=";
18   };
20   nativeBuildInputs = [ autoreconfHook ];
22   patches = [
23     # Fixes 100% CPU usage in multi-threaded mode
24     (fetchpatch {
25       url = "https://github.com/sahlberg/libnfs/commit/34d6fe37e986da5b0ced86cd028a88e482537d5a.patch";
26       sha256 = "sha256-i7mi+TVdkLb4MztT5Ic/Q8XBIWk9lo8v5bNjHOr6LaI=";
27     })
28     # Fixes deprecation warnings on macOS
29     (fetchpatch {
30       url = "https://github.com/sahlberg/libnfs/commit/f6631c54a7b0385988f11357bf96728a6d7345b9.patch";
31       sha256 = "sha256-xLRZ9J1vr04n//gNv9ljUBt5LHUGBRRVIXJCMlFbHFI=";
32     })
33   ];
35   configureFlags = [
36     "--enable-pthread"
37   ];
39   enableParallelBuilding = true;
41   meta = with lib; {
42     description = "NFS client library";
43     homepage = "https://github.com/sahlberg/libnfs";
44     license = with licenses; [
45       lgpl2
46       bsd2
47       gpl3
48     ];
49     maintainers = with maintainers; [ peterhoeg ];
50     platforms = platforms.unix;
51   };