Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / libnfs / default.nix
blobd9beee7933fa9afbaaafd3667beeaf98d334ce93
1 { lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
3 stdenv.mkDerivation rec {
4   pname = "libnfs";
5   version = "5.0.2";
7   src = fetchFromGitHub {
8     owner = "sahlberg";
9     repo = "libnfs";
10     rev = "libnfs-${version}";
11     sha256 = "sha256-rdxi5bPXHTICZQIj/CmHgZ/V70svnITJj/OSF4mmC3o=";
12   };
14   nativeBuildInputs = [ autoreconfHook ];
16   patches = [
17     # Fixes 100% CPU usage in multi-threaded mode
18     (fetchpatch {
19       url = "https://github.com/sahlberg/libnfs/commit/34d6fe37e986da5b0ced86cd028a88e482537d5a.patch";
20       sha256 = "sha256-i7mi+TVdkLb4MztT5Ic/Q8XBIWk9lo8v5bNjHOr6LaI=";
21     })
22     # Fixes deprecation warnings on macOS
23     (fetchpatch {
24       url = "https://github.com/sahlberg/libnfs/commit/f6631c54a7b0385988f11357bf96728a6d7345b9.patch";
25       sha256 = "sha256-xLRZ9J1vr04n//gNv9ljUBt5LHUGBRRVIXJCMlFbHFI=";
26     })
27   ];
29   configureFlags = [
30     "--enable-pthread"
31   ];
33   enableParallelBuilding = true;
35   meta = with lib; {
36     description = "NFS client library";
37     homepage    = "https://github.com/sahlberg/libnfs";
38     license     = with licenses; [ lgpl2 bsd2 gpl3 ];
39     maintainers = with maintainers; [ peterhoeg ];
40     platforms   = platforms.unix;
41   };