summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Keller <tjkeller.xyz>2024-10-20 11:24:03 -0500
committerTim Keller <tjkeller.xyz>2024-10-20 11:24:03 -0500
commit7aa221e4dbb6a1cf1cc180a274fc279d95a6f47c (patch)
tree38c766e5d3dd537eac499bf0049c66bb14bb5031
parentf292df04229818894c184fef008419225a8720e8 (diff)
downloadnixos-7aa221e4dbb6a1cf1cc180a274fc279d95a6f47c.tar.xz
nixos-7aa221e4dbb6a1cf1cc180a274fc279d95a6f47c.zip
add derivations for lowbat and pavolctld, install
-rw-r--r--derivations/lowbat/default.nix31
-rw-r--r--derivations/pavolctld/default.nix30
-rw-r--r--modules/root/software.nix2
3 files changed, 63 insertions, 0 deletions
diff --git a/derivations/lowbat/default.nix b/derivations/lowbat/default.nix
new file mode 100644
index 0000000..2d699a2
--- /dev/null
+++ b/derivations/lowbat/default.nix
@@ -0,0 +1,31 @@
+{ pkgs ? import <nixpkgs> {} }:
+
+pkgs.stdenv.mkDerivation {
+ pname = "lowbat";
+ version = "1.0";
+
+ src = pkgs.fetchgit {
+ url = "https://git.tjkeller.xyz/lowbat";
+ rev = "17e0bbaecb917b7cb42453afa9cd7e80e092c087";
+ sha256 = "sha256-wh1/QZmbVcEsbCYJxzcswN2QFjO5qkrJCQsba3wf1h8=";
+ };
+
+ nativeBuildInputs = [ pkgs.pkg-config ];
+ buildInputs = [ pkgs.libnotify pkgs.glib ];
+
+ buildPhase = ''
+ make
+ '';
+
+ installPhase = ''
+ mkdir -p $out/bin $out/share/man/man1
+ cp lowbat $out/bin/
+ cp lowbat.1 $out/share/man/man1/
+ '';
+
+ meta = with pkgs.lib; {
+ description = "A minimal battery level monitor daemon, written in C";
+ license = licenses.mit;
+ maintainers = [ maintainers.tjkeller ];
+ };
+}
diff --git a/derivations/pavolctld/default.nix b/derivations/pavolctld/default.nix
new file mode 100644
index 0000000..9f6471d
--- /dev/null
+++ b/derivations/pavolctld/default.nix
@@ -0,0 +1,30 @@
+{ pkgs ? import <nixpkgs> {} }:
+
+pkgs.stdenv.mkDerivation {
+ pname = "pavolctld";
+ version = "1.0";
+
+ src = pkgs.fetchgit {
+ url = "https://git.tjkeller.xyz/pavolctld";
+ rev = "079cf8b96a629313ebf1f579601aadccd0e6c424";
+ sha256 = "sha256-UIWh+Um/wdUKslyai5685wm6uMSl+zwwDsom6OL1CyU=";
+ };
+
+ buildInputs = [ pkgs.libpulseaudio ];
+
+ buildPhase = ''
+ make
+ '';
+
+ installPhase = ''
+ mkdir -p $out/bin $out/share/man/man1
+ cp pavolctld $out/bin/
+ cp pavolctld.1 $out/share/man/man1/
+ '';
+
+ meta = with pkgs.lib; {
+ description = "A minimal PulseAudio volume control/monitoring daemon";
+ license = licenses.mit;
+ maintainers = [ maintainers.tjkeller ];
+ };
+}
diff --git a/modules/root/software.nix b/modules/root/software.nix
index 52ecb50..19ffe4d 100644
--- a/modules/root/software.nix
+++ b/modules/root/software.nix
@@ -79,6 +79,8 @@
testdisk
tmux
xxHash
+ (callPackage ../../derivations/lowbat {})
+ (callPackage ../../derivations/pavolctld {})
];
# More desktop