nur-packages

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

commit 327f715b3c6f7c8706f6fae1e7ad77e6c61c01e7
parent 12b0825b6a946e643fe0d25c54976f7c74745d2e
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Wed,  5 Feb 2020 12:42:48 +0300

Add supermercado

Diffstat:
Mdefault.nix | 4++++
Mnix/sources.json | 12++++++++++++
Apkgs/tools/supermercado/default.nix | 29+++++++++++++++++++++++++++++
3 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/default.nix b/default.nix @@ -114,6 +114,10 @@ in rec { else callPackage ./pkgs/tools/stardict-tools { inherit (sources) stardict-3; }; + supermercado = python3Packages.callPackage ./pkgs/tools/supermercado { + inherit mercantile; + inherit (sources) supermercado; + }; supload = callPackage ./pkgs/tools/supload { inherit (sources) supload; }; diff --git a/nix/sources.json b/nix/sources.json @@ -311,6 +311,18 @@ "url": "https://github.com/huzheng001/stardict-3/archive/8c5c26996dca52d6bda0aedb5da0381db930a733.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" }, + "supermercado": { + "branch": "master", + "description": "Supercharger for mercantile", + "homepage": "https://github.com/mapbox/supermercado", + "owner": "mapbox", + "repo": "supermercado", + "rev": "a3f3e4b0a5b4694aabc6245f90bd8a93db8c90a4", + "sha256": "0sam1jg244kp347bnq0vkl1jqlax7n7nxj22x87bm355rgpfbgij", + "type": "tarball", + "url": "https://github.com/mapbox/supermercado/archive/a3f3e4b0a5b4694aabc6245f90bd8a93db8c90a4.tar.gz", + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + }, "supload": { "branch": "master", "description": "Bash script for upload file to cloud storage based on OpenStack Swift API.", diff --git a/pkgs/tools/supermercado/default.nix b/pkgs/tools/supermercado/default.nix @@ -0,0 +1,29 @@ +{ lib, fetchpatch, buildPythonApplication +, click-plugins, rasterio, mercantile, numpy, pytest, supermercado }: + +buildPythonApplication rec { + pname = "supermercado"; + version = lib.substring 0 7 src.rev; + src = supermercado; + + patches = [ + # Replace np subtract operator https://github.com/mapbox/supermercado/pull/27 + (fetchpatch { + url = "https://github.com/mapbox/supermercado/commit/3a70bccad64557920121e81aded869d44581230c.patch"; + sha256 = "0zbzk1ac59q974yp1f7gz5hpvr2z54hjygynxi0a6vn1ii30mnwr"; + }) + ]; + + propagatedBuildInputs = [ click-plugins rasterio mercantile numpy ]; + + checkInputs = [ pytest ]; + checkPhase = "pytest"; + + meta = with lib; { + description = supermercado.description; + homepage = supermercado.homepage; + license = licenses.mit; + maintainers = with maintainers; [ sikmir ]; + platforms = platforms.unix; + }; +}