2021-02-13 14:23:35 +00:00
|
|
|
{ lib, stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [ ], conf ? null}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dwm";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "6.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-13 14:23:35 +00:00
|
|
|
url = "https://dl.suckless.org/dwm/${pname}-${version}.tar.gz";
|
2022-10-21 18:38:19 +00:00
|
|
|
sha256 = "sha256-+pwNaaWESFB2z8GICf1wXlwggNr7E9XnKaNkbKdwOm4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libX11 libXinerama libXft ];
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
prePatch = ''
|
|
|
|
sed -i "s@/usr/local@$out@" config.mk
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# 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
|
2021-02-13 14:23:35 +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-14 22:03:04 +00:00
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
|
|
|
|
2021-02-13 14:23:35 +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-29 03:34:57 +00:00
|
|
|
maintainers = with maintainers; [ viric neonfuz ];
|
2021-02-13 14:23:35 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|