git.iko.soy/typeable/nixpkgs
on master help sign in
illum: init at 0.4
commitd91b39b3f966cde10058d43ccc226e934b3c5e80 authorHannu Hartikainen <hannu.hartikainen@gmail.com> dateWed 25 Jan 2017, 18:25 (10 years ago) parent9e299ac
5 files changed+75
lib/maintainers.nix+1 nixos/modules/module-list.nix+1 nixos/modules/services/hardware/illum.nix+35 pkgs/tools/system/illum/default.nix+36 pkgs/top-level/all-packages.nix+2
lib/maintainers.nix+1
@@ -111,6 +111,7 @@
111111 cwoac = "Oliver Matthews <oliver@codersoffortune.net>";
112112 DamienCassou = "Damien Cassou <damien@cassou.me>";
113113 danbst = "Danylo Hlynskyi <abcz2.uprola@gmail.com>";
114+ dancek = "Hannu Hartikainen <hannu.hartikainen@gmail.com>";
114115 danielfullmer = "Daniel Fullmer <danielrf12@gmail.com>";
115116 dasuxullebt = "Christoph-Simon Senjak <christoph.senjak@googlemail.com>";
116117 davidak = "David Kleuker <post@davidak.de>";
nixos/modules/module-list.nix+1
@@ -197,6 +197,7 @@
197197 ./services/hardware/bluetooth.nix
198198 ./services/hardware/brltty.nix
199199 ./services/hardware/freefall.nix
200+ ./services/hardware/illum.nix
200201 ./services/hardware/irqbalance.nix
201202 ./services/hardware/nvidia-optimus.nix
202203 ./services/hardware/pcscd.nix
nixos/modules/services/hardware/illum.nixnew file+35
@@ -0,0 +1,35 @@
1+{ config, lib, pkgs, ... }:
2+
3+with lib;
4+
5+let
6+ cfg = config.services.illum;
7+in {
8+
9+ options = {
10+
11+ services.illum = {
12+
13+ enable = mkOption {
14+ default = false;
15+ type = types.bool;
16+ description = ''
17+ Enable illum, a daemon for controlling screen brightness with brightness buttons.
18+ '';
19+ };
20+
21+ };
22+
23+ };
24+
25+ config = mkIf cfg.enable {
26+
27+ systemd.services.illum = {
28+ description = "Backlight Adjustment Service";
29+ wantedBy = [ "multi-user.target" ];
30+ serviceConfig.ExecStart = "${pkgs.illum}/bin/illum-d";
31+ };
32+
33+ };
34+
35+}
pkgs/tools/system/illum/default.nixnew file+36
@@ -0,0 +1,36 @@
1+{ stdenv, fetchgit, pkgconfig, ninja, libevdev, libev }:
2+
3+stdenv.mkDerivation rec {
4+ version = "0.4";
5+ name = "illum-${version}";
6+
7+ src = fetchgit {
8+ url = "https://github.com/jmesmon/illum.git";
9+ fetchSubmodules = true;
10+ rev = "48ce8631346b1c88a901a8e4fa5fa7e8ffe8e418";
11+ sha256 = "05v3hz7n6b1mlhc6zqijblh1vpl0ja1y8y0lafw7mjdz03wxhfdb";
12+ };
13+
14+ buildInputs = [ pkgconfig ninja libevdev libev ];
15+
16+ configurePhase = ''
17+ bash ./configure
18+ '';
19+
20+ buildPhase = ''
21+ ninja
22+ '';
23+
24+ installPhase = ''
25+ mkdir -p $out/bin
26+ mv illum-d $out/bin
27+ '';
28+
29+ meta = {
30+ homepage = https://github.com/jmesmon/illum;
31+ description = "Daemon that wires button presses to screen backlight level";
32+ platforms = stdenv.lib.platforms.linux;
33+ maintainers = [ stdenv.lib.maintainers.dancek ];
34+ license = stdenv.lib.licenses.agpl3;
35+ };
36+}
pkgs/top-level/all-packages.nix+2
@@ -17545,6 +17545,8 @@ with pkgs;
1754517545
1754617546 hplipWithPlugin_3_15_9 = hplip_3_15_9.override { withPlugin = true; };
1754717547
17548+ illum = callPackage ../tools/system/illum { };
17549+
1754817550 # using the new configuration style proposal which is unstable
1754917551 jack1 = callPackage ../misc/jackaudio/jack1.nix { };
1755017552