diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/window-managers/dwm/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/window-managers/dwm/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/applications/window-managers/dwm/default.nix b/nixpkgs/pkgs/applications/window-managers/dwm/default.nix index 8f9c28c7851..455e3249adf 100644 --- a/nixpkgs/pkgs/applications/window-managers/dwm/default.nix +++ b/nixpkgs/pkgs/applications/window-managers/dwm/default.nix @@ -1,4 +1,6 @@ -{stdenv, fetchurl, libX11, libXinerama, libXft, patches ? []}: +{stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [], conf ? null}: + +with stdenv.lib; let name = "dwm-6.2"; @@ -18,7 +20,9 @@ stdenv.mkDerivation { # Allow users set their own list of patches inherit patches; - buildPhase = " make "; + # Allow users to set the config.def.h file containing the configuration + postPatch = let configFile = if isDerivation conf || builtins.isPath conf then conf else writeText "config.def.h" conf; + in optionalString (conf!=null) "cp ${configFile} config.def.h"; meta = { homepage = "https://suckless.org/"; |