about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/linux/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/util-linux')
-rw-r--r--nixpkgs/pkgs/os-specific/linux/util-linux/default.nix16
1 files changed, 9 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix b/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix
index 3e94ba5c1ea2..0962bd911329 100644
--- a/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix
@@ -5,14 +5,14 @@ let
   version = lib.concatStringsSep "." ([ majorVersion ]
     ++ lib.optional (patchVersion != "") patchVersion);
   majorVersion = "2.33";
-  patchVersion = "1";
+  patchVersion = "2";
 
 in stdenv.mkDerivation rec {
   name = "util-linux-${version}";
 
   src = fetchurl {
     url = "mirror://kernel/linux/utils/util-linux/v${majorVersion}/${name}.tar.xz";
-    sha256 = "08ggvgrb59m5jbq29950xxirsgv4xj3nwsc7vf82nyg1nvrxjjy1";
+    sha256 = "15yf2dh4jd1kg6066hydlgdhhs2j3na13qld8yx30qngqvmfh6v3";
   };
 
   patches = [
@@ -41,15 +41,19 @@ in stdenv.mkDerivation rec {
     "--disable-use-tty-group"
     "--enable-fs-paths-default=/run/wrappers/bin:/run/current-system/sw/bin:/sbin"
     "--disable-makeinstall-setuid" "--disable-makeinstall-chown"
+    "--disable-su" # provided by shadow
     (lib.withFeature (ncurses != null) "ncursesw")
     (lib.withFeature (systemd != null) "systemd")
     (lib.withFeatureAs (systemd != null)
-       "systemdsystemunitdir" "$(bin)/lib/systemd/system/")
+       "systemdsystemunitdir" "${placeholder "bin"}/lib/systemd/system/")
   ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
        "scanf_cv_type_modifier=ms"
   ;
 
-  makeFlags = "usrbin_execdir=$(bin)/bin usrsbin_execdir=$(bin)/sbin";
+  makeFlags = [
+    "usrbin_execdir=${placeholder "bin"}/bin"
+    "usrsbin_execdir=${placeholder "bin"}/sbin"
+  ];
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs =
@@ -58,9 +62,7 @@ in stdenv.mkDerivation rec {
 
   doCheck = false; # "For development purpose only. Don't execute on production system!"
 
-  postInstall = ''
-    rm "$bin/bin/su" # su should be supplied by the su package (shadow)
-  '' + lib.optionalString minimal ''
+  postInstall = lib.optionalString minimal ''
     rm -rf $out/share/{locale,doc,bash-completion}
   '';