about summary refs log tree commit diff
path: root/pkgs/tools/system/runit
diff options
context:
space:
mode:
authorRickard Nilsson <rickynils@gmail.com>2014-10-15 13:08:05 +0200
committerRickard Nilsson <rickynils@gmail.com>2014-10-15 13:08:22 +0200
commit6960149b03453a78d1e1c6a32aaafd6b26a1c68a (patch)
tree4ddaaa550c7a67317678718cc58980238f1e05b5 /pkgs/tools/system/runit
parent6d432d21640487cdb70f650a37668fcffa03c8ea (diff)
New package: runit 2.1.2
Diffstat (limited to 'pkgs/tools/system/runit')
-rw-r--r--pkgs/tools/system/runit/Makefile.patch11
-rw-r--r--pkgs/tools/system/runit/default.nix39
2 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/tools/system/runit/Makefile.patch b/pkgs/tools/system/runit/Makefile.patch
new file mode 100644
index 0000000000000..43257728e9283
--- /dev/null
+++ b/pkgs/tools/system/runit/Makefile.patch
@@ -0,0 +1,11 @@
+diff -ur admin.orig/runit-2.1.2/src/Makefile admin/runit-2.1.2/src/Makefile
+--- admin.orig/runit-2.1.2/src/Makefile	2014-08-10 20:22:35.000000000 +0200
++++ admin/runit-2.1.2/src/Makefile	2014-10-15 13:04:02.892937939 +0200
+@@ -234,7 +234,6 @@
+ 
+ hasshsgr.h: chkshsgr choose compile hasshsgr.h1 hasshsgr.h2 load \
+ tryshsgr.c warn-shsgr
+-	./chkshsgr || ( cat warn-shsgr; exit 1 )
+ 	./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h
+ 
+ haswaitp.h: choose compile haswaitp.h1 haswaitp.h2 load trywaitp.c
diff --git a/pkgs/tools/system/runit/default.nix b/pkgs/tools/system/runit/default.nix
new file mode 100644
index 0000000000000..28a0fa52d2773
--- /dev/null
+++ b/pkgs/tools/system/runit/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "runit-${version}";
+  version = "2.1.2";
+
+  src = fetchurl {
+    url = "http://smarden.org/runit/${name}.tar.gz";
+    sha256 = "065s8w62r6chjjs6m9hapcagy33m75nlnxb69vg0f4ngn061dl3g";
+  };
+
+  phases = [ "unpackPhase" "patchPhase" "buildPhase" "checkPhase" "installPhase" ];
+
+  patches = [ ./Makefile.patch ];
+
+  buildPhase = ''
+    cd ${name}
+    make -C 'src'
+  '';
+
+  checkPhase = ''
+    make -C 'src' check
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    for f in $(cat package/commands); do
+      mv src/$f $out/bin/
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "UNIX init scheme with service supervision";
+    license = licenses.bsd3;
+    homePage = "http://smarden.org/runit";
+    maintainers = with maintainers; [ rickynils ];
+    platforms = platforms.linux;
+  };
+}