From 1a6475858580dea952de253feafd2154f1d9ad6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 30 Mar 2008 17:42:49 +0000 Subject: [PATCH] Add Linux nfs-utils. svn path=/nixpkgs/trunk/; revision=11367 --- pkgs/os-specific/linux/nfs-utils/default.nix | 34 ++++++++++++++----- .../os-specific/linux/nfs-utils/sbindir.patch | 11 ++++++ pkgs/top-level/all-packages.nix | 4 +-- 3 files changed, 37 insertions(+), 12 deletions(-) create mode 100644 pkgs/os-specific/linux/nfs-utils/sbindir.patch diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix index 18278ef3c34f..7efdb07687fd 100644 --- a/pkgs/os-specific/linux/nfs-utils/default.nix +++ b/pkgs/os-specific/linux/nfs-utils/default.nix @@ -1,17 +1,33 @@ -args: with args; -stdenv.mkDerivation { - name = "nfs-utils-1.1.1"; +{ fetchurl, stdenv, tcpWrapper, e2fsprogs }: + +stdenv.mkDerivation rec { + name = "nfs-utils-1.1.2"; src = fetchurl { - url = mirror://sourceforge/nfs/nfs-utils-1.1.1.tar.gz; - sha256 = "0aa434cv7lgbrhks0rzhwxvbk2zsa17kjwxqjrrh87zrv9d2sr1x"; + url = "mirror://sourceforge/nfs/${name}.tar.gz"; + sha256 = "0cs0kl18f4h8nkbnd7n3flw9krhkm3mx9sh7vz9dkvp46g0v228x"; }; - buildInputs = [kernelHeaders tcp_wrapper]; + patches = [ ./sbindir.patch ]; + + # Needs `libblkid' and `libcomerr' from `e2fsprogs'. + buildInputs = [ tcpWrapper e2fsprogs ]; + + # FIXME: Currently too lazy to build the dependencies needed for NFSv4. + configurePhase = ''./configure --prefix=$out \ + --disable-gss --disable-nfsv4 \ + --with-statedir=$out/var/lib/nfs''; meta = { - description = "nfs utils"; - homepage = http://nfs.sourceforge.net/; - license = "GPL2"; + 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. + ''; + + homepage = http://nfs.sourceforge.net/; + license = "GPLv2"; }; } diff --git a/pkgs/os-specific/linux/nfs-utils/sbindir.patch b/pkgs/os-specific/linux/nfs-utils/sbindir.patch new file mode 100644 index 000000000000..2884b56e6d11 --- /dev/null +++ b/pkgs/os-specific/linux/nfs-utils/sbindir.patch @@ -0,0 +1,11 @@ +--- nfs-utils-1.1.2/utils/mount/Makefile.in 2008-03-14 18:44:42.000000000 +0100 ++++ nfs-utils-1.1.2/utils/mount/Makefile.in 2008-03-30 19:30:57.000000000 +0200 +@@ -219,7 +219,7 @@ psdir = @psdir@ + + # These binaries go in /sbin (not /usr/sbin), and that cannot be + # overriden at config time. +-sbindir = /sbin ++sbindir = @prefix@/sbin + secure_statd = @secure_statd@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d550dd42ca12..c2691a2b6120 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3804,11 +3804,9 @@ let pkgs = rec { inherit fetchurl stdenv; }; - /* nfsUtils = import ../os-specific/linux/nfs-utils { - inherit fetchurl stdenv kernelHeaders tcp_wrapper; + inherit fetchurl stdenv tcpWrapper e2fsprogs; }; - */ acpi = import ../os-specific/linux/acpi { inherit fetchurl stdenv;