diff options
author | Ivar Scholten <ivar.scholten@protonmail.com> | 2022-03-14 22:25:07 +0100 |
---|---|---|
committer | Ivar Scholten <ivar.scholten@protonmail.com> | 2022-03-28 15:36:12 +0200 |
commit | adf885ca00c87beded0c4697b5818710d5cd485f (patch) | |
tree | 029a8ecd77d91a2b916e4ef21e4b1a8a56892313 /pkgs/tools/misc/gummy | |
parent | 541064d899ce51d291c0aca27834b740ab21ea4b (diff) |
gummy: init at 0.1
Diffstat (limited to 'pkgs/tools/misc/gummy')
-rw-r--r-- | pkgs/tools/misc/gummy/default.nix | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/tools/misc/gummy/default.nix b/pkgs/tools/misc/gummy/default.nix new file mode 100644 index 0000000000000..f7950650f7fc5 --- /dev/null +++ b/pkgs/tools/misc/gummy/default.nix @@ -0,0 +1,66 @@ +{ lib +, stdenv +, fetchFromGitHub +, testVersion +, gummy +, cmake +, libX11 +, libXext +, sdbus-cpp +, udev +, coreutils +}: + +stdenv.mkDerivation rec { + pname = "gummy"; + version = "0.1"; + + src = fetchFromGitHub { + owner = "fushko"; + repo = "gummy"; + rev = version; + sha256 = "sha256-CbZFuvFMmbFVX8k3duhhsg0fd9kVmhsj0VeFYil9YiE="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + libX11 + libXext + sdbus-cpp + udev + ]; + + cmakeFlags = [ + "-DUDEV_DIR=${placeholder "out"}/lib/udev" + ]; + + # Fixes the "gummy start" command, without this it cannot find the binary. + # Setting this through cmake does not seem to work. + postPatch = '' + substituteInPlace src/gummy/gummy.cpp \ + --replace "CMAKE_INSTALL_DAEMON_PATH" "\"${placeholder "out"}/libexec/gummyd\"" + ''; + + preFixup = '' + substituteInPlace $out/lib/udev/99-gummy.rules \ + --replace "/bin/chmod" "${coreutils}/bin/chmod" + + ln -s $out/libexec/gummyd $out/bin/gummyd + ''; + + passthru.tests.version = testVersion { package = gummy; }; + + meta = with lib; { + homepage = "https://github.com/Fushko/gummy"; + description = "Brightness and temperature manager for X11"; + longDescription = '' + CLI screen manager for X11 that allows automatic and manual brightness/temperature adjustments, + via backlight (currently only for embedded displays) and gamma. Multiple monitors are supported. + ''; + license = licenses.gpl3Only; + maintainers = [ maintainers.ivar ]; + }; +} |