Skip to content

Commit

Permalink
* systemd: use units in /etc rather than $out/etc. Also fix
Browse files Browse the repository at this point in the history
  references to mount/umount.

svn path=/nixpkgs/trunk/; revision=34332
  • Loading branch information
edolstra committed Jun 4, 2012
1 parent ca5dfc9 commit 1d828ff
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions pkgs/os-specific/linux/systemd/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, intltool, gperf, libcap, udev, dbus, kmod
, xz, pam, acl, cryptsetup, libuuid, m4 }:
, xz, pam, acl, cryptsetup, libuuid, m4, utillinux }:

stdenv.mkDerivation rec {
name = "systemd-44";
Expand All @@ -16,6 +16,7 @@ stdenv.mkDerivation rec {

configureFlags =
[ "--localstatedir=/var"
"--sysconfdir=/etc"
"--with-distro=other"
"--with-rootprefix=$(out)"
"--with-rootprefix=$(out)"
Expand All @@ -25,7 +26,24 @@ stdenv.mkDerivation rec {
"--with-dbussessionservicedir=$(out)/share/dbus-1/services"
];

installFlags = "localstatedir=$(TMPDIR)/var";
preConfigure =
''
for i in units/remount-rootfs.service src/remount-api-vfs.c src/mount.c; do
substituteInPlace $i \
--replace /bin/mount ${utillinux}/bin/mount \
--replace /bin/umount ${utillinux}/bin/umount
done
'';

installFlags = "localstatedir=$(TMPDIR)/var sysconfdir=$(out)/etc";

# Get rid of configuration-specific data.
postInstall =
''
mkdir -p $out/example/systemd
mv $out/lib/{modules-load.d,binfmt.d,sysctl.d,tmpfiles.d} $out/example
mv $out/lib/systemd/{system,user} $out/example/systemd
'';

enableParallelBuilding = true;

Expand Down

0 comments on commit 1d828ff

Please sign in to comment.