Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 33 lines 862 B view raw
1{ lib, stdenv, fetchFromGitHub, pkg-config, systemd }: 2 3stdenv.mkDerivation rec { 4 pname = "brightnessctl"; 5 version = "0.5.1"; 6 7 src = fetchFromGitHub { 8 owner = "Hummer12007"; 9 repo = "brightnessctl"; 10 rev = version; 11 sha256 = "0immxc7almmpg80n3bdn834p3nrrz7bspl2syhb04s3lawa5y2lq"; 12 }; 13 14 postPatch = '' 15 substituteInPlace Makefile \ 16 --replace "pkg-config" "$PKG_CONFIG" 17 ''; 18 19 makeFlags = [ "PREFIX=" "DESTDIR=$(out)" "ENABLE_SYSTEMD=1" ]; 20 21 nativeBuildInputs = [ pkg-config ]; 22 buildInputs = [ systemd ]; 23 24 meta = with lib; { 25 homepage = "https://github.com/Hummer12007/brightnessctl"; 26 description = "This program allows you read and control device brightness"; 27 license = licenses.mit; 28 maintainers = with maintainers; [ megheaiulian ]; 29 platforms = platforms.linux; 30 mainProgram = "brightnessctl"; 31 }; 32 33}