Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bd3c84030150
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 003c20e02cff
Choose a head ref
  • 5 commits
  • 3 files changed
  • 3 contributors

Commits on Oct 1, 2018

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    marsam Mario Rodas
    Copy the full SHA
    c78cda2 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5cc251d View commit details
  3. Copy the full SHA
    6b68e6d View commit details
  4. Copy the full SHA
    7180706 View commit details

Commits on Oct 6, 2018

  1. Merge pull request #47554 from dtzWill/update/light-1.2

    light: 1.1.2 -> 1.2, use new udev support instead of setuid wrapper.
    dtzWill authored Oct 6, 2018
    Copy the full SHA
    003c20e View commit details
Showing with 24 additions and 10 deletions.
  1. +8 −0 nixos/doc/manual/release-notes/rl-1903.xml
  2. +3 −2 nixos/modules/programs/light.nix
  3. +13 −8 pkgs/os-specific/linux/light/default.nix
8 changes: 8 additions & 0 deletions nixos/doc/manual/release-notes/rl-1903.xml
Original file line number Diff line number Diff line change
@@ -105,6 +105,14 @@
<varname>rabbitmq-server</varname>.
</para>
</listitem>
<listitem>
<para>
The <literal>light</literal> module no longer uses setuid binaries, but
udev rules. As a consequence users of that module have to belong to the
<literal>video</literal> group in order to use the executable
(i.e. <literal>users.users.yourusername.extraGroups = ["video"];</literal>).
</para>
</listitem>
</itemizedlist>
</section>

5 changes: 3 additions & 2 deletions nixos/modules/programs/light.nix
Original file line number Diff line number Diff line change
@@ -13,14 +13,15 @@ in
default = false;
type = types.bool;
description = ''
Whether to install Light backlight control with setuid wrapper.
Whether to install Light backlight control command
and udev rules granting access to members of the "video" group.
'';
};
};
};

config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.light ];
security.wrappers.light.source = "${pkgs.light.out}/bin/light";
services.udev.packages = [ pkgs.light ];
};
}
21 changes: 13 additions & 8 deletions pkgs/os-specific/linux/light/default.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
{ stdenv, fetchFromGitHub, help2man }:
{ stdenv, fetchFromGitHub, autoreconfHook, coreutils }:

stdenv.mkDerivation rec {
version = "1.1.2";
version = "1.2";
name = "light-${version}";
src = fetchFromGitHub {
owner = "haikarainen";
repo = "light";
rev = version;
sha256 = "0c934gxav9cgdf94li6dp0rfqmpday9d33vdn9xb2mfp4war9n4w";
rev = "v${version}";
sha256 = "1h286va0r1xgxlnxfaaarrj3qhxmjjsivfn3khwm0wq1mhkfihra";
};

buildInputs = [ help2man ];
configureFlags = [ "--with-udev" ];

installPhase = "mkdir -p $out/bin; cp light $out/bin/";
nativeBuildInputs = [ autoreconfHook ];

preFixup = "make man; mkdir -p $out/man/man1; mv light.1.gz $out/man/man1";
# ensure udev rules can find the commands used
postPatch = ''
substituteInPlace 90-backlight.rules \
--replace '/bin/chgrp' '${coreutils}/bin/chgrp' \
--replace '/bin/chmod' '${coreutils}/bin/chmod'
'';

meta = {
description = "GNU/Linux application to control backlights";
homepage = https://haikarainen.github.io/light/;
license = stdenv.lib.licenses.gpl3;
maintainers = with stdenv.lib.maintainers; [ puffnfresh ];
maintainers = with stdenv.lib.maintainers; [ puffnfresh dtzWill ];
platforms = stdenv.lib.platforms.linux;
};
}