From 037d27ed00435d6962c4eb9275466ccc4d2fbe77 Mon Sep 17 00:00:00 2001 From: Uli Baum Date: Thu, 30 Aug 2018 20:11:40 +0200 Subject: [PATCH] nfs-utils: simplify code using placeholders --- pkgs/os-specific/linux/nfs-utils/default.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix index fa5fabdb3c48..f67663b31061 100644 --- a/pkgs/os-specific/linux/nfs-utils/default.nix +++ b/pkgs/os-specific/linux/nfs-utils/default.nix @@ -38,11 +38,9 @@ in stdenv.mkDerivation rec { [ "--enable-gss" "--with-statedir=/var/lib/nfs" "--with-krb5=${kerberosEnv}" - "--with-systemd=$(out)/etc/systemd/system" + "--with-systemd=${placeholder "out"}/etc/systemd/system" "--enable-libmount-mount" - # need an absolute path to lib output here. - # TODO: use ${placeholder lib} when nix 1.1 is no longer supported - "--with-pluginpath=@lib@/lib/libnfsidmap" # this installs libnfsidmap + "--with-pluginpath=${placeholder "lib"}/lib/libnfsidmap" # this installs libnfsidmap ] ++ lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc.bin}/bin/rpcgen"; @@ -75,11 +73,6 @@ in stdenv.mkDerivation rec { sed '1i#include ' -i support/nsm/rpc.c ''; - # TODO: remove when placeholders are allowed (see configureFlags) - postConfigure = '' - substituteInPlace support/include/config.h --replace '@lib@' "$lib" - ''; - makeFlags = [ "sbindir=$(out)/bin" "generator_dir=$(out)/etc/systemd/system-generators"