Merge 'staging' into closure-size
- there were many easy merge conflicts - cc-wrapper needed nontrivial changes Many other problems might've been created by interaction of the branches, but stdenv and a few other packages build fine now.
This commit is contained in:
@@ -1,15 +1,26 @@
|
||||
{ stdenv, fetchurl, zlib, ncurses ? null, perl ? null, pam }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "util-linux-2.25";
|
||||
name = "util-linux-2.26.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.kernel.org/pub/linux/utils/util-linux/v2.25/${name}.tar.xz";
|
||||
sha256 = "02lqww6ck4p47wzc883zdjb1gnwm59hsay4hd5i55mfdv25mmfj7";
|
||||
url = "mirror://kernel/linux/utils/util-linux/v2.26/${name}.tar.xz";
|
||||
sha256 = "0vmvk5khfwf71xbsnplvmk9ikwnlbhysc96mnkgwpqk2faairp12";
|
||||
};
|
||||
|
||||
patches = [ ./rtcwake-search-PATH-for-shutdown.patch
|
||||
];
|
||||
outputs = [ "dev" "out" "bin" ]; # ToDo: problems with e2fsprogs
|
||||
|
||||
|
||||
#FIXME: make it also work on non-nixos?
|
||||
postPatch = ''
|
||||
# Substituting store paths would create a circular dependency on systemd
|
||||
substituteInPlace include/pathnames.h \
|
||||
--replace "/bin/login" "/run/current-system/sw/bin/login" \
|
||||
--replace "/sbin/shutdown" "/run/current-system/sw/bin/shutdown"
|
||||
'';
|
||||
|
||||
crossAttrs = {
|
||||
# Work around use of `AC_RUN_IFELSE'.
|
||||
preConfigure = "export scanf_cv_type_modifier=ms";
|
||||
@@ -23,9 +34,8 @@ stdenv.mkDerivation rec {
|
||||
--enable-write
|
||||
--enable-last
|
||||
--enable-mesg
|
||||
--enable-ddate
|
||||
--disable-use-tty-group
|
||||
--enable-fs-paths-default=/var/setuid-wrappers:/var/run/current-system/sw/sbin:/sbin
|
||||
--enable-fs-paths-default=/var/setuid-wrappers:/var/run/current-system/sw/bin:/sbin
|
||||
${if ncurses == null then "--without-ncurses" else ""}
|
||||
'';
|
||||
|
||||
@@ -47,7 +57,7 @@ stdenv.mkDerivation rec {
|
||||
homepage = http://www.kernel.org/pub/linux/utils/util-linux/;
|
||||
description = "A set of system utilities for Linux";
|
||||
license = licenses.gpl2; # also contains parts under more permissive licenses
|
||||
platforms = platforms.all;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
Search $PATH for the shutdown binary instead of hard-coding /sbin/shutdown,
|
||||
which isn't valid on NixOS (and a compatibility link on most other modern
|
||||
distros anyway).
|
||||
|
||||
-- nckx <tobias.geerinckx.rice@gmail.com>
|
||||
|
||||
diff -Naur a/include/pathnames.h b/include/pathnames.h
|
||||
--- a/include/pathnames.h 2014-09-16 14:37:06.138551680 +0200
|
||||
+++ b/include/pathnames.h 2015-01-01 20:41:02.510948314 +0100
|
||||
@@ -43,7 +43,7 @@
|
||||
#define _PATH_INITTAB "/etc/inittab"
|
||||
#define _PATH_RC "/etc/rc"
|
||||
#define _PATH_REBOOT "/sbin/reboot"
|
||||
-#define _PATH_SHUTDOWN "/sbin/shutdown"
|
||||
+#define _PATH_SHUTDOWN "shutdown"
|
||||
#define _PATH_SINGLE "/etc/singleboot"
|
||||
#define _PATH_SHUTDOWN_CONF "/etc/shutdown.conf"
|
||||
|
||||
diff -Naur a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c
|
||||
--- a/sys-utils/rtcwake.c 2014-10-24 11:21:20.447389309 +0200
|
||||
+++ b/sys-utils/rtcwake.c 2015-01-01 20:57:59.398911209 +0100
|
||||
@@ -582,7 +582,7 @@
|
||||
arg[i] = NULL;
|
||||
|
||||
if (!dryrun) {
|
||||
- execv(arg[0], arg);
|
||||
+ execvp(arg[0], arg);
|
||||
|
||||
warn(_("failed to execute %s"), _PATH_SHUTDOWN);
|
||||
rc = EXIT_FAILURE;
|
||||
Reference in New Issue
Block a user