about summary refs log tree commit diff
path: root/pkgs/profpatsch/backlight/default.nix
blob: d2f40be0c890193da388eb742143d5bd1a7d26b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{ stdenv, python3, xbacklight}:

stdenv.mkDerivation rec {
  name = "backlight";

  src = ./backlight.py;
  phases = [ "installPhase" "fixupPhase" ];

  buildInputs = [ python3 ];

  installPhase = ''
    install -D ${src} $out/bin/backlight
    substituteInPlace $out/bin/backlight \
      --replace '"xbacklight"' '"${xbacklight}/bin/xbacklight"'
  '';

}