2010-02-15 15:55:39 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, dbus, libnih }:
|
2006-11-17 20:24:42 +00:00
|
|
|
|
2012-04-05 13:24:08 +01:00
|
|
|
let version = "1.5"; in
|
2012-03-02 14:46:58 +00:00
|
|
|
|
2010-02-15 15:55:39 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2012-03-02 14:46:58 +00:00
|
|
|
name = "upstart-${version}";
|
2009-01-05 14:01:42 +00:00
|
|
|
|
2006-11-17 20:24:42 +00:00
|
|
|
src = fetchurl {
|
2012-03-02 14:46:58 +00:00
|
|
|
url = "http://upstart.ubuntu.com/download/${version}/${name}.tar.gz";
|
2012-04-05 13:24:08 +01:00
|
|
|
md5 = "870920a75f8c13f3a3af4c35916805ac";
|
2006-11-17 20:24:42 +00:00
|
|
|
};
|
2009-04-22 08:19:22 +01:00
|
|
|
|
2010-02-15 15:55:39 +00:00
|
|
|
buildInputs = [ pkgconfig dbus libnih ];
|
2009-01-05 14:01:42 +00:00
|
|
|
|
2010-02-15 15:55:39 +00:00
|
|
|
NIX_CFLAGS_COMPILE =
|
2009-10-30 18:12:28 +00:00
|
|
|
''
|
2010-02-15 15:55:39 +00:00
|
|
|
-DSHELL="${stdenv.shell}"
|
|
|
|
-DCONFFILE="/etc/init.conf"
|
|
|
|
-DCONFDIR="/etc/init"
|
|
|
|
-DPATH="/no-path"
|
2009-10-30 18:12:28 +00:00
|
|
|
'';
|
2009-01-05 14:01:42 +00:00
|
|
|
|
2009-04-25 23:36:33 +01:00
|
|
|
# The interface version prevents NixOS from switching to an
|
|
|
|
# incompatible Upstart at runtime. (Switching across reboots is
|
|
|
|
# fine, of course.) It should be increased whenever Upstart changes
|
|
|
|
# in a backwards-incompatible way. If the interface version of two
|
|
|
|
# Upstart builds is the same, then we can switch between them at
|
|
|
|
# runtime; otherwise we can't and we need to reboot.
|
2010-02-15 15:55:39 +00:00
|
|
|
passthru.interfaceVersion = 2;
|
2009-04-25 23:36:33 +01:00
|
|
|
|
2009-10-30 18:12:28 +00:00
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
t=$out/etc/bash_completion.d
|
2012-03-02 14:46:58 +00:00
|
|
|
mkdir -p $t
|
2009-10-30 18:12:28 +00:00
|
|
|
cp ${./upstart-bash-completion} $t/upstart
|
|
|
|
'';
|
2009-09-20 18:01:24 +01:00
|
|
|
|
2009-01-05 14:01:42 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "http://upstart.ubuntu.com/";
|
|
|
|
description = "An event-based replacement for the /sbin/init daemon";
|
|
|
|
};
|
2006-11-17 20:24:42 +00:00
|
|
|
}
|