Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitLab, 5 autoreconfHook, 6 coreutils, 7 udevCheckHook, 8}: 9 10stdenv.mkDerivation { 11 version = "1.2.2"; 12 pname = "light"; 13 14 src = fetchFromGitLab { 15 owner = "dpeukert"; 16 repo = "light"; 17 rev = "2a54078cbe3814105ee4f565f451b1b5947fbde0"; 18 hash = "sha256-OmHdVJvBcBjJiPs45JqOHxFoJYvKIEIpt9pFhBz74Kg="; 19 }; 20 21 configureFlags = [ "--with-udev" ]; 22 23 nativeBuildInputs = [ 24 autoreconfHook 25 udevCheckHook 26 ]; 27 28 patches = [ 29 ./0001-define-light-loglevel-as-extern.patch 30 ]; 31 32 # ensure udev rules can find the commands used 33 postPatch = '' 34 substituteInPlace 90-backlight.rules \ 35 --replace-fail '/bin/chgrp' '${coreutils}/bin/chgrp' \ 36 --replace-fail '/bin/chmod' '${coreutils}/bin/chmod' 37 ''; 38 39 doInstallCheck = true; 40 41 meta = { 42 description = "GNU/Linux application to control backlights"; 43 homepage = "https://gitlab.com/dpeukert/light"; 44 license = lib.licenses.gpl3Only; 45 mainProgram = "light"; 46 maintainers = with lib.maintainers; [ 47 puffnfresh 48 dtzWill 49 ]; 50 platforms = lib.platforms.linux; 51 }; 52}