From 41946d967fdd6dded82998156d8baf1ca64c1a8e Mon Sep 17 00:00:00 2001 From: mlatus Date: Sun, 24 Nov 2019 23:53:54 +0800 Subject: [PATCH] fix glava wants to load shaders from /etc/xdg/glava --- pkgs/applications/misc/glava/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/glava/default.nix b/pkgs/applications/misc/glava/default.nix index 6f5146161a6d..519df42c789a 100644 --- a/pkgs/applications/misc/glava/default.nix +++ b/pkgs/applications/misc/glava/default.nix @@ -8,7 +8,7 @@ let wrapperScript = writeScript "glava" '' #!${runtimeShell} case "$1" in - --copy-config) + --copy-config|-C) # The binary would symlink it, which won't work in Nix because the # garbage collector will eventually remove the original files after # updates @@ -45,6 +45,14 @@ in ]; preConfigure = '' + for f in $(find -type f);do + substituteInPlace $f \ + --replace /etc/xdg $out/etc/xdg + done + + substituteInPlace Makefile \ + --replace '$(DESTDIR)$(SHADERDIR)' '$(SHADERDIR)' + substituteInPlace Makefile \ --replace 'unknown' 'v${version}'