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:
Vladimír Čunát
2015-04-18 11:00:58 +02:00
6303 changed files with 375447 additions and 91361 deletions

View File

@@ -1,9 +1,8 @@
{ stdenv, fetchurl, pkgconfig, intltool, gperf, libcap, dbus, kmod
, zlib, xz, pam, acl, cryptsetup, libuuid, m4, utillinux, libffi
, glib, kbd, libxslt, coreutils, libgcrypt, sysvtools, docbook_xsl
, glib, kbd, libxslt, coreutils, libgcrypt, sysvtools
, kexectools, libmicrohttpd, linuxHeaders
, pythonPackages ? null, pythonSupport ? false
, autoreconfHook
}:
assert stdenv.isLinux;
@@ -11,27 +10,26 @@ assert stdenv.isLinux;
assert pythonSupport -> pythonPackages != null;
stdenv.mkDerivation rec {
version = "212";
version = "217";
name = "systemd-${version}";
src = fetchurl {
url = "http://www.freedesktop.org/software/systemd/${name}.tar.xz";
sha256 = "1hpjcc42svrs06q3isjm3m5aphgkpfdylmvpnif71zh46ys0cab5";
sha256 = "163l1y4p2a564d4ynfq3k3xf53j2v5s81blb6cvpn1y7rpxyccd0";
};
outputs = [ "dev" "out" "libudev" "doc" ];
patches =
[ # These are all changes between upstream and
# https://github.com/edolstra/systemd/tree/nixos-v212.
# https://github.com/edolstra/systemd/tree/nixos-v217.
./fixes.patch
];
buildInputs =
[ pkgconfig intltool gperf libcap kmod xz pam acl
/* cryptsetup */ libuuid m4 glib libxslt libgcrypt docbook_xsl
/* cryptsetup */ libuuid m4 glib libxslt libgcrypt
libmicrohttpd linuxHeaders libffi
autoreconfHook
] ++ stdenv.lib.optionals pythonSupport [pythonPackages.python pythonPackages.lxml];
@@ -48,9 +46,23 @@ stdenv.mkDerivation rec {
"--with-dbussessionservicedir=$(out)/share/dbus-1/services"
"--with-firmware-path=/root/test-firmware:/run/current-system/firmware"
"--with-tty-gid=3" # tty in NixOS has gid 3
"--disable-networkd" # enable/use eventually
"--enable-compat-libs" # get rid of this eventually
"--disable-tests"
"--disable-hostnamed"
"--enable-networkd"
"--disable-sysusers"
"--disable-timedated"
"--enable-timesyncd"
"--disable-readahead"
"--disable-firstboot"
"--disable-localed"
"--enable-resolved"
"--disable-split-usr"
"--with-sysvinit-path="
"--with-sysvrcnd-path="
"--with-rc-local-script-path-stop=/etc/halt.local"
];
preConfigure =
@@ -80,7 +92,7 @@ stdenv.mkDerivation rec {
# This is needed because systemd uses the gold linker, which doesn't
# yet have the wrapper script to add rpath flags automatically.
NIX_LDFLAGS = "-rpath ${pam}/lib -rpath ${libcap}/lib -rpath ${acl}/lib -rpath ${stdenv.gcc.gcc}/lib";
NIX_LDFLAGS = "-rpath ${pam}/lib -rpath ${libcap}/lib -rpath ${acl}/lib -rpath ${stdenv.cc.cc}/lib";
PYTHON_BINARY = "${coreutils}/bin/env python"; # don't want a build time dependency on Python
@@ -94,6 +106,8 @@ stdenv.mkDerivation rec {
# currently running systemd (/run/current-system/systemd) so
# that we don't use an obsolete/garbage-collected release agent.
"-USYSTEMD_CGROUP_AGENT_PATH" "-DSYSTEMD_CGROUP_AGENT_PATH=\"/run/current-system/systemd/lib/systemd/systemd-cgroups-agent\""
"-USYSTEMD_BINARY_PATH" "-DSYSTEMD_BINARY_PATH=\"/run/current-system/systemd/lib/systemd/systemd\""
];
# Use /var/lib/udev rather than /etc/udev for the generated hardware
@@ -112,12 +126,14 @@ stdenv.mkDerivation rec {
"pamconfdir=$(out)/etc/pam.d"
];
# Get rid of configuration-specific data.
postInstall =
''
mkdir -p $doc/example/systemd
mv $doc/lib/{modules-load.d,binfmt.d,sysctl.d,tmpfiles.d} $doc/example
mv $doc/lib/systemd/{system,user} $doc/example/systemd
# sysinit.target: Don't depend on
# systemd-tmpfiles-setup.service. This interferes with NixOps's
# send-keys feature (since sshd.service depends indirectly on
# sysinit.target).
mv $out/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service $out/lib/systemd/system/multi-user.target.wants/
rm -rf $out/etc/systemd/system

File diff suppressed because it is too large Load Diff