summary refs log tree commit diff
path: root/pkgs/os-specific/linux/systemd/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/systemd/default.nix')
-rw-r--r--pkgs/os-specific/linux/systemd/default.nix22
1 files changed, 17 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index 2482f808cac8..8c681f893edd 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -3,10 +3,9 @@
 , glib, kbd, libxslt, coreutils, libgcrypt, sysvtools, docbook_xsl
 }:
 
-assert stdenv.gcc.libc or null != null;
-
 stdenv.mkDerivation rec {
-  name = "systemd-203";
+  version = "203";
+  name = "systemd-${version}";
 
   src = fetchurl {
     url = "http://www.freedesktop.org/software/systemd/${name}.tar.xz";
@@ -25,8 +24,8 @@ stdenv.mkDerivation rec {
       ./0009-Start-ctrl-alt-del.target-irreversibly.patch
     ] ++ stdenv.lib.optional stdenv.isArm ./libc-bug-accept4-arm.patch;
 
-  buildInputs =
-    [ pkgconfig intltool gperf libcap dbus kmod xz pam acl
+  buildInputs = assert stdenv.gcc.libc or null != null; # assertion here, so it doesn't trigger on passthru.headers
+    [ pkgconfig intltool gperf libcap dbus.libs kmod xz pam acl
       /* cryptsetup */ libuuid m4 glib libxslt libgcrypt docbook_xsl
     ];
 
@@ -125,6 +124,19 @@ stdenv.mkDerivation rec {
   # runtime; otherwise we can't and we need to reboot.
   passthru.interfaceVersion = 2;
 
+  passthru.headers = stdenv.mkDerivation {
+    name = "systemd-headers-${version}";
+    inherit src;
+
+    phases = [ "unpackPhase" "installPhase" ];
+
+    # some are needed by dbus.libs, which is needed for systemd :-)
+    installPhase = ''
+      mkdir -p "$out/include/systemd"
+      mv src/systemd/*.h "$out/include/systemd"
+    '';
+  };
+
   meta = {
     homepage = "http://www.freedesktop.org/wiki/Software/systemd";
     description = "A system and service manager for Linux";