2017-01-29 19:11:35 +01:00
|
|
|
{ stdenv, fetchurl, lib, pkgconfig, utillinux, libcap, libtirpc, libevent, libnfsidmap
|
|
|
|
, sqlite, kerberos, kmod, libuuid, keyutils, lvm2, systemd, coreutils, tcp_wrappers
|
2014-09-30 10:25:38 +02:00
|
|
|
}:
|
2008-03-30 19:42:49 +02:00
|
|
|
|
2017-01-29 19:11:35 +01:00
|
|
|
let
|
|
|
|
statdPath = lib.makeBinPath [ systemd utillinux coreutils ];
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "nfs-utils-${version}";
|
|
|
|
version = "2.1.1";
|
2007-11-20 16:55:37 +01:00
|
|
|
|
2008-01-30 18:20:48 +01:00
|
|
|
src = fetchurl {
|
2009-08-11 22:57:29 +02:00
|
|
|
url = "mirror://sourceforge/nfs/${name}.tar.bz2";
|
2017-01-29 19:11:35 +01:00
|
|
|
sha256 = "02dvxphndpm8vpqqnl0zvij97dq9vsq2a179pzrjcv2i91ll2a0a";
|
2007-11-20 16:55:37 +01:00
|
|
|
};
|
|
|
|
|
2017-01-29 19:11:35 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libtirpc libcap libevent libnfsidmap sqlite lvm2
|
|
|
|
libuuid keyutils kerberos tcp_wrappers
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2010-04-27 11:43:22 +02:00
|
|
|
|
|
|
|
configureFlags =
|
2017-01-29 19:11:35 +01:00
|
|
|
[ "--enable-gss"
|
2010-04-27 11:43:22 +02:00
|
|
|
"--with-statedir=/var/lib/nfs"
|
2017-01-29 19:11:35 +01:00
|
|
|
"--with-krb5=${kerberos}"
|
|
|
|
"--with-systemd=$(out)/etc/systemd/system"
|
|
|
|
"--enable-libmount-mount"
|
2010-09-03 10:44:38 +02:00
|
|
|
]
|
2017-01-29 19:11:35 +01:00
|
|
|
++ lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc.bin}/bin/rpcgen";
|
2010-04-27 11:43:22 +02:00
|
|
|
|
2017-01-29 19:11:35 +01:00
|
|
|
postPatch =
|
2015-02-16 13:51:21 +01:00
|
|
|
''
|
2017-01-29 19:11:35 +01: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"
|
2017-09-18 11:42:40 +02:00
|
|
|
|
2017-07-06 20:43:22 +02:00
|
|
|
substituteInPlace systemd/nfs-utils.service \
|
|
|
|
--replace "/bin/true" "${coreutils}/bin/true"
|
2017-06-08 20:43:04 +02:00
|
|
|
|
|
|
|
substituteInPlace utils/mount/Makefile.in \
|
|
|
|
--replace "chmod 4511" "chmod 0511"
|
2015-02-16 13:51:21 +01:00
|
|
|
'';
|
|
|
|
|
2017-01-29 19:11:35 +01:00
|
|
|
makeFlags = [
|
|
|
|
"sbindir=$(out)/bin"
|
|
|
|
"generator_dir=$(out)/etc/systemd/system-generators"
|
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"statedir=$(TMPDIR)"
|
|
|
|
"statdpath=$(TMPDIR)"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall =
|
2015-02-16 13:51:21 +01:00
|
|
|
''
|
2017-01-29 19:11:35 +01: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 13:51:21 +01:00
|
|
|
'';
|
2007-11-20 16:55:37 +01:00
|
|
|
|
2010-08-21 19:13:28 +02:00
|
|
|
# One test fails on mips.
|
2012-10-26 11:08:02 +02:00
|
|
|
doCheck = !stdenv.isMips;
|
2010-04-27 11:43:22 +02:00
|
|
|
|
2017-01-29 19:11:35 +01:00
|
|
|
meta = with stdenv.lib; {
|
2008-03-30 19:42:49 +02: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-08-01 22:03:30 +02:00
|
|
|
homepage = https://sourceforge.net/projects/nfs/;
|
2017-01-29 19:11:35 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2007-11-20 16:55:37 +01:00
|
|
|
};
|
|
|
|
}
|