2021-02-09 15:51:56 +01:00
|
|
|
{ lib, stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [ ], conf ? null}:
|
2020-07-29 01:17:52 +02:00
|
|
|
|
2021-02-09 15:51:56 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dwm";
|
|
|
|
version = "6.2";
|
2019-02-03 16:30:10 +01:00
|
|
|
|
2008-08-21 22:44:08 +02:00
|
|
|
src = fetchurl {
|
2021-02-09 15:51:56 +01:00
|
|
|
url = "https://dl.suckless.org/dwm/${pname}-${version}.tar.gz";
|
2019-02-07 11:40:16 +01:00
|
|
|
sha256 = "03hirnj8saxnsfqiszwl2ds7p0avg20izv9vdqyambks00p2x44p";
|
2008-08-21 22:44:08 +02:00
|
|
|
};
|
2019-02-03 16:30:10 +01:00
|
|
|
|
2015-11-11 17:09:45 +01:00
|
|
|
buildInputs = [ libX11 libXinerama libXft ];
|
2019-02-03 16:30:10 +01:00
|
|
|
|
2021-02-09 15:51:56 +01:00
|
|
|
prePatch = ''
|
|
|
|
sed -i "s@/usr/local@$out@" config.mk
|
|
|
|
'';
|
2010-03-05 22:49:29 +01:00
|
|
|
|
|
|
|
# Allow users set their own list of patches
|
2014-01-02 11:53:25 +01:00
|
|
|
inherit patches;
|
2010-03-05 22:49:29 +01:00
|
|
|
|
2020-07-29 01:17:52 +02:00
|
|
|
# Allow users to set the config.def.h file containing the configuration
|
2021-02-09 15:51:56 +01: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";
|
|
|
|
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ viric ];
|
|
|
|
platforms = platforms.all;
|
2010-03-05 22:49:29 +01:00
|
|
|
};
|
2008-08-21 22:44:08 +02:00
|
|
|
}
|