about summary refs log tree commit diff
path: root/pkgs/tools/system
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2016-07-27 13:32:13 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2016-08-26 18:12:41 +0200
commit84f73f1e2e70d71c9be8f2b8b2db777960e2a541 (patch)
tree9586ed3fccf0a0c0182063c2185a2d858ea61ec2 /pkgs/tools/system
parentfee9b3410e99b5db76eab3f7af379e8882cc6a90 (diff)
downloadnixlib-84f73f1e2e70d71c9be8f2b8b2db777960e2a541.tar
nixlib-84f73f1e2e70d71c9be8f2b8b2db777960e2a541.tar.gz
nixlib-84f73f1e2e70d71c9be8f2b8b2db777960e2a541.tar.bz2
nixlib-84f73f1e2e70d71c9be8f2b8b2db777960e2a541.tar.lz
nixlib-84f73f1e2e70d71c9be8f2b8b2db777960e2a541.tar.xz
nixlib-84f73f1e2e70d71c9be8f2b8b2db777960e2a541.tar.zst
nixlib-84f73f1e2e70d71c9be8f2b8b2db777960e2a541.zip
runit: refactor, add man output
Diffstat (limited to 'pkgs/tools/system')
-rw-r--r--pkgs/tools/system/runit/Makefile.patch11
-rw-r--r--pkgs/tools/system/runit/default.nix24
2 files changed, 12 insertions, 23 deletions
diff --git a/pkgs/tools/system/runit/Makefile.patch b/pkgs/tools/system/runit/Makefile.patch
deleted file mode 100644
index 43257728e928..000000000000
--- a/pkgs/tools/system/runit/Makefile.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-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
index c10e41d709bc..18fffa216b66 100644
--- a/pkgs/tools/system/runit/default.nix
+++ b/pkgs/tools/system/runit/default.nix
@@ -9,33 +9,33 @@ stdenv.mkDerivation rec {
     sha256 = "065s8w62r6chjjs6m9hapcagy33m75nlnxb69vg0f4ngn061dl3g";
   };
 
-  patches = [ ./Makefile.patch ];
+  outputs = [ "out" "man" ];
+
+  sourceRoot = "admin/${name}";
+
+  doCheck = true;
 
   postPatch = ''
-    cd ${name}
     sed -i 's,-static,,g' src/Makefile
   '';
 
-  buildPhase = ''
-    make -C 'src'
-  '';
-
-  checkPhase = ''
-    make -C 'src' check
+  preBuild = ''
+    cd src
   '';
 
   installPhase = ''
     mkdir -p $out/bin
-    for f in $(cat package/commands); do
-      mv src/$f $out/bin/
-    done
+    cp -t $out/bin $(< ../package/commands)
+
+    mkdir -p $man/share/man
+    cp -r ../man $man/share/man/man8
   '';
 
   meta = with stdenv.lib; {
     description = "UNIX init scheme with service supervision";
     license = licenses.bsd3;
     homepage = "http://smarden.org/runit";
-    maintainers = with maintainers; [ rickynils ];
+    maintainers = with maintainers; [ rickynils joachifm ];
     platforms = platforms.linux;
   };
 }