2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, systemd }:
|
2018-06-17 00:15:42 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "brightnessctl";
|
2020-02-06 06:21:26 +01:00
|
|
|
version = "0.5.1";
|
2018-06-17 00:15:42 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Hummer12007";
|
|
|
|
repo = "brightnessctl";
|
2019-09-09 01:38:31 +02:00
|
|
|
rev = version;
|
2020-02-06 06:21:26 +01:00
|
|
|
sha256 = "0immxc7almmpg80n3bdn834p3nrrz7bspl2syhb04s3lawa5y2lq";
|
2018-06-17 00:15:42 +02:00
|
|
|
};
|
|
|
|
|
2023-08-28 12:33:53 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "pkg-config" "$PKG_CONFIG"
|
|
|
|
'';
|
|
|
|
|
2019-10-24 14:54:40 +02:00
|
|
|
makeFlags = [ "PREFIX=" "DESTDIR=$(out)" "ENABLE_SYSTEMD=1" ];
|
2018-06-17 00:15:42 +02:00
|
|
|
|
2019-10-24 14:54:40 +02:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ systemd ];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-06-17 00:15:42 +02:00
|
|
|
homepage = "https://github.com/Hummer12007/brightnessctl";
|
|
|
|
description = "This program allows you read and control device brightness";
|
2018-11-01 10:08:43 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ megheaiulian ];
|
|
|
|
platforms = platforms.linux;
|
2023-08-04 14:55:12 +02:00
|
|
|
mainProgram = "brightnessctl";
|
2018-06-17 00:15:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|