2017-01-29 18:11:35 +00:00
|
|
|
{ stdenv, fetchurl, lib, pkgconfig, utillinux, libcap, libtirpc, libevent, libnfsidmap
|
|
|
|
, sqlite, kerberos, kmod, libuuid, keyutils, lvm2, systemd, coreutils, tcp_wrappers
|
2014-09-30 09:25:38 +01:00
|
|
|
}:
|
2008-03-30 18:42:49 +01:00
|
|
|
|
2017-01-29 18:11:35 +00:00
|
|
|
let
|
|
|
|
statdPath = lib.makeBinPath [ systemd utillinux coreutils ];
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "nfs-utils-${version}";
|
|
|
|
version = "2.1.1";
|
2007-11-20 15:55:37 +00:00
|
|
|
|
2008-01-30 17:20:48 +00:00
|
|
|
src = fetchurl {
|
2009-08-11 21:57:29 +01:00
|
|
|
url = "mirror://sourceforge/nfs/${name}.tar.bz2";
|
2017-01-29 18:11:35 +00:00
|
|
|
sha256 = "02dvxphndpm8vpqqnl0zvij97dq9vsq2a179pzrjcv2i91ll2a0a";
|
2007-11-20 15:55:37 +00:00
|
|
|
};
|
|
|
|
|
2017-01-29 18:11:35 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libtirpc libcap libevent libnfsidmap sqlite lvm2
|
|
|
|
libuuid keyutils kerberos tcp_wrappers
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2010-04-27 10:43:22 +01:00
|
|
|
|
|
|
|
configureFlags =
|
2017-01-29 18:11:35 +00:00
|
|
|
[ "--enable-gss"
|
2010-04-27 10:43:22 +01:00
|
|
|
"--with-statedir=/var/lib/nfs"
|
2017-01-29 18:11:35 +00:00
|
|
|
"--with-krb5=${kerberos}"
|
|
|
|
"--with-systemd=$(out)/etc/systemd/system"
|
|
|
|
"--enable-libmount-mount"
|
2010-09-03 09:44:38 +01:00
|
|
|
]
|
2017-01-29 18:11:35 +00:00
|
|
|
++ lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc.bin}/bin/rpcgen";
|
2010-04-27 10:43:22 +01:00
|
|
|
|
2017-01-29 18:11:35 +00:00
|
|
|
postPatch =
|
2015-02-16 12:51:21 +00:00
|
|
|
''
|
2017-01-29 18:11:35 +00:00
|
|
|
patchShebangs tests
|
|
|
|
sed -i "s,/usr/sbin,$out/bin,g" utils/statd/statd.c
|
|
|
|
sed -i "s,^PATH=.*,PATH=$out/bin:${statdPath}," utils/statd/start-statd
|
|
|
|
|
|
|
|
configureFlags="--with-start-statd=$out/bin/start-statd $configureFlags"
|
2015-02-16 12:51:21 +00:00
|
|
|
'';
|
|
|
|
|
2017-01-29 18:11:35 +00:00
|
|
|
makeFlags = [
|
|
|
|
"sbindir=$(out)/bin"
|
|
|
|
"generator_dir=$(out)/etc/systemd/system-generators"
|
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"statedir=$(TMPDIR)"
|
|
|
|
"statdpath=$(TMPDIR)"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall =
|
2015-02-16 12:51:21 +00:00
|
|
|
''
|
2017-01-29 18:11:35 +00:00
|
|
|
# Not used on NixOS
|
|
|
|
sed -i \
|
|
|
|
-e "s,/sbin/modprobe,${kmod}/bin/modprobe,g" \
|
|
|
|
-e "s,/usr/sbin,$out/bin,g" \
|
|
|
|
$out/etc/systemd/system/*
|
2015-02-16 12:51:21 +00:00
|
|
|
'';
|
2007-11-20 15:55:37 +00:00
|
|
|
|
2010-08-21 18:13:28 +01:00
|
|
|
# One test fails on mips.
|
2012-10-26 10:08:02 +01:00
|
|
|
doCheck = !stdenv.isMips;
|
2010-04-27 10:43:22 +01:00
|
|
|
|
2017-01-29 18:11:35 +00:00
|
|
|
meta = with stdenv.lib; {
|
2008-03-30 18:42:49 +01:00
|
|
|
description = "Linux user-space NFS utilities";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
This package contains various Linux user-space Network File
|
|
|
|
System (NFS) utilities, including RPC `mount' and `nfs'
|
|
|
|
daemons.
|
|
|
|
'';
|
|
|
|
|
2017-01-29 18:11:35 +00:00
|
|
|
homepage = "https://sourceforge.net/projects/nfs/";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2007-11-20 15:55:37 +00:00
|
|
|
};
|
|
|
|
}
|