about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/sysz/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/sysz/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/sysz/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/misc/sysz/default.nix b/nixpkgs/pkgs/tools/misc/sysz/default.nix
new file mode 100644
index 000000000000..4f5f90d04b0e
--- /dev/null
+++ b/nixpkgs/pkgs/tools/misc/sysz/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenvNoCC, fetchFromGitHub, makeWrapper, fzf, gawk }:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "sysz";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "joehillen";
+    repo = pname;
+    rev = version;
+    sha256 = "HNwsYE1Cv90IDi3A5PmRv3uHANR3ya+VOGBQ3+zkBLM=";
+  };
+
+  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 = with lib; {
+    homepage = "https://github.com/joehillen/sysz";
+    description = "A fzf terminal UI for systemctl";
+    license = licenses.unlicense;
+    maintainers = with maintainers; [ hleboulanger ];
+    platforms = platforms.unix;
+    changelog = "https://github.com/joehillen/sysz/blob/${version}/CHANGELOG.md";
+  };
+}