nfs-utils: 1.3.3 -> 2.1.1
Use upstream systemd units, add kerberos support.
This commit is contained in:
parent
469546f46e
commit
58d6b40893
@ -1,48 +1,69 @@
|
|||||||
{ fetchurl, stdenv, tcp_wrappers, utillinux, libcap, libtirpc, libevent, libnfsidmap
|
{ stdenv, fetchurl, lib, pkgconfig, utillinux, libcap, libtirpc, libevent, libnfsidmap
|
||||||
, lvm2, e2fsprogs, python, sqlite
|
, sqlite, kerberos, kmod, libuuid, keyutils, lvm2, systemd, coreutils, tcp_wrappers
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
name = "nfs-utils-1.3.3";
|
statdPath = lib.makeBinPath [ systemd utillinux coreutils ];
|
||||||
|
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
|
name = "nfs-utils-${version}";
|
||||||
|
version = "2.1.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/nfs/${name}.tar.bz2";
|
url = "mirror://sourceforge/nfs/${name}.tar.bz2";
|
||||||
sha256 = "1svn27j5c873nixm46l111g7cgyaj5zd51ahfq8mx5v9m3vh93py";
|
sha256 = "02dvxphndpm8vpqqnl0zvij97dq9vsq2a179pzrjcv2i91ll2a0a";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs =
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
[ tcp_wrappers utillinux libcap libtirpc libevent libnfsidmap
|
|
||||||
lvm2 e2fsprogs python sqlite
|
buildInputs = [
|
||||||
];
|
libtirpc libcap libevent libnfsidmap sqlite lvm2
|
||||||
|
libuuid keyutils kerberos tcp_wrappers
|
||||||
|
];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
# FIXME: Add the dependencies needed for NFSv4 and TI-RPC.
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
[ "--disable-gss"
|
[ "--enable-gss"
|
||||||
"--with-statedir=/var/lib/nfs"
|
"--with-statedir=/var/lib/nfs"
|
||||||
"--with-tirpcinclude=${libtirpc}/include/tirpc"
|
"--with-krb5=${kerberos}"
|
||||||
|
"--with-systemd=$(out)/etc/systemd/system"
|
||||||
|
"--enable-libmount-mount"
|
||||||
]
|
]
|
||||||
++ stdenv.lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc.bin}/bin/rpcgen";
|
++ lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc.bin}/bin/rpcgen";
|
||||||
|
|
||||||
patchPhase =
|
postPatch =
|
||||||
''
|
''
|
||||||
for i in "tests/"*.sh
|
patchShebangs tests
|
||||||
do
|
sed -i "s,/usr/sbin,$out/bin,g" utils/statd/statd.c
|
||||||
sed -i "$i" -e's|/bin/bash|/bin/sh|g'
|
sed -i "s,^PATH=.*,PATH=$out/bin:${statdPath}," utils/statd/start-statd
|
||||||
chmod +x "$i"
|
|
||||||
done
|
configureFlags="--with-start-statd=$out/bin/start-statd $configureFlags"
|
||||||
sed -i s,/usr/sbin,$out/sbin, utils/statd/statd.c
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preBuild =
|
makeFlags = [
|
||||||
|
"sbindir=$(out)/bin"
|
||||||
|
"generator_dir=$(out)/etc/systemd/system-generators"
|
||||||
|
];
|
||||||
|
|
||||||
|
installFlags = [
|
||||||
|
"statedir=$(TMPDIR)"
|
||||||
|
"statdpath=$(TMPDIR)"
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall =
|
||||||
''
|
''
|
||||||
makeFlags="sbindir=$out/sbin"
|
# Not used on NixOS
|
||||||
installFlags="statedir=$TMPDIR statdpath=$TMPDIR" # hack to make `make install' work
|
sed -i \
|
||||||
|
-e "s,/sbin/modprobe,${kmod}/bin/modprobe,g" \
|
||||||
|
-e "s,/usr/sbin,$out/bin,g" \
|
||||||
|
$out/etc/systemd/system/*
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# One test fails on mips.
|
# One test fails on mips.
|
||||||
doCheck = !stdenv.isMips;
|
doCheck = !stdenv.isMips;
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "Linux user-space NFS utilities";
|
description = "Linux user-space NFS utilities";
|
||||||
|
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
@ -51,10 +72,9 @@ stdenv.mkDerivation rec {
|
|||||||
daemons.
|
daemons.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
homepage = http://nfs.sourceforge.net/;
|
homepage = "https://sourceforge.net/projects/nfs/";
|
||||||
license = stdenv.lib.licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
|
platforms = platforms.linux;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
maintainers = with maintainers; [ abbradar ];
|
||||||
maintainers = [ ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user