summary refs log tree commit diff
path: root/pkgs/os-specific/linux/nfs-utils/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/nfs-utils/default.nix')
-rw-r--r--pkgs/os-specific/linux/nfs-utils/default.nix22
1 files changed, 14 insertions, 8 deletions
diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix
index 86e9e0d3d4d0..7235d8415f55 100644
--- a/pkgs/os-specific/linux/nfs-utils/default.nix
+++ b/pkgs/os-specific/linux/nfs-utils/default.nix
@@ -5,14 +5,9 @@
 
 let
   statdPath = lib.makeBinPath [ systemd utillinux coreutils ];
+in
 
-  # Not nice; feel free to find a nicer solution.
-  kerberosEnv = buildEnv {
-    name = "kerberos-env-${kerberos.version}";
-    paths = with lib; [ (getDev kerberos) (getLib kerberos) ];
-  };
-
-in stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
   name = "nfs-utils-${version}";
   version = "2.3.3";
 
@@ -34,10 +29,19 @@ in stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  preConfigure =
+    ''
+      substituteInPlace configure \
+        --replace '$dir/include/gssapi' ${lib.getDev kerberos}/include/gssapi \
+        --replace '$dir/bin/krb5-config' ${lib.getDev kerberos}/bin/krb5-config
+    '';
+
+  #configureScript = "bash -x configure";
+
   configureFlags =
     [ "--enable-gss"
       "--with-statedir=/var/lib/nfs"
-      "--with-krb5=${kerberosEnv}"
+      "--with-krb5=${lib.getLib kerberos}"
       "--with-systemd=${placeholder "out"}/etc/systemd/system"
       "--enable-libmount-mount"
       "--with-pluginpath=${placeholder "lib"}/lib/libnfsidmap" # this installs libnfsidmap
@@ -97,6 +101,8 @@ in stdenv.mkDerivation rec {
   # One test fails on mips.
   doCheck = !stdenv.isMips;
 
+  disallowedReferences = [ (lib.getDev kerberos) ];
+
   meta = with stdenv.lib; {
     description = "Linux user-space NFS utilities";