summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/os-specific/linux/util-linux/default.nix10
-rw-r--r--pkgs/tools/filesystems/e2fsprogs/default.nix26
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 23 insertions, 15 deletions
diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix
index c4ccd6d37f8a..82c1ec120bdd 100644
--- a/pkgs/os-specific/linux/util-linux/default.nix
+++ b/pkgs/os-specific/linux/util-linux/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, zlib, ncurses ? null, perl ? null, pam }:
+{ stdenv, fetchurl, pkgconfig, zlib, ncurses ? null, perl ? null, pam }:
 
 stdenv.mkDerivation rec {
   name = "util-linux-2.26.1";
@@ -10,7 +10,10 @@ stdenv.mkDerivation rec {
 
   patches = [ ./rtcwake-search-PATH-for-shutdown.patch
             ];
-  outputs = [ "dev" "out" "bin" ]; # ToDo: problems with e2fsprogs
+
+  outputs = [ "bin" "out" "man" ]; # TODO: $bin is kept the first for now
+  # due to lots of ${utillinux}/bin occurences and headers being rather small
+  outputDev = "bin";
 
 
   #FIXME: make it also work on non-nixos?
@@ -41,13 +44,13 @@ stdenv.mkDerivation rec {
 
   makeFlags = "usrbin_execdir=$(bin)/bin usrsbin_execdir=$(bin)/sbin";
 
+  nativeBuildInputs = [ pkgconfig ];
   buildInputs =
     [ zlib pam ]
     ++ stdenv.lib.optional (ncurses != null) ncurses
     ++ stdenv.lib.optional (perl != null) perl;
 
   postInstall = ''
-    sed "s,$out$out,$out,g" -i "$dev"/lib/pkgconfig/*.pc
     rm "$bin/bin/su" # su should be supplied by the su package (shadow)
   '';
 
@@ -60,4 +63,3 @@ stdenv.mkDerivation rec {
     platforms = platforms.linux;
   };
 }
-
diff --git a/pkgs/tools/filesystems/e2fsprogs/default.nix b/pkgs/tools/filesystems/e2fsprogs/default.nix
index 0e61e1474e88..7ae2b9c4b85a 100644
--- a/pkgs/tools/filesystems/e2fsprogs/default.nix
+++ b/pkgs/tools/filesystems/e2fsprogs/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, autoreconfHook, gettext, pkgconfig, libuuid }:
+{ stdenv, fetchurl, pkgconfig, libuuid }:
 
 stdenv.mkDerivation rec {
   name = "e2fsprogs-1.42.12";
@@ -8,9 +8,11 @@ stdenv.mkDerivation rec {
     sha256 = "0v0qcfyls0dlrjy8gx9m3s2wbkp5z3lbsr5hb7x8kp8f3bclcy71";
   };
 
-  outputs = [ "dev" "out" "bin" "man" ];
+  outputs = [ "bin" "out" "man" ];
+  outputDev = "bin"; # just for *.pc
 
-  buildInputs = [ pkgconfig /*libuuid*/ ];
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libuuid ];
 
   crossAttrs = {
     preConfigure = ''
@@ -18,15 +20,19 @@ stdenv.mkDerivation rec {
     '';
   };
 
-  # libuuid, libblkid, uuidd and fsck are in util-linux-ng (the "libuuid" dependency).
-  # ToDo: failed with shared uuid and blkid
-  configureFlags = "--enable-elf-shlibs --disable-fsck --enable-symlink-install";
+  configureFlags = [
+    "--enable-elf-shlibs" "--enable-symlink-install" "--enable-relative-symlinks"
+    # libuuid, libblkid, uuidd and fsck are in util-linux-ng (the "libuuid" dependency).
+    "--disable-libuuid" "--disable-uuidd" "--disable-libblkid" "--disable-fsck"
+  ];
 
-  enableParallelBuilding = true;
-
-  preInstall = "installFlagsArray=('LN=ln -s')";
+  # hacky way to make it install *.pc
+  postInstall = ''
+    make install-libs
+    rm "$out"/lib/*.a
+  '';
 
-  postInstall = "make install-libs";
+  enableParallelBuilding = true;
 
   meta = {
     homepage = http://e2fsprogs.sourceforge.net/;
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 094b3deb7d1d..7ecebc3ae625 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -8900,7 +8900,7 @@ let
       });
     })
     else if stdenv.isLinux
-    then e2fsprogs
+    then utillinux
     else null;
 
   light = callPackage ../os-specific/linux/light { };