19 , enableXWayland ? true
23 stdenv.mkDerivation (finalAttrs: {
27 src = fetchFromGitHub {
30 rev = "v${finalAttrs.version}";
31 hash = "sha256-OW7K7yMYSzqZWpQ9Vmpy8EgdWvyv3q1uh8A40f6AQF4=";
48 ] ++ lib.optionals enableXWayland [
54 outputs = [ "out" "man" ];
56 # Allow users to set an alternative config.def.h
58 configFile = if lib.isDerivation conf || builtins.isPath conf
60 else writeText "config.def.h" conf;
61 in lib.optionalString (conf != null) "cp ${configFile} config.def.h";
64 "PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config"
65 "WAYLAND_SCANNER=wayland-scanner"
67 "MANDIR=$(man)/share/man"
72 XWAYLAND=${lib.optionalString enableXWayland "-DXWAYLAND"}
73 XLIBS=${lib.optionalString enableXWayland "xcb\\ xcb-icccm"}
78 homepage = "https://github.com/djpohly/dwl/";
79 description = "Dynamic window manager for Wayland";
81 dwl is a compact, hackable compositor for Wayland based on wlroots. It is
82 intended to fill the same space in the Wayland world that dwm does in X11,
83 primarily in terms of philosophy, and secondarily in terms of
84 functionality. Like dwm, dwl is:
86 - Easy to understand, hack on, and extend with patches
87 - One C source file (or a very small number) configurable via config.h
88 - Limited to 2000 SLOC to promote hackability
89 - Tied to as few external dependencies as possible
91 changelog = "https://github.com/djpohly/dwl/releases/tag/v${finalAttrs.version}";
92 license = lib.licenses.gpl3Only;
93 maintainers = [ lib.maintainers.AndersonTorres ];
94 inherit (wayland.meta) platforms;
97 # TODO: custom patches from upstream website