base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / nt / ntirpc / package.nix
blobe7100e66f384c857b211f3e81e27e7bddfd09526
1 { lib, stdenv, fetchFromGitHub, cmake
2 , krb5, liburcu , libtirpc, libnsl
3 } :
5 stdenv.mkDerivation rec {
6   pname = "ntirpc";
7   version = "6.0.1";
9   src = fetchFromGitHub {
10     owner = "nfs-ganesha";
11     repo = "ntirpc";
12     rev = "v${version}";
13     sha256 = "sha256-Txtc0Oyt/WfZiMe26uMzx3HFq/YaeU6cYfjPQwh0uQg=";
14   };
16   outputs = [ "out" "dev" ];
17   postPatch = ''
18     substituteInPlace ntirpc/netconfig.h --replace "/etc/netconfig" "$out/etc/netconfig"
19     sed '1i#include <assert.h>' -i src/work_pool.c
20   '';
22   nativeBuildInputs = [ cmake ];
23   buildInputs = [ krb5 liburcu libnsl ];
25   postInstall = ''
26     mkdir -p $out/etc
28     # Library needs a netconfig to run.
29     # Steal the file from libtirpc
30     cp ${libtirpc}/etc/netconfig $out/etc/
31   '';
33   meta = with lib; {
34     description = "Transport-independent RPC (TI-RPC)";
35     homepage = "https://github.com/nfs-ganesha/ntirpc";
36     maintainers = [ maintainers.markuskowa ];
37     platforms = platforms.linux;
38     license = licenses.bsd3;
39   };