brightnessctl: init at 0.3.2 (#42102)

* brightnessctl: init at 0.3.2

* Revised PR
This commit is contained in:
dje4321 2018-06-16 17:15:42 -05:00 committed by Matthew Justin Bauer
parent abdbb38d03
commit 1b7ce4c6d5
5 changed files with 67 additions and 0 deletions

View file

@ -78,6 +78,11 @@
github = "DmitryTsygankov";
name = "Dmitry Tsygankov";
};
Dje4321 = {
email = "dje4321@gmail.com";
github = "dje4321";
name = "Dje4321";
};
Esteth = {
email = "adam.copp@gmail.com";
name = "Adam Copp";

View file

@ -0,0 +1,30 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.hardware.brightnessctl;
in
{
options = {
hardware.brightnessctl = {
enable = mkOption {
default = false;
type = types.bool;
description = ''
Enable brightnessctl in userspace.
This will allow brightness control from users in the video group.
'';
};
};
};
config = mkIf cfg.enable {
services.udev.packages = with pkgs; [ brightnessctl ];
};
}

View file

@ -29,6 +29,7 @@
./config/vpnc.nix
./config/zram.nix
./hardware/all-firmware.nix
./hardware/brightnessctl.nix
./hardware/ckb.nix
./hardware/cpu/amd-microcode.nix
./hardware/cpu/intel-microcode.nix

View file

@ -0,0 +1,29 @@
{ stdenv, fetchFromGitHub, coreutils }:
stdenv.mkDerivation rec {
name = "brightnessctl-${version}";
version = "0.3.2";
src = fetchFromGitHub {
owner = "Hummer12007";
repo = "brightnessctl";
rev = "${version}";
sha256 = "0amxhcikcgj04z81272kz35m5h5q4jx9x7v71h8yl1rv4b2lzh7z";
};
makeFlags = "MODE=0 PREFIX=/ DESTDIR=$(out)";
patchPhase = ''
substituteInPlace 90-brightnessctl.rules --replace /bin/ ${coreutils}/bin/
substituteInPlace 90-brightnessctl.rules --replace %k '*'
'';
meta = {
homepage = "https://github.com/Hummer12007/brightnessctl";
maintainers = [ stdenv.lib.maintainers.Dje4321 ];
license = stdenv.lib.licenses.mit;
description = "This program allows you read and control device brightness";
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -20729,6 +20729,8 @@ with pkgs;
brgenml1cupswrapper = callPackage ../misc/cups/drivers/brgenml1cupswrapper {};
brightnessctl = callPackage ../misc/brightnessctl { };
calaos_installer = libsForQt5.callPackage ../misc/calaos/installer {};
click = callPackage ../applications/networking/cluster/click { };