about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/upstart
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2009-10-30 18:12:28 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2009-10-30 18:12:28 +0000
commit65d399ff81762e6d2a17384d0d08b77db8ef7756 (patch)
treedf9d6e49577072219cc2928385142b461f42871d /pkgs/os-specific/linux/upstart
parenta73cef105752a55749261f1b22d3ae716e0bd5bd (diff)
downloadnixlib-65d399ff81762e6d2a17384d0d08b77db8ef7756.tar
nixlib-65d399ff81762e6d2a17384d0d08b77db8ef7756.tar.gz
nixlib-65d399ff81762e6d2a17384d0d08b77db8ef7756.tar.bz2
nixlib-65d399ff81762e6d2a17384d0d08b77db8ef7756.tar.lz
nixlib-65d399ff81762e6d2a17384d0d08b77db8ef7756.tar.xz
nixlib-65d399ff81762e6d2a17384d0d08b77db8ef7756.tar.zst
nixlib-65d399ff81762e6d2a17384d0d08b77db8ef7756.zip
* Upstart 0.6.2.
svn path=/nixpkgs/trunk/; revision=18056
Diffstat (limited to 'pkgs/os-specific/linux/upstart')
-rw-r--r--pkgs/os-specific/linux/upstart/0.6.nix40
-rw-r--r--pkgs/os-specific/linux/upstart/default.nix18
2 files changed, 50 insertions, 8 deletions
diff --git a/pkgs/os-specific/linux/upstart/0.6.nix b/pkgs/os-specific/linux/upstart/0.6.nix
new file mode 100644
index 000000000000..48bc81441625
--- /dev/null
+++ b/pkgs/os-specific/linux/upstart/0.6.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, pkgconfig, dbus, expat }:
+
+stdenv.mkDerivation rec {
+  name = "upstart-0.6.2";
+  
+  src = fetchurl {
+    url = "http://upstart.ubuntu.com/download/0.6/${name}.tar.bz2";
+    sha256 = "107xg5g2nms8wxr6imnh3ll4cmi784l671rp9dr06cvimcbk2pwj";
+  };
+
+  buildInputs = [ pkgconfig dbus expat ];
+  
+  NIX_CFLAGS_COMPILE =
+    ''
+      -DSHELL="${stdenv.shell}"
+      -DCONFFILE="/etc/init.conf"
+      -DCONFDIR="/etc/init"
+      -DPATH="/no-path"
+    '';
+
+  # 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.
+  passthru.interfaceVersion = 2;
+
+  postInstall =
+    ''
+      t=$out/etc/bash_completion.d
+      ensureDir $t
+      cp ${./upstart-bash-completion} $t/upstart
+    '';
+
+  meta = {
+    homepage = "http://upstart.ubuntu.com/";
+    description = "An event-based replacement for the /sbin/init daemon";
+  };
+}
diff --git a/pkgs/os-specific/linux/upstart/default.nix b/pkgs/os-specific/linux/upstart/default.nix
index cb18679dfe5c..466fa277ef34 100644
--- a/pkgs/os-specific/linux/upstart/default.nix
+++ b/pkgs/os-specific/linux/upstart/default.nix
@@ -1,8 +1,5 @@
 {stdenv, fetchurl}:
 
-let bashCompletion = ./upstart-bash-completion;
-in
-
 stdenv.mkDerivation {
   name = "upstart-0.3.0";
   
@@ -17,7 +14,10 @@ stdenv.mkDerivation {
   
   patches = [./cfgdir.patch];
   
-  preBuild = "export NIX_CFLAGS_COMPILE=\"$NIX_CFLAGS_COMPILE -DSHELL=\\\"$SHELL\\\"\"";
+  preBuild =
+    ''
+      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -DSHELL=\"$SHELL\""
+    '';
 
   # The interface version prevents NixOS from switching to an
   # incompatible Upstart at runtime.  (Switching across reboots is
@@ -29,10 +29,12 @@ stdenv.mkDerivation {
     interfaceVersion = 1;
   };
 
-  postInstall = ''
-    t=$out/etc/bash_completion.d
-    ensureDir $t; cp ${bashCompletion} $t/upstart
-  '';
+  postInstall =
+    ''
+      t=$out/etc/bash_completion.d
+      ensureDir $t
+      cp ${./upstart-bash-completion} $t/upstart
+    '';
 
   meta = {
     homepage = "http://upstart.ubuntu.com/";