2023-02-15 22:10:18 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchgit
|
|
|
|
, pkg-config
|
|
|
|
, writeText
|
|
|
|
, libX11
|
|
|
|
, libXau
|
|
|
|
, libXdmcp
|
|
|
|
, conf ? null
|
|
|
|
, patches ? []
|
|
|
|
}:
|
2018-03-23 16:02:53 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "slstatus";
|
2020-07-09 00:12:18 +00:00
|
|
|
version = "unstable-2019-02-16";
|
2018-03-23 16:02:53 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
2020-04-01 01:11:51 +00:00
|
|
|
url = "https://git.suckless.org/slstatus";
|
2020-07-09 00:12:18 +00:00
|
|
|
rev = "b14e039639ed28005fbb8bddeb5b5fa0c93475ac";
|
|
|
|
sha256 = "0kayyhpmppybhwndxgabw48wsk9v8x9xdb05xrly9szkw3jbvgw4";
|
2018-03-23 16:02:53 +00:00
|
|
|
};
|
|
|
|
|
2023-01-24 16:29:20 +00:00
|
|
|
configFile = lib.optionalString (conf!=null) (writeText "config.def.h" conf);
|
2023-02-15 22:10:18 +00:00
|
|
|
preBuild = lib.optionalString (conf!=null) "cp ${configFile} config.def.h" + ''
|
|
|
|
makeFlagsArray+=(LDLIBS="-lX11 -lxcb -lXau -lXdmcp" CC=$CC)
|
|
|
|
'';
|
2018-03-23 16:02:53 +00:00
|
|
|
|
2020-07-09 00:12:18 +00:00
|
|
|
inherit patches;
|
|
|
|
|
2021-01-17 02:09:27 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2023-02-15 22:10:18 +00:00
|
|
|
buildInputs = [ libX11 libXau libXdmcp];
|
2021-11-13 12:32:53 +00:00
|
|
|
|
2018-03-23 16:02:53 +00:00
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
2023-01-24 16:29:20 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://tools.suckless.org/slstatus/";
|
2018-03-23 16:02:53 +00:00
|
|
|
description = "status monitor for window managers that use WM_NAME like dwm";
|
|
|
|
license = licenses.isc;
|
2020-08-15 13:25:59 +00:00
|
|
|
maintainers = with maintainers; [ oxzi ];
|
2018-03-23 16:02:53 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|