2021-02-09 14:51:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [ ], conf ? null}:
|
2020-07-29 00:17:52 +01:00
|
|
|
|
2021-02-09 14:51:56 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dwm";
|
|
|
|
version = "6.2";
|
2019-02-03 15:30:10 +00:00
|
|
|
|
2008-08-21 21:44:08 +01:00
|
|
|
src = fetchurl {
|
2021-02-09 14:51:56 +00:00
|
|
|
url = "https://dl.suckless.org/dwm/${pname}-${version}.tar.gz";
|
2019-02-07 10:40:16 +00:00
|
|
|
sha256 = "03hirnj8saxnsfqiszwl2ds7p0avg20izv9vdqyambks00p2x44p";
|
2008-08-21 21:44:08 +01: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
|
|
|
|
2021-02-09 14:51:56 +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-29 00:17:52 +01:00
|
|
|
# Allow users to set the config.def.h file containing the configuration
|
2021-02-09 14:51:56 +00:00
|
|
|
postPatch =
|
|
|
|
let
|
|
|
|
configFile =
|
|
|
|
if lib.isDerivation conf || builtins.isPath conf
|
|
|
|
then conf else writeText "config.def.h" conf;
|
|
|
|
in
|
|
|
|
lib.optionalString (conf != null) "cp ${configFile} config.def.h";
|
|
|
|
|
2021-07-07 21:35:28 +01:00
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
|
|
|
|
2021-02-09 14:51:56 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://dwm.suckless.org/";
|
|
|
|
description = "An extremely fast, small, and dynamic window manager for X";
|
|
|
|
longDescription = ''
|
|
|
|
dwm is a dynamic window manager for X. It manages windows in tiled,
|
|
|
|
monocle and floating layouts. All of the layouts can be applied
|
|
|
|
dynamically, optimising the environment for the application in use and the
|
|
|
|
task performed.
|
|
|
|
Windows are grouped by tags. Each window can be tagged with one or
|
|
|
|
multiple tags. Selecting certain tags displays all windows with these
|
|
|
|
tags.
|
|
|
|
'';
|
|
|
|
license = licenses.mit;
|
2021-05-28 19:06:29 +01:00
|
|
|
maintainers = with maintainers; [ viric neonfuz ];
|
2021-02-09 14:51:56 +00:00
|
|
|
platforms = platforms.all;
|
2010-03-05 21:49:29 +00:00
|
|
|
};
|
2008-08-21 21:44:08 +01:00
|
|
|
}
|