at 15.09-beta 42 lines 1.2 kB view raw
1{ stdenv, fetchurl, pkgconfig, dbus, libnih }: 2 3let version = "1.5"; in 4 5stdenv.mkDerivation rec { 6 name = "upstart-${version}"; 7 8 src = fetchurl { 9 url = "http://upstart.ubuntu.com/download/${version}/${name}.tar.gz"; 10 sha256 = "01w4ab6nlisz5blb0an1sxjkndwikr7sjp0cmz4lg00g3n7gahmx"; 11 }; 12 13 buildInputs = [ pkgconfig dbus libnih ]; 14 15 NIX_CFLAGS_COMPILE = 16 '' 17 -DSHELL="${stdenv.shell}" 18 -DCONFFILE="/etc/init.conf" 19 -DCONFDIR="/etc/init" 20 -DPATH="/no-path" 21 ''; 22 23 # The interface version prevents NixOS from switching to an 24 # incompatible Upstart at runtime. (Switching across reboots is 25 # fine, of course.) It should be increased whenever Upstart changes 26 # in a backwards-incompatible way. If the interface version of two 27 # Upstart builds is the same, then we can switch between them at 28 # runtime; otherwise we can't and we need to reboot. 29 passthru.interfaceVersion = 2; 30 31 postInstall = 32 '' 33 t=$out/etc/bash_completion.d 34 mkdir -p $t 35 cp ${./upstart-bash-completion} $t/upstart 36 ''; 37 38 meta = { 39 homepage = "http://upstart.ubuntu.com/"; 40 description = "An event-based replacement for the /sbin/init daemon"; 41 }; 42}