1{ lib, stdenvNoCC, fetchFromGitHub, makeWrapper, fzf, gawk }:
2
3stdenvNoCC.mkDerivation rec {
4 pname = "sysz";
5 version = "1.4.3";
6
7 src = fetchFromGitHub {
8 owner = "joehillen";
9 repo = pname;
10 rev = version;
11 sha256 = "sha256-X9vj6ILPUKFo/i50JNehM2GSDWfxTdroWGYJv765Cm4=";
12 };
13
14 nativeBuildInputs = [ makeWrapper ];
15 dontBuild = true;
16
17 installPhase = ''
18 runHook preInstall
19 install -Dm755 sysz $out/libexec/sysz
20 makeWrapper $out/libexec/sysz $out/bin/sysz \
21 --prefix PATH : ${lib.makeBinPath [ fzf gawk ]}
22 runHook postInstall
23 '';
24
25 meta = with lib; {
26 homepage = "https://github.com/joehillen/sysz";
27 description = "A fzf terminal UI for systemctl";
28 license = licenses.unlicense;
29 maintainers = with maintainers; [ hleboulanger ];
30 platforms = platforms.unix;
31 changelog = "https://github.com/joehillen/sysz/blob/${version}/CHANGELOG.md";
32 };
33}