2021-01-15 13:21:58 +00:00
|
|
|
{lib, stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [], conf ? null}:
|
2020-07-28 23:17:52 +00:00
|
|
|
|
2021-01-15 13:21:58 +00:00
|
|
|
with lib;
|
2010-03-05 21:49:29 +00:00
|
|
|
|
2013-04-04 21:32:53 +00:00
|
|
|
let
|
2019-02-07 10:40:16 +00:00
|
|
|
name = "dwm-6.2";
|
2013-04-04 21:32:53 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit name;
|
2019-02-03 15:30:10 +00:00
|
|
|
|
2008-08-21 20:44:08 +00:00
|
|
|
src = fetchurl {
|
2018-04-11 13:09:51 +00:00
|
|
|
url = "https://dl.suckless.org/dwm/${name}.tar.gz";
|
2019-02-07 10:40:16 +00:00
|
|
|
sha256 = "03hirnj8saxnsfqiszwl2ds7p0avg20izv9vdqyambks00p2x44p";
|
2008-08-21 20:44:08 +00:00
|
|
|
};
|
2019-02-03 15:30:10 +00:00
|
|
|
|
2015-11-11 16:09:45 +00:00
|
|
|
buildInputs = [ libX11 libXinerama libXft ];
|
2019-02-03 15:30:10 +00:00
|
|
|
|
2010-03-05 22:13:58 +00:00
|
|
|
prePatch = ''sed -i "s@/usr/local@$out@" config.mk'';
|
2010-03-05 21:49:29 +00:00
|
|
|
|
|
|
|
# Allow users set their own list of patches
|
2014-01-02 10:53:25 +00:00
|
|
|
inherit patches;
|
2010-03-05 21:49:29 +00:00
|
|
|
|
2020-07-28 23:17:52 +00:00
|
|
|
# Allow users to set the config.def.h file containing the configuration
|
|
|
|
postPatch = let configFile = if isDerivation conf || builtins.isPath conf then conf else writeText "config.def.h" conf;
|
|
|
|
in optionalString (conf!=null) "cp ${configFile} config.def.h";
|
|
|
|
|
2010-03-05 21:49:29 +00:00
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://suckless.org/";
|
2012-01-04 22:05:26 +00:00
|
|
|
description = "Dynamic window manager for X";
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [viric];
|
|
|
|
platforms = with lib.platforms; all;
|
2010-03-05 21:49:29 +00:00
|
|
|
};
|
2008-08-21 20:44:08 +00:00
|
|
|
}
|