diff options
Diffstat (limited to 'pkgs/os-specific/linux/util-linux/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/util-linux/default.nix | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index bcd9aa58bccf..ec5c77699ecb 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.27.1"; @@ -8,12 +8,15 @@ stdenv.mkDerivation rec { sha256 = "1452hz5zx56a3mad8yrg5wb0vy5zi19mpjp6zx1yr6p9xp6qz08a"; }; - outputs = [ "out" "man" ]; - patches = [ ./rtcwake-search-PATH-for-shutdown.patch ]; + 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? postPatch = '' # Substituting store paths would create a circular dependency on systemd @@ -40,21 +43,25 @@ stdenv.mkDerivation rec { ${if ncurses == null then "--without-ncurses" else ""} ''; + 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 = '' - rm $out/bin/su # su should be supplied by the su package (shadow) + rm "$bin/bin/su" # su should be supplied by the su package (shadow) ''; enableParallelBuilding = true; - meta = { + meta = with stdenv.lib; { homepage = http://www.kernel.org/pub/linux/utils/util-linux/; description = "A set of system utilities for Linux"; - platforms = stdenv.lib.platforms.linux; + license = licenses.gpl2; # also contains parts under more permissive licenses + platforms = platforms.linux; priority = 6; # lower priority than coreutils ("kill") and shadow ("login" etc.) packages }; } |