dwm-git: 20180602 -> 20200303

This commit is contained in:
Ivan Kovnatsky 2021-01-01 19:58:30 +02:00 committed by Cole Helbling
parent d7201401f1
commit 8d1f23cdd3

View File

@ -1,16 +1,14 @@
{ lib, stdenv, fetchgit, libX11, libXinerama, libXft, patches ? [], conf ? null }: { lib, stdenv, fetchgit, libX11, libXinerama, libXft, writeText, patches ? [ ]
, conf ? null }:
let
name = "dwm-git-20180602";
in
stdenv.mkDerivation { stdenv.mkDerivation {
inherit name; pname = "dwm-git";
version = "20200303";
src = fetchgit { src = fetchgit {
url = "git://git.suckless.org/dwm"; url = "git://git.suckless.org/dwm";
rev = "b69c870a3076d78ab595ed1cd4b41cf6b03b2610"; rev = "61bb8b2241d4db08bea4261c82e27cd9797099e7";
sha256 = "10i079h79l4gdch1qy2vrrb2xxxkgkjmgphr5r9a75jbbagwvz0k"; sha256 = "1j3vly8dln35vnwnwwlaa8ql9fmnlmrv43jcyc8dbfhfxiw6f34l";
}; };
buildInputs = [ libX11 libXinerama libXft ]; buildInputs = [ libX11 libXinerama libXft ];
@ -20,12 +18,13 @@ 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 override the entire config file AFTER appying the patches # Allow users to set the config.def.h file containing the configuration
postPatch = lib.optionalString (conf!=null) '' postPatch = let
echo -n '${conf}' > config.def.h configFile = if lib.isDerivation conf || builtins.isPath conf then
''; conf
else
buildPhase = "make"; writeText "config.def.h" conf;
in lib.optionalString (conf != null) "cp ${configFile} config.def.h";
meta = with lib; { meta = with lib; {
homepage = "https://suckless.org/"; homepage = "https://suckless.org/";