summary refs log tree commit diff
path: root/pkgs/applications/misc/slstatus/default.nix
blob: 5c13cbf866940ddb75cefe5af4a2a32372f5a927 (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
{ stdenv, fetchgit, pkgconfig, writeText, libX11, conf ? null }:

with stdenv.lib;

stdenv.mkDerivation rec {
  pname = "slstatus";
  version = "unstable-2018-04-16";

  src = fetchgit {
    url = "https://git.suckless.org/slstatus";
    rev = "97ef7c2a1d67bb2c9c379e657fbc8e35acd6aafb";
    sha256 = "1777hgl10imk0l2sgnqgbkfchv1mpxrd82ninzwp7f1rgwchz36v";
  };

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

  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; [ geistesk ];
    platforms = platforms.linux;
  };
}