summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/sy/sysz/package.nix
blob: 089010d000546ad5498816212f41dd1cbe2be22c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
  lib,
  stdenvNoCC,
  fetchFromGitHub,
  makeWrapper,
  fzf,
  gawk,
}:

stdenvNoCC.mkDerivation rec {
  pname = "sysz";
  version = "1.4.3";

  src = fetchFromGitHub {
    owner = "joehillen";
    repo = "sysz";
    rev = version;
    sha256 = "sha256-X9vj6ILPUKFo/i50JNehM2GSDWfxTdroWGYJv765Cm4=";
  };

  nativeBuildInputs = [ makeWrapper ];
  dontBuild = true;

  installPhase = ''
    runHook preInstall
    install -Dm755 sysz $out/libexec/sysz
    makeWrapper $out/libexec/sysz $out/bin/sysz \
      --prefix PATH : ${
        lib.makeBinPath [
          fzf
          gawk
        ]
      }
    runHook postInstall
  '';

  meta = {
    homepage = "https://github.com/joehillen/sysz";
    description = "Fzf terminal UI for systemctl";
    license = lib.licenses.unlicense;
    maintainers = with lib.maintainers; [ hleboulanger ];
    platforms = lib.platforms.unix;
    changelog = "https://github.com/joehillen/sysz/blob/${version}/CHANGELOG.md";
    mainProgram = "sysz";
  };
}