@@ -1,34 +1,46 @@
1−{lib, stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [], conf ? null}:
1+{ lib, stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [ ], conf ? null}:
22
3−with lib;
4−
5−let
6− name = "dwm-6.2";
7−in
8−stdenv.mkDerivation {
9− inherit name;
3+stdenv.mkDerivation rec {
4+ pname = "dwm";
5+ version = "6.2";
106
117 src = fetchurl {
12− url = "https://dl.suckless.org/dwm/${name}.tar.gz";
8+ url = "https://dl.suckless.org/dwm/${pname}-${version}.tar.gz";
139 sha256 = "03hirnj8saxnsfqiszwl2ds7p0avg20izv9vdqyambks00p2x44p";
1410 };
1511
1612 buildInputs = [ libX11 libXinerama libXft ];
1713
18− prePatch = ''sed -i "s@/usr/local@$out@" config.mk'';
14+ prePatch = ''
15+ sed -i "s@/usr/local@$out@" config.mk
16+ '';
1917
2018 # Allow users set their own list of patches
2119 inherit patches;
2220
2321 # Allow users to set the config.def.h file containing the configuration
24− postPatch = let configFile = if isDerivation conf || builtins.isPath conf then conf else writeText "config.def.h" conf;
25− in optionalString (conf!=null) "cp ${configFile} config.def.h";
26−
27− meta = {
28− homepage = "https://suckless.org/";
29− description = "Dynamic window manager for X";
30− license = lib.licenses.mit;
31− maintainers = with lib.maintainers; [viric];
32− platforms = with lib.platforms; all;
22+ postPatch =
23+ let
24+ configFile =
25+ if lib.isDerivation conf || builtins.isPath conf
26+ then conf else writeText "config.def.h" conf;
27+ in
28+ lib.optionalString (conf != null) "cp ${configFile} config.def.h";
29+
30+ meta = with lib; {
31+ homepage = "https://dwm.suckless.org/";
32+ description = "An extremely fast, small, and dynamic window manager for X";
33+ longDescription = ''
34+ dwm is a dynamic window manager for X. It manages windows in tiled,
35+ monocle and floating layouts. All of the layouts can be applied
36+ dynamically, optimising the environment for the application in use and the
37+ task performed.
38+ Windows are grouped by tags. Each window can be tagged with one or
39+ multiple tags. Selecting certain tags displays all windows with these
40+ tags.
41+ '';
42+ license = licenses.mit;
43+ maintainers = with maintainers; [ viric ];
44+ platforms = platforms.all;
3345 };
3446}