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
|
||||
, lvm2, e2fsprogs, python, sqlite
|
||||
{ stdenv, fetchurl, lib, pkgconfig, utillinux, libcap, libtirpc, libevent, libnfsidmap
|
||||
, sqlite, kerberos, kmod, libuuid, keyutils, lvm2, systemd, coreutils, tcp_wrappers
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nfs-utils-1.3.3";
|
||||
let
|
||||
statdPath = lib.makeBinPath [ systemd utillinux coreutils ];
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "nfs-utils-${version}";
|
||||
version = "2.1.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/nfs/${name}.tar.bz2";
|
||||
sha256 = "1svn27j5c873nixm46l111g7cgyaj5zd51ahfq8mx5v9m3vh93py";
|
||||
sha256 = "02dvxphndpm8vpqqnl0zvij97dq9vsq2a179pzrjcv2i91ll2a0a";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
[ tcp_wrappers utillinux libcap libtirpc libevent libnfsidmap
|
||||
lvm2 e2fsprogs python sqlite
|
||||
];
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
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 =
|
||||
[ "--disable-gss"
|
||||
[ "--enable-gss"
|
||||
"--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
|
||||
do
|
||||
sed -i "$i" -e's|/bin/bash|/bin/sh|g'
|
||||
chmod +x "$i"
|
||||
done
|
||||
sed -i s,/usr/sbin,$out/sbin, utils/statd/statd.c
|
||||
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"
|
||||
'';
|
||||
|
||||
preBuild =
|
||||
makeFlags = [
|
||||
"sbindir=$(out)/bin"
|
||||
"generator_dir=$(out)/etc/systemd/system-generators"
|
||||
];
|
||||
|
||||
installFlags = [
|
||||
"statedir=$(TMPDIR)"
|
||||
"statdpath=$(TMPDIR)"
|
||||
];
|
||||
|
||||
postInstall =
|
||||
''
|
||||
makeFlags="sbindir=$out/sbin"
|
||||
installFlags="statedir=$TMPDIR statdpath=$TMPDIR" # hack to make `make install' work
|
||||
# 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/*
|
||||
'';
|
||||
|
||||
# One test fails on mips.
|
||||
doCheck = !stdenv.isMips;
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "Linux user-space NFS utilities";
|
||||
|
||||
longDescription = ''
|
||||
@ -51,10 +72,9 @@ stdenv.mkDerivation rec {
|
||||
daemons.
|
||||
'';
|
||||
|
||||
homepage = http://nfs.sourceforge.net/;
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ ];
|
||||
homepage = "https://sourceforge.net/projects/nfs/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user