about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/blucontrol/wrapper.nix
blob: c0c76b4ef49d25fcd4c3566f21ec68f8887362cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, lib, makeWrapper, ghcWithPackages, packages ? (_:[]) }:
let
  blucontrolEnv = ghcWithPackages (self: [ self.blucontrol ] ++ packages self);
in
  stdenv.mkDerivation {
    pname = "blucontrol-with-packages";
    version = blucontrolEnv.version;

    nativeBuildInputs = [ makeWrapper ];

    buildCommand = ''
      makeWrapper ${blucontrolEnv}/bin/blucontrol $out/bin/blucontrol \
        --prefix PATH : ${lib.makeBinPath [ blucontrolEnv ]}
    '';

    # trivial derivation
    preferLocalBuild = true;
    allowSubstitues = false;

    meta = with lib; {
      description = "Configurable blue light filter";
      longDescription = ''
        This application is a blue light filter, with the main focus on configurability.
        Configuration is done in Haskell in the style of xmonad.
        Blucontrol makes use of monad transformers and allows monadic calculation of gamma values and recoloring. The user chooses, what will be captured in the monadic state.
      '';
      license = licenses.bsd3;
      homepage = "https://github.com/jumper149/blucontrol";
      platforms = platforms.unix;
      maintainers = with maintainers; [ jumper149 ];
    };
  }