aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/applications/misc/slstatus/default.nix
blob: 6adf24f617c960bf097e7701966109d8166fe91c (plain)
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, fetchgit, pkgconfig, writeText, libX11, conf ? null, patches ? [] }:

with stdenv.lib;

stdenv.mkDerivation rec {
  pname = "slstatus";
  version = "unstable-2019-02-16";

  src = fetchgit {
    url = "https://git.suckless.org/slstatus";
    rev = "b14e039639ed28005fbb8bddeb5b5fa0c93475ac";
    sha256 = "0kayyhpmppybhwndxgabw48wsk9v8x9xdb05xrly9szkw3jbvgw4";
  };

  configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
  preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";

  inherit patches;

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ libX11 ];

  installFlags = [ "PREFIX=$(out)" ];

  meta = {
    homepage = "https://tools.suckless.org/slstatus/";
    description = "status monitor for window managers that use WM_NAME like dwm";
    license = licenses.isc;
    maintainers = with maintainers; [ oxzi ];
    platforms = platforms.linux;
  };
}