Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
79 lines
2.0 KiB
Nix
79 lines
2.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchzip,
|
|
libX11,
|
|
libXinerama,
|
|
libXft,
|
|
writeText,
|
|
pkg-config,
|
|
# customization
|
|
config,
|
|
conf ? config.dwm.conf or null,
|
|
patches ? config.dwm.patches or [ ],
|
|
extraLibs ? config.dwm.extraLibs or [ ],
|
|
# update script dependencies
|
|
gitUpdater,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "dwm";
|
|
version = "6.6";
|
|
|
|
src = fetchzip {
|
|
url = "https://dl.suckless.org/dwm/dwm-${finalAttrs.version}.tar.gz";
|
|
hash = "sha256-fD97OpObSOBTAMc3teejS0u2h4hCkMVYJrNZ6F4IaFs=";
|
|
};
|
|
|
|
nativeBuildInputs = lib.optional stdenv.hostPlatform.isStatic pkg-config;
|
|
|
|
buildInputs = [
|
|
libX11
|
|
libXinerama
|
|
libXft
|
|
]
|
|
++ extraLibs;
|
|
|
|
preBuild = ''
|
|
makeFlagsArray+=(
|
|
"PREFIX=$out"
|
|
"CC=$CC"
|
|
${lib.optionalString stdenv.hostPlatform.isStatic ''
|
|
LDFLAGS="$(${stdenv.cc.targetPrefix}pkg-config --static --libs x11 xinerama xft)"
|
|
''}
|
|
)
|
|
'';
|
|
|
|
# Allow users set their own list of patches
|
|
inherit patches;
|
|
|
|
# Allow users to set the config.def.h file containing the configuration
|
|
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";
|
|
|
|
passthru.updateScript = gitUpdater {
|
|
url = "git://git.suckless.org/dwm";
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://dwm.suckless.org/";
|
|
description = "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 = lib.licenses.mit;
|
|
platforms = lib.platforms.all;
|
|
mainProgram = "dwm";
|
|
};
|
|
})
|