Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.1 kB · 58 lines
Nix
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859{ lib, stdenv, fetchFromGitHub, pkg-config, systemd, coreutils, udevCheckHook,}:
stdenv.mkDerivation rec { pname = "brightnessctl"; version = "0.5.1";
src = fetchFromGitHub { owner = "Hummer12007"; repo = "brightnessctl"; rev = version; sha256 = "0immxc7almmpg80n3bdn834p3nrrz7bspl2syhb04s3lawa5y2lq"; };
postPatch = '' substituteInPlace Makefile \ --replace-fail "pkg-config" "$PKG_CONFIG"
substituteInPlace 90-brightnessctl.rules \ --replace-fail /bin/ ${coreutils}/bin/ '';
makeFlags = [ "PREFIX=" "DESTDIR=$(out)" "ENABLE_SYSTEMD=1" ];
installTargets = [ "install" "install_udev_rules" ];
nativeBuildInputs = [ pkg-config udevCheckHook ]; buildInputs = [ systemd ];
doInstallCheck = true;
meta = with lib; { homepage = "https://github.com/Hummer12007/brightnessctl"; description = "This program allows you read and control device brightness"; license = licenses.mit; maintainers = with maintainers; [ megheaiulian ]; platforms = platforms.linux; mainProgram = "brightnessctl"; };
}