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.nix20
1 files changed, 17 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index 2a34600529dc..e7184aa27b96 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -3,10 +3,11 @@
 , glib, kbd, libxslt, coreutils, libgcrypt, sysvtools, docbook_xsl
 }:
 
-assert stdenv.gcc.libc or null != null;
+assert stdenv.isLinux;
 
 stdenv.mkDerivation rec {
-  name = "systemd-203";
+  version = "203";
+  name = "systemd-${version}";
 
   src = fetchurl {
     url = "http://www.freedesktop.org/software/systemd/${name}.tar.xz";
@@ -26,7 +27,7 @@ stdenv.mkDerivation rec {
     ] ++ stdenv.lib.optional stdenv.isArm ./libc-bug-accept4-arm.patch;
 
   buildInputs =
-    [ pkgconfig intltool gperf libcap dbus kmod xz pam acl
+    [ pkgconfig intltool gperf libcap dbus.libs kmod xz pam acl
       /* cryptsetup */ libuuid m4 glib libxslt libgcrypt docbook_xsl
     ];
 
@@ -125,6 +126,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";