nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 702eb4dde8fe1834c1b846aa2426a0a77c345d14
parent 185833861263c67015e4e0e97004ae2e4da9fe01
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Fri, 22 Oct 2021 16:06:29 +0300

Add orbisgis

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/geospatial/orbisgis/bin.nix | 40++++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -170,6 +170,7 @@ lib.makeScope newScope ( }; mbtiles2osmand = callPackage ./geospatial/mbtiles2osmand { }; mbutiles = callPackage ./geospatial/mbutiles { }; + orbisgis-bin = callPackage ./geospatial/orbisgis/bin.nix { jre = pkgs.jre8; }; polyvectorization = libsForQt5.callPackage ./geospatial/polyvectorization { }; py-staticmaps = callPackage ./geospatial/py-staticmaps { }; qgis-bin = callPackage ./geospatial/qgis/bin.nix { }; diff --git a/pkgs/geospatial/orbisgis/bin.nix b/pkgs/geospatial/orbisgis/bin.nix @@ -0,0 +1,40 @@ +{ lib, stdenv, fetchfromgh, unzip, rsync, makeWrapper, jre }: + +stdenv.mkDerivation rec { + pname = "orbisgis-bin"; + version = "5.1.0"; + + src = fetchfromgh { + owner = "orbisgis"; + repo = "orbisgis"; + name = "orbisgis-bin.zip"; + version = "${version}-SNAPSHOT"; + hash = "sha256-e7SSn+P8rF5eSbl4Z/zp1mHNN2rAi4ZoMvkoy360hGM="; + }; + + nativeBuildInputs = [ unzip rsync makeWrapper ]; + + postPatch = '' + sed -i "s#/usr/bin/orbisgis#$out/bin/orbisgis#" orbisgis.desktop + sed -i "s#/usr/lib/OrbisGIS#$out/opt/OrbisGIS#" orbisgis orbisgis.desktop + sed -i "s#java -jar#${jre}/bin/java -jar#" orbisgis.sh orbisgis_safemode.sh + ''; + + installPhase = '' + mkdir -p $out/{bin,opt/OrbisGIS} + rsync -r --exclude '*.bat' . $out/opt/OrbisGIS + + chmod +x $out/opt/OrbisGIS/orbisgis + makeWrapper $out/opt/OrbisGIS/orbisgis $out/bin/orbisgis \ + --set JAVA_HOME "${jre}" + ''; + + meta = with lib; { + homepage = "http://orbisgis.org/"; + description = "An opensource GIS software"; + license = licenses.gpl3; + maintainers = [ maintainers.sikmir ]; + platforms = jre.meta.platforms; + skip.ci = true; + }; +}