nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 58 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 pkg-config, 6 systemd, 7 coreutils, 8 udevCheckHook, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "brightnessctl"; 13 version = "0.5.1"; 14 15 src = fetchFromGitHub { 16 owner = "Hummer12007"; 17 repo = "brightnessctl"; 18 rev = version; 19 sha256 = "0immxc7almmpg80n3bdn834p3nrrz7bspl2syhb04s3lawa5y2lq"; 20 }; 21 22 postPatch = '' 23 substituteInPlace Makefile \ 24 --replace-fail "pkg-config" "$PKG_CONFIG" 25 26 substituteInPlace 90-brightnessctl.rules \ 27 --replace-fail /bin/ ${coreutils}/bin/ 28 ''; 29 30 makeFlags = [ 31 "PREFIX=" 32 "DESTDIR=$(out)" 33 "ENABLE_SYSTEMD=1" 34 ]; 35 36 installTargets = [ 37 "install" 38 "install_udev_rules" 39 ]; 40 41 nativeBuildInputs = [ 42 pkg-config 43 udevCheckHook 44 ]; 45 buildInputs = [ systemd ]; 46 47 doInstallCheck = true; 48 49 meta = with lib; { 50 homepage = "https://github.com/Hummer12007/brightnessctl"; 51 description = "This program allows you read and control device brightness"; 52 license = licenses.mit; 53 maintainers = with maintainers; [ megheaiulian ]; 54 platforms = platforms.linux; 55 mainProgram = "brightnessctl"; 56 }; 57 58}