about summary refs log tree commit diff
path: root/tools/waybar-systemd-units/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tools/waybar-systemd-units/default.nix')
-rw-r--r--tools/waybar-systemd-units/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/waybar-systemd-units/default.nix b/tools/waybar-systemd-units/default.nix
new file mode 100644
index 0000000..70cac84
--- /dev/null
+++ b/tools/waybar-systemd-units/default.nix
@@ -0,0 +1,27 @@
+{ self, lib, python3, stdenvNoCC, pkgs }:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "waybar-systemd-units";
+  src = ./waybar-systemd.py;
+  version = "0.1.0";
+
+  buildInputs = [ (pkgs.python310.withPackages (ps: with ps; [ click ])) ];
+
+  propagatedBuildInputs =
+    [ (pkgs.python310.withPackages (ps: with ps; [ click ])) ];
+
+  dontUnpack = true;
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp $src $out/bin/${pname}
+  '';
+
+  meta = with lib; {
+    description = "Get a list of systemd units that have failed.";
+    license = with licenses; [ mit ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ fcuny ];
+  };
+}