2021-01-17 00:15:33 +00:00
|
|
|
{lib, stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [], conf ? null}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
name = "dwm-6.2";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit name;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://dl.suckless.org/dwm/${name}.tar.gz";
|
|
|
|
sha256 = "03hirnj8saxnsfqiszwl2ds7p0avg20izv9vdqyambks00p2x44p";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libX11 libXinerama libXft ];
|
|
|
|
|
|
|
|
prePatch = ''sed -i "s@/usr/local@$out@" config.mk'';
|
|
|
|
|
|
|
|
# Allow users set their own list of patches
|
|
|
|
inherit patches;
|
|
|
|
|
2020-09-25 04:45:31 +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";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://suckless.org/";
|
|
|
|
description = "Dynamic window manager for X";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [viric];
|
|
|
|
platforms = with lib.platforms; all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|