2024-04-21 15:54:59 +00:00
|
|
|
{ lib, stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [ ], conf ? null
|
|
|
|
# update script dependencies
|
|
|
|
, gitUpdater
|
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dwm";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "6.5";
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-Ideev6ny+5MUGDbCZmy4H0eExp1k5/GyNS+blwuglyk=";
|
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" ];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
url = "git://git.suckless.org/dwm";
|
|
|
|
};
|
|
|
|
|
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;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "dwm";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|