Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brightnessctl: Add systemd support #79663

Merged
merged 2 commits into from
Feb 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions nixos/modules/hardware/brightnessctl.nix

This file was deleted.

1 change: 0 additions & 1 deletion nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
./hardware/acpilight.nix
./hardware/all-firmware.nix
./hardware/bladeRF.nix
./hardware/brightnessctl.nix
./hardware/brillo.nix
./hardware/ckb-next.nix
./hardware/cpu/amd-microcode.nix
Expand Down
6 changes: 6 additions & 0 deletions nixos/modules/rename.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ with lib;
instead, or any other display manager in NixOS as they all support auto-login.
'')
(mkRemovedOptionModule [ "services" "dnscrypt-proxy" ] "Use services.dnscrypt-proxy2 instead")
(mkRemovedOptionModule ["hardware" "brightnessctl" ] ''
The brightnessctl module was removed because newer versions of
brightnessctl don't require the udev rules anymore (they can use the
systemd-logind API). Instead of using the module you can now
simply add the brightnessctl package to environment.systemPackages.
'')

# Do NOT add any option renames here, see top of the file
];
Expand Down
9 changes: 4 additions & 5 deletions pkgs/misc/brightnessctl/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, coreutils }:
{ stdenv, fetchFromGitHub, pkg-config, systemd }:

stdenv.mkDerivation rec {
pname = "brightnessctl";
Expand All @@ -11,11 +11,10 @@ stdenv.mkDerivation rec {
sha256 = "0immxc7almmpg80n3bdn834p3nrrz7bspl2syhb04s3lawa5y2lq";
};

makeFlags = [ "PREFIX=" "DESTDIR=$(out)" ];
makeFlags = [ "PREFIX=" "DESTDIR=$(out)" "ENABLE_SYSTEMD=1" ];

postPatch = ''
substituteInPlace 90-brightnessctl.rules --replace /bin/ ${coreutils}/bin/
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [ systemd ];

meta = with stdenv.lib; {
homepage = "https://github.com/Hummer12007/brightnessctl";
Expand Down