void-runit.nix (1156B) download
1{ pkgs
2, stdenv
3, fetchzip
4}:
5
6stdenv.mkDerivation rec {
7 name = "runit-utils";
8 version = "20231124";
9
10 src = fetchzip {
11 url = "https://github.com/void-linux/void-runit/archive/refs/tags/${version}.tar.gz";
12 hash = "sha256-XGQcRaaGntAx4HFLTLZRjMGcejtJyJQEF/yXfQmzrZs=";
13 };
14
15 installPhase = ''
16 install -d $out/bin
17 install -m755 halt $out/bin
18 install -m755 pause $out/bin
19 install -m755 vlogger $out/bin
20 install -m755 shutdown $out/bin/shutdown
21 install -m755 modules-load $out/bin/modules-load
22 install -m755 seedrng $out/bin/seedrng
23 install -m755 zzz $out/bin
24 ln -sf zzz $out/bin/ZZZ
25 ln -sf halt $out/bin/poweroff
26 ln -sf halt $out/bin/reboot
27 install -d $out/share/man/man1
28 install -m644 pause.1 $out/share/man/man1
29 install -d $out/share/man/man8
30 install -m644 zzz.8 $out/share/man/man8
31 install -m644 shutdown.8 $out/share/man/man8
32 install -m644 halt.8 $out/share/man/man8
33 install -m644 modules-load.8 $out/share/man/man8
34 install -m644 vlogger.8 $out/share/man/man8
35 ln -sf halt.8 $out/share/man/man8/poweroff.8
36 ln -sf halt.8 $out/share/man/man8/reboot.8
37 '';
38}