diff options
author | Lassulus <github@lassul.us> | 2020-09-10 20:40:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 20:40:53 +0200 |
commit | 34f475f5eae13d18b4e4b8a17aa7a772d8619b0b (patch) | |
tree | d2e824eba808a1af9a914b13f6ce178e47d95f87 /pkgs/applications/window-managers | |
parent | d5d6bd7f0857d8c277a3eb99a453e7818b76f646 (diff) | |
parent | 1275f71c0dc14d4ab46d8d7418eaa2846b163c68 (diff) |
Merge pull request #94115 from syberant/master
dwm: add conf option
Diffstat (limited to 'pkgs/applications/window-managers')
-rw-r--r-- | pkgs/applications/window-managers/dwm/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/applications/window-managers/dwm/default.nix b/pkgs/applications/window-managers/dwm/default.nix index 8f9c28c78511..455e3249adf7 100644 --- a/pkgs/applications/window-managers/dwm/default.nix +++ b/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/"; |