nur-packages

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

commit 191ace155ae1a06a1cbbba452495bbbbadceed21
parent 599585b8e408d69dbfb03cd73fb92c26fd3aec97
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Wed, 23 Sep 2020 22:30:35 +0300

Add sasplanet

Diffstat:
Mnix/sources.json | 10++++++++++
Apkgs/applications/sasplanet/default.nix | 35+++++++++++++++++++++++++++++++++++
Mpkgs/default.nix | 1+
3 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/nix/sources.json b/nix/sources.json @@ -813,6 +813,16 @@ "url": "https://github.com/sidewalklabs/s2sphere/archive/d1d067e8c06e5fbaf0cc0158bade947b4a03a438.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" }, + "sasplanet": { + "builtin": false, + "description": "SAS.Planet is a program designed for viewing and downloading high-resolution satellite imagery and conventional maps", + "homepage": "http://www.sasgis.org/sasplaneta/", + "sha256": "05pi0vr75y9yggya0bvf3bkyn3q3j9alriipy4lm9lsih4r7q09l", + "type": "file", + "url": "http://www.sasgis.org/programs/sasplanet/SASPlanet_200606.zip", + "url_template": "http://www.sasgis.org/programs/sasplanet/SASPlanet_<version>.zip", + "version": "200606" + }, "stardict-3": { "branch": "master", "builtin": false, diff --git a/pkgs/applications/sasplanet/default.nix b/pkgs/applications/sasplanet/default.nix @@ -0,0 +1,35 @@ +{ stdenv, unzip, wine, writers, sources }: +let + year = stdenv.lib.substring 0 2 sources.sasplanet.version; + month = stdenv.lib.substring 2 2 sources.sasplanet.version; + day = stdenv.lib.substring 4 2 sources.sasplanet.version; + + runScript = writers.writeBash "sasplanet" '' + ${wine}/bin/wine @out@/SAS.Planet.Release.${sources.sasplanet.version}/SASPlanet.exe + ''; +in +stdenv.mkDerivation { + pname = "sasplanet"; + version = "20${year}-${month}-${day}"; + src = sources.sasplanet; + + dontUnpack = true; + + installPhase = '' + install -dm755 $out/bin + substitute ${runScript} $out/bin/sasplanet --subst-var out + chmod +x $out/bin/sasplanet + + ${unzip}/bin/unzip $src -d $out + ''; + + preferLocalBuild = true; + + meta = with stdenv.lib; { + inherit (sources.sasplanet) description homepage; + license = licenses.gpl3; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.all; + skip.ci = true; + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -39,6 +39,7 @@ lib.makeScope newScope ( redict = libsForQt5.callPackage ./applications/redict { inherit sources; }; + sasplanet = callPackage ./applications/sasplanet { }; visualgps = libsForQt5.callPackage ./applications/visualgps { }; wireguard-statusbar = callPackage ./applications/wireguard-statusbar { };