2022-06-22 13:50:47 +02:00
|
|
|
{ lib, brightnessctl, libnotify, makeWrapper, stdenvNoCC }:
|
2021-11-04 15:55:33 +01:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "change-backlight";
|
|
|
|
version = "0.1.0";
|
|
|
|
|
|
|
|
src = ./change-backlight;
|
|
|
|
|
2023-04-22 13:36:28 +02:00
|
|
|
nativeBuildInputs = [
|
2021-11-04 15:55:33 +01:00
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
2022-06-22 13:50:47 +02:00
|
|
|
dontBuild = true;
|
2021-11-04 15:55:33 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp $src $out/bin/change-backlight
|
|
|
|
chmod a+x $out/bin/change-backlight
|
|
|
|
'';
|
|
|
|
|
|
|
|
wrapperPath = lib.makeBinPath [
|
|
|
|
brightnessctl
|
|
|
|
libnotify
|
|
|
|
];
|
|
|
|
|
|
|
|
fixupPhase = ''
|
|
|
|
patchShebangs $out/bin/change-backlight
|
|
|
|
wrapProgram $out/bin/change-backlight --prefix PATH : "${wrapperPath}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = ''
|
|
|
|
A script to change a screen's brightness and notify about it
|
|
|
|
'';
|
2023-03-16 21:37:52 +01:00
|
|
|
homepage = "https://git.belanyi.fr/ambroisie/nix-config";
|
2021-11-04 15:55:33 +01:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ ambroisie ];
|
|
|
|
};
|
|
|
|
}
|