From 8beb1e26e05eb40c2ebf1a7907f41d612c2350b3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 11 Oct 2018 17:40:20 +0200 Subject: [PATCH] nfs-utils: Get rid of runtime dependency on kerberos.dev --- pkgs/os-specific/linux/nfs-utils/default.nix | 22 +++++++++++++------- 1 file 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";