at 23.11-beta 39 lines 971 B view raw
1{ lib, stdenv, fetchFromGitHub, cmake 2, krb5, liburcu , libtirpc, libnsl 3} : 4 5stdenv.mkDerivation rec { 6 pname = "ntirpc"; 7 version = "5.0"; 8 9 src = fetchFromGitHub { 10 owner = "nfs-ganesha"; 11 repo = "ntirpc"; 12 rev = "v${version}"; 13 sha256 = "sha256-xqnfo07EHwendzibIz187vdaenHwxg078D6zJvoyewc="; 14 }; 15 16 postPatch = '' 17 substituteInPlace ntirpc/netconfig.h --replace "/etc/netconfig" "$out/etc/netconfig" 18 sed '1i#include <assert.h>' -i src/work_pool.c 19 ''; 20 21 nativeBuildInputs = [ cmake ]; 22 buildInputs = [ krb5 liburcu libnsl ]; 23 24 postInstall = '' 25 mkdir -p $out/etc 26 27 # Library needs a netconfig to run. 28 # Steal the file from libtirpc 29 cp ${libtirpc}/etc/netconfig $out/etc/ 30 ''; 31 32 meta = with lib; { 33 description = "Transport-independent RPC (TI-RPC)"; 34 homepage = "https://github.com/nfs-ganesha/ntirpc"; 35 maintainers = [ maintainers.markuskowa ]; 36 platforms = platforms.linux; 37 license = licenses.bsd3; 38 }; 39}