From f83b5e4f7a7e1136237b434811914f3c79f43c46 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 23 Jul 2018 17:03:39 -0400 Subject: util-linux: Clean up to use less bash --- pkgs/os-specific/linux/util-linux/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'pkgs/os-specific/linux/util-linux') diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index d2f75f5875ea..1a7232afedb3 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -28,10 +28,6 @@ in stdenv.mkDerivation rec { --replace "/bin/umount" "$out/bin/umount" ''; - preConfigure = lib.optionalString (systemd != null) '' - configureFlags+=" --with-systemd --with-systemdsystemunitdir=$bin/lib/systemd/system/" - ''; - # !!! It would be better to obtain the path to the mount helpers # (/sbin/mount.*) through an environment variable, but that's # somewhat risky because we have to consider that mount can setuid @@ -43,8 +39,11 @@ in stdenv.mkDerivation rec { "--disable-use-tty-group" "--enable-fs-paths-default=/run/wrappers/bin:/var/run/current-system/sw/bin:/sbin" "--disable-makeinstall-setuid" "--disable-makeinstall-chown" - ] ++ lib.optional (ncurses == null) "--without-ncurses" - ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) + (lib.withFeature (ncurses != null) "ncurses") + (lib.withFeature (systemd != null) "systemd") + (lib.withFeatureAs (systemd != null) + "systemdsystemunitdir" "$bin/lib/systemd/system/") + ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "scanf_cv_type_modifier=ms" ; -- cgit 1.4.1