personal/dotfiles

pkgs/void-runit.nix in framework
Repositories | Summary | Log | Files | README.md | LICENSE

void-runit.nix (1175B) download


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