dwm: add conf option
Allow users to set their own config.def.h configuration file for dwm.
This commit is contained in:
parent
5ae739c10e
commit
1371d3df8a
@ -1,4 +1,6 @@
|
|||||||
{stdenv, fetchurl, libX11, libXinerama, libXft, patches ? []}:
|
{stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [], conf ? null}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
name = "dwm-6.2";
|
name = "dwm-6.2";
|
||||||
@ -18,6 +20,10 @@ stdenv.mkDerivation {
|
|||||||
# Allow users set their own list of patches
|
# Allow users set their own list of patches
|
||||||
inherit patches;
|
inherit patches;
|
||||||
|
|
||||||
|
# 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";
|
||||||
|
|
||||||
buildPhase = " make ";
|
buildPhase = " make ";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user