commit c4b954276b093959f8a5b0f1a12301a369742f0b
parent 39eb13851a16fd5b4924afc8954e062a1baa48d9
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Sun, 11 Oct 2020 12:13:47 +0300
Add tdhgis
Diffstat:
3 files changed, 92 insertions(+), 0 deletions(-)
diff --git a/pkgs/applications/tdh/base.nix b/pkgs/applications/tdh/base.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchgdrive, unzip, wxGTK30
+, pname, version, id, sha256, description, homepage }:
+
+stdenv.mkDerivation {
+ inherit pname version;
+
+ src = fetchgdrive {
+ inherit id sha256;
+ name = "${pname}_linux64.zip";
+ };
+
+ unpackPhase = "${unzip}/bin/unzip $src";
+
+ dontConfigure = true;
+ dontBuild = true;
+ dontStrip = true;
+ dontPatchELF = true;
+
+ installPhase = ''
+ [ -f ${pname} ] && install -Dm755 ${pname} -t $out/bin
+ [ -f ${pname}_linux ] && install -Dm755 ${pname}_linux $out/bin/${pname}
+ install -Dm644 libTdhCairo.so -t $out/lib
+ install -Dm644 *.{pdf,txt} -t $out/share/doc/${pname}
+ install -dm755 $out/share/${pname}
+ cp -r *_Structure $out/share/${pname}
+ '';
+
+ postFixup = with stdenv.lib; ''
+ patchelf --replace-needed "./libTdhCairo.so" libTdhCairo.so $out/bin/${pname}
+
+ patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+ --set-rpath "$out/lib:${makeLibraryPath [ stdenv.cc.cc.lib wxGTK30 ]}" \
+ $out/bin/${pname}
+ '';
+
+ preferLocalBuild = true;
+
+ meta = with stdenv.lib; {
+ inherit description homepage;
+ license = licenses.cc-by-nc-sa-40;
+ maintainers = with maintainers; [ sikmir ];
+ platforms = [ "x86_64-linux" ];
+ skip.ci = true;
+ };
+}
diff --git a/pkgs/applications/tdh/default.nix b/pkgs/applications/tdh/default.nix
@@ -0,0 +1,46 @@
+{ callPackage, wxGTK30, gcc7Stdenv }:
+let
+ # Fix mismatch between the program and library build versions
+ wxGTK30_gcc7 = wxGTK30.override { stdenv = gcc7Stdenv; compat26 = false; };
+in
+{
+ cad = callPackage ./base.nix {
+ pname = "TdhCad";
+ version = "20.09.28";
+ description = "Vector Graphics and Charting";
+ homepage = "https://www.tdhcad.com";
+ id = "1YMbTKKQH7yULilkrr1jpxEYWkBU_qBzB";
+ sha256 = "0764i3n2hb23r8bgab14p0w4qmiqj05wi43qxaz0w3wa3zzgrqsi";
+ wxGTK30 = wxGTK30_gcc7;
+ };
+
+ gis = callPackage ./base.nix {
+ pname = "TdhGIS";
+ version = "20.08.28";
+ description = "Vector Based Spatial Analysis";
+ homepage = "https://www.tdhgis.com";
+ id = "1T7onw2LCO4ykIGbQnm8WrbG-FIN8c_EK";
+ sha256 = "0mzh53l8i44pz1xs95cr4cqhkan27y7szi6fs9xhkh3pqgjp5810";
+ wxGTK30 = wxGTK30_gcc7;
+ };
+
+ gisnet = callPackage ./base.nix {
+ pname = "TdhGISnet";
+ version = "20.08.17";
+ description = "Shortest Path Analysis / Route Optimization";
+ homepage = "https://sites.google.com/tdhgis.com/tdhgisnet";
+ id = "1wML0dU-bloP3dAnvhXKu0Pati4iMS5IU";
+ sha256 = "014a9svb00l1km563nzizmy60k0ly517zrf5wxv3cqf16fngdlpr";
+ wxGTK30 = wxGTK30_gcc7;
+ };
+
+ net = callPackage ./base.nix {
+ pname = "TdhNet";
+ version = "20.04.30";
+ description = "Hydraulic Modeling for Water Distribution Systems";
+ homepage = "https://www.tdhnet.com";
+ id = "1u3sVMxDavVLUfHc0XRGUKAGNMpb7CH1K";
+ sha256 = "0l9ph40gj4hk3g1zyb1bsgnkna2vhl9wwqzkvcsx2wckzxd4cmw7";
+ wxGTK30 = wxGTK30_gcc7;
+ };
+}
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -40,6 +40,7 @@ lib.makeScope newScope (
inherit sources;
};
sasplanet = callPackage ./applications/sasplanet { };
+ tdh = callPackage ./applications/tdh { };
visualgps = libsForQt5.callPackage ./applications/visualgps { };
wireguard-statusbar = callPackage ./applications/wireguard-statusbar { };