commit 9427d462601ea47ed4512e50891b0c6a2dd68b4d
parent dcf5e7ae3ba7d6d0d3bb0608be94995950001ce6
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Mon, 23 Nov 2020 23:57:26 +0300
tdhgis: redirect config folder
Diffstat:
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/pkgs/applications/gis/tdh/base.nix b/pkgs/applications/gis/tdh/base.nix
@@ -1,4 +1,5 @@
{ stdenv, fetchgdrive, unzip, wxGTK30
+, makeWrapper, libredirect
, pname, version, id, sha256, description, homepage }:
stdenv.mkDerivation {
@@ -9,10 +10,10 @@ stdenv.mkDerivation {
name = "${pname}_linux64.zip";
};
- unpackPhase = "${unzip}/bin/unzip $src";
+ sourceRoot = ".";
+
+ nativeBuildInputs = [ makeWrapper unzip ];
- dontConfigure = true;
- dontBuild = true;
dontStrip = true;
dontPatchELF = true;
@@ -31,6 +32,10 @@ stdenv.mkDerivation {
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath "$out/lib:${makeLibraryPath [ stdenv.cc.cc.lib wxGTK30 ]}" \
$out/bin/${pname}
+
+ wrapProgram $out/bin/${pname} \
+ --set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
+ --set NIX_REDIRECTS "$out/bin/${pname}_Structure=$out/share/${pname}/${pname}_Structure"
'';
preferLocalBuild = true;