1{
2 lib,
3 buildGoModule,
4 fetchFromSourcehut,
5 installShellFiles,
6 scdoc,
7}:
8
9buildGoModule rec {
10 pname = "superd";
11 version = "0.7.1";
12
13 src = fetchFromSourcehut {
14 owner = "~craftyguy";
15 repo = "superd";
16 rev = version;
17 hash = "sha256-5g9Y1Lpxp9cUe0sNvU5CdsTGcN+j00gIKPO9pD5j8uM=";
18 };
19
20 vendorHash = "sha256-Oa99U3THyWLjH+kWMQAHO5QAS2mmtY7M7leej+gnEqo=";
21
22 nativeBuildInputs = [
23 installShellFiles
24 scdoc
25 ];
26
27 postBuild = ''
28 make doc
29 '';
30
31 postInstall = ''
32 installManPage superd.1 superd.service.5 superctl.1
33 installShellCompletion --bash completions/bash/superctl
34 installShellCompletion --zsh completions/zsh/superctl
35 '';
36
37 meta = with lib; {
38 description = "Unprivileged user service supervisor";
39 homepage = "https://sr.ht/~craftyguy/superd/";
40 license = licenses.gpl3Plus;
41 platforms = platforms.linux;
42 maintainers = with maintainers; [
43 chuangzhu
44 wentam
45 ];
46 };
47}