2021-02-09 14:51:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [ ], conf ? null}:
|
2020-07-28 23:17:52 +00:00
|
|
|
|
2021-02-09 14:51:56 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dwm";
|
2022-10-07 07:36:46 +00:00
|
|
|
version = "6.4";
|
2019-02-03 15:30:10 +00:00
|
|
|
|
2008-08-21 20:44:08 +00:00
|
|
|
src = fetchurl {
|
2021-02-09 14:51:56 +00:00
|
|
|
url = "https://dl.suckless.org/dwm/${pname}-${version}.tar.gz";
|
2022-10-07 07:36:46 +00:00
|
|
|
sha256 = "sha256-+pwNaaWESFB2z8GICf1wXlwggNr7E9XnKaNkbKdwOm4=";
|
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
|
|
|
|
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-28 23:17:52 +00: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 20:35:28 +00: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 18:06:29 +00: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 20:44:08 +00:00
|
|
|
}
|