nur-packages

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

commit fcab7f297059083c3577cd4e0df7fd7ad82af567
parent afdcd171d2c91276e332e444072ff0aac3696a8c
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Thu,  6 May 2021 19:28:36 +0300

Up

Diffstat:
Mnix/sources.json | 28----------------------------
Mpkgs/data/dicts/freedict/base.nix | 4++--
Mpkgs/data/dicts/freedict/default.nix | 6+++---
Mpkgs/data/dicts/komputeko/default.nix | 6+++---
Mpkgs/data/dicts/wiktionary/base.nix | 4++--
Mpkgs/data/dicts/wiktionary/default.nix | 58++++++++++++++++++++++++++++++++--------------------------
Mpkgs/development/python-modules/gpxelevations/default.nix | 34++++++++++++++++++++--------------
Mpkgs/development/python-modules/gpxelevations/testdata.nix | 32++++++++++++++++----------------
Mpkgs/development/python-modules/mercantile/default.nix | 18++++++++++++------
9 files changed, 90 insertions(+), 100 deletions(-)

diff --git a/nix/sources.json b/nix/sources.json @@ -23,20 +23,6 @@ "url_template": "https://download.geofabrik.de/russia/northwestern-fed-district-<version>.osm.pbf", "version": "210306" }, - "gpxelevations": { - "branch": "master", - "builtin": false, - "date": "2021-02-27T11:06:41Z", - "description": "Geo elevation data parser for \"The Shuttle Radar Topography Mission\" data", - "homepage": "https://github.com/tkrajina/srtm.py", - "owner": "tkrajina", - "repo": "srtm.py", - "rev": "aac72b36d105198622e33047b09786543c9aa4fa", - "sha256": "1qik15m5gwi4fp0ap898vgnvxhfh55a945dxkzkr9c7q9qaay0gw", - "type": "tarball", - "url": "https://github.com/tkrajina/srtm.py/archive/aac72b36d105198622e33047b09786543c9aa4fa.tar.gz", - "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" - }, "gpxlab": { "branch": "master", "builtin": false, @@ -118,20 +104,6 @@ "url_template": "https://maptourist.org/osm-garmin/archive/OSM-MapTourist-<region>-RU_<version>.zip", "version": "2021-03-06" }, - "mercantile": { - "branch": "master", - "builtin": false, - "date": "2020-08-24T14:49:04Z", - "description": "Spherical mercator tile and coordinate utilities", - "homepage": "https://github.com/mapbox/mercantile", - "owner": "mapbox", - "repo": "mercantile", - "rev": "d00e29330663d2ca8dc1f4056f92194286250b38", - "sha256": "0kdhvph2k7qjjqxp84qvdhkm5pii711kkfghpkqwjml1ms0ld96s", - "type": "tarball", - "url": "https://github.com/mapbox/mercantile/archive/d00e29330663d2ca8dc1f4056f92194286250b38.tar.gz", - "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" - }, "odict": { "branch": "master", "builtin": false, diff --git a/pkgs/data/dicts/freedict/base.nix b/pkgs/data/dicts/freedict/base.nix @@ -1,4 +1,4 @@ -{ lib, stdenvNoCC, fetchurl, lang, version, sha256 }: +{ lib, stdenvNoCC, fetchurl, lang, version, hash }: stdenvNoCC.mkDerivation { pname = "freedict-${lang}"; @@ -6,7 +6,7 @@ stdenvNoCC.mkDerivation { src = fetchurl { url = "https://download.freedict.org/dictionaries/${lang}/${version}/freedict-${lang}-${version}.dictd.tar.xz"; - inherit sha256; + inherit hash; }; installPhase = '' diff --git a/pkgs/data/dicts/freedict/default.nix b/pkgs/data/dicts/freedict/default.nix @@ -4,16 +4,16 @@ deu-eng = callPackage ./base.nix { lang = "deu-eng"; version = "0.3.5"; - sha256 = "0sy68l3433pqsssyg2gnsjhcvjb7bn658hkwkd9rpf3m0jic9lgm"; + hash = "sha256-9dHEogR1uJtTm3xCVIxdZ8nNoNT2iee11viOQQZFxms="; }; epo-eng = callPackage ./base.nix { lang = "epo-eng"; version = "1.0.1"; - sha256 = "095xwqfc43dnm0g74i83lg03542f064jy2xbn3qnjxiwysz9ksnz"; + hash = "sha256-3+qZvvY8dmnxsKsLL4kBTpAywKMDRXIeqLYNwhzmvSQ="; }; fin-eng = callPackage ./base.nix { lang = "fin-eng"; version = "2020.10.04"; - sha256 = "0zyy01qp2d934s8l02zkb25iszvkj5dq3ac9rmygsxcigpzcg5dh"; + hash = "sha256-sJXH/n2Rdf18zYmpgVuRc38di1jzC0CRJiM1cXEA3n8="; }; } diff --git a/pkgs/data/dicts/komputeko/default.nix b/pkgs/data/dicts/komputeko/default.nix @@ -2,12 +2,12 @@ stdenvNoCC.mkDerivation { pname = "komputeko"; - version = "2020-10-18"; + version = "2021-04-21"; src = fetchwebarchive { url = "https://komputeko.net/data.json"; - timestamp = "20201018194034"; - sha256 = "1bwzpxdk221cdya2sdc9cjvkl7qw1mk4yiy8mbdx8nmcm9m4adwc"; + timestamp = "20210421213134"; + hash = "sha256-NMoLcTHZt3OS+jTZRYlFwRPqWaK6EInTo0hPHKSJoFU="; }; dontUnpack = true; diff --git a/pkgs/data/dicts/wiktionary/base.nix b/pkgs/data/dicts/wiktionary/base.nix @@ -1,4 +1,4 @@ -{ lib, stdenvNoCC, fetchurl, lang, version, sha256 }: +{ lib, stdenvNoCC, fetchurl, lang, version, hash }: stdenvNoCC.mkDerivation { pname = "wiktionary-${lang}"; @@ -6,7 +6,7 @@ stdenvNoCC.mkDerivation { src = fetchurl { url = "http://libredict.org/dictionaries/${lang}/wiktionary_${lang}_stardict_${version}.tgz"; - inherit sha256; + inherit hash; }; installPhase = "install -Dm644 *.{dict,idx,ifo} -t $out"; diff --git a/pkgs/data/dicts/wiktionary/default.nix b/pkgs/data/dicts/wiktionary/default.nix @@ -1,57 +1,63 @@ { callPackage }: { - en-ru = callPackage ./base.nix { - lang = "en-ru"; - version = "2020-11-25"; - sha256 = "0rznkaxfqx5ympb6k2nisa4r9siw7gvmzq208pr46ya0qsz5if7h"; - }; - de-ru = callPackage ./base.nix { lang = "de-ru"; - version = "2020-11-27"; - sha256 = "1m40ac8mrvsb7ksm08c0nip1abnjy8jfaj5qad9pm18fpp68b494"; + version = "2021-04-30"; + hash = "sha256-uDDXd4lXf4VAsBMMcrf+zZrv8QexsU3M/CqzXGRmM9g="; + }; + + en-ru = callPackage ./base.nix { + lang = "en-ru"; + version = "2021-05-05"; + hash = "sha256-UkBWRkpnG02K+7YOHTCx6T0u7UKbmFnsZpZcbriaS5E="; }; fi-ru = callPackage ./base.nix { lang = "fi-ru"; - version = "2020-11-23"; - sha256 = "0mac6gs437inn3b0q8prq3vm2qw0wnhbyhmlq2g40kxh033hjzc1"; + version = "2021-05-03"; + hash = "sha256-GUZmuj+23OVMwQT1jXVg7VvY7r/ERGOLax1dTwCv+ho="; }; - ru-en = callPackage ./base.nix { - lang = "ru-en"; - version = "2020-11-21"; - sha256 = "1dw76ak0rcqpb508wqzfsv9xfmjipx07zb212fnj1nhyrvmw388y"; + ru-be = callPackage ./base.nix { + lang = "ru-be"; + version = "2021-01-21"; + hash = "sha256-VAkuG2T+IXzLSqJEmJ/VgGCNdUjxBEg90ECUWLeq6EE="; }; ru-de = callPackage ./base.nix { lang = "ru-de"; - version = "2020-11-21"; - sha256 = "1kw726vq5ghjb17a28m6bqp8jca2pqj5s72g1da00288wy3ccx02"; + version = "2021-01-21"; + hash = "sha256-UrJTBDC99xoGNvVqYyU9QUzUESIaAVI0Btbu3I6PYU8="; }; - ru-uk = callPackage ./base.nix { - lang = "ru-uk"; - version = "2020-11-21"; - sha256 = "0gx1pjyi24vk02kwmxygb252qgqnw2vqwjaasxlq2s7825nhr8rm"; + ru-en = callPackage ./base.nix { + lang = "ru-en"; + version = "2021-01-21"; + hash = "sha256-Lip6ixKIO3xeu8ZXsWDkFAZONbjUp+LVI0bc3TnFxKQ="; }; ru-eo = callPackage ./base.nix { lang = "ru-eo"; - version = "2020-11-21"; - sha256 = "0bfbygk8pflahjil7r4gfdcimp306wx4bbccz92hp2dvdy83sngg"; + version = "2021-01-21"; + hash = "sha256-NXWfv78JoR/K7Tkp7GdSS5OxVJspKbOixVTPzmAO2uQ="; }; ru-fi = callPackage ./base.nix { lang = "ru-fi"; - version = "2020-11-21"; - sha256 = "0z6r2mgq9rzlr7rnfxch6h17nj6dj7wbpj2p4hyjd0awnvzc85s2"; + version = "2021-01-21"; + hash = "sha256-BYW5I3WBbsjU4IupZDYjkMpAI5vDP27EC/yUvf0hirE="; }; ru-sv = callPackage ./base.nix { lang = "ru-sv"; - version = "2020-11-21"; - sha256 = "0123a26xi37wfp5b012v6634mxfdjyxa110bfxsjcpm379slbcnb"; + version = "2021-01-21"; + hash = "sha256-AtKuseepJdW39yHuMAIksFroO6aWoqu+4fvDjb4pEO0="; + }; + + ru-uk = callPackage ./base.nix { + lang = "ru-uk"; + version = "2021-01-21"; + hash = "sha256-pnHDgduoRcILJnegDcTpReXkIq8CDLw5nEX2H04pWvo="; }; } diff --git a/pkgs/development/python-modules/gpxelevations/default.nix b/pkgs/development/python-modules/gpxelevations/default.nix @@ -1,28 +1,34 @@ -{ lib, python3Packages, fetchurl, sources }: +{ lib, python3Packages, fetchFromGitHub, fetchurl }: let testdata = import ./testdata.nix { inherit fetchurl; }; in -python3Packages.buildPythonApplication { - pname = "gpxelevations-unstable"; - version = lib.substring 0 10 sources.gpxelevations.date; +python3Packages.buildPythonApplication rec { + pname = "gpxelevations"; + version = "0.3.7"; - src = sources.gpxelevations; + src = fetchFromGitHub { + owner = "tkrajina"; + repo = "srtm.py"; + rev = "v${version}"; + hash = "sha256-/AGvFE74sJTnn70VklQp0MG+7dsooavAdSTyV2oJM+I="; + }; propagatedBuildInputs = with python3Packages; [ requests gpxpy ]; dontUseSetuptoolsCheck = true; -# checkPhase = '' -# mkdir -p tmp_home/.cache/srtm -# ${lib.concatMapStringsSep "\n" (hgt: '' -# cp ${hgt} tmp_home/.cache/srtm/${hgt.name} -# '') testdata} -# -# HOME=tmp_home ${python3Packages.python.interpreter} -m unittest test -# ''; + checkPhase = '' + mkdir -p tmp_home/.cache/srtm + ${lib.concatMapStringsSep "\n" (hgt: '' + cp ${hgt} tmp_home/.cache/srtm/${hgt.name} + '') testdata} + + HOME=tmp_home ${python3Packages.python.interpreter} -m unittest test + ''; meta = with lib; { - inherit (sources.gpxelevations) description homepage; + description = "Geo elevation data parser for \"The Shuttle Radar Topography Mission\" data"; + inherit (src.meta) homepage; license = licenses.asl20; maintainers = [ maintainers.sikmir ]; platforms = platforms.unix; diff --git a/pkgs/development/python-modules/gpxelevations/testdata.nix b/pkgs/development/python-modules/gpxelevations/testdata.nix @@ -1,61 +1,61 @@ { fetchurl }: let - fetchSrtm = { file, sha256 }: fetchurl { - inherit sha256; - url = "https://dds.cr.usgs.gov/srtm/version2_1/SRTM3/${file}"; + fetchSrtm = { file, hash }: fetchurl { + inherit hash; + url = "https://srtm.kurviger.de/SRTM3/${file}"; }; in [ (fetchSrtm { file = "Eurasia/N47E013.hgt.zip"; - sha256 = "0b8r9z6ni6dzqjzrk848nwywk73079lzh39h676z23nf4f5303jl"; + hash = "sha256-VA4wiiPODvHNMTAN+Gk6YJzJPbeIoJm/xL+ZaM1PGS0="; }) (fetchSrtm { file = "Eurasia/N46E013.hgt.zip"; - sha256 = "14ipvzki7n6bgls0kg33id1587pzjhfm05ddqpgcniy8sq8lkdgg"; + hash = "sha256-77VJEdbIR8vexa0VUB2U/x5UQotjvAk0fcvYE+ffN5I="; }) (fetchSrtm { file = "Eurasia/N47E012.hgt.zip"; - sha256 = "0wk5sa9mxcjj9nkk29myxz4qayjrhp1xb1wkn7ij42kl0zz4568n"; + hash = "sha256-FplC/gd0CiLjsZOH1cOFWXqFye++JjGnTVKyXpPSZXI="; }) (fetchSrtm { file = "Africa/N00E015.hgt.zip"; - sha256 = "1v29x62fw4rxl32rbgmc19fczagvv8dld31razq3rimdh8x6jgja"; + hash = "sha256-Sj5pOoKtxjzwVzmMRhva+6nPXAqsvpXFoD0T7oTpSew="; }) (fetchSrtm { file = "Africa/S01E015.hgt.zip"; - sha256 = "0s54vmgd7dpy71cza2193m2615a3m4qh5rffza3g7myh5gz3kd4n"; + hash = "sha256-lrQ5/ivQ1/OG+s7lAjGpQ5VgRB0pCPVZOP62017dpGg="; }) (fetchSrtm { file = "Eurasia/N51E000.hgt.zip"; - sha256 = "09frqq1qlgchbz08r0lpx4fxd04s848c8v7bpmvwl43hyrjml347"; + hash = "sha256-hwxaZfZwEMp3vetsxBBBmoDWHemXgozAX5A9igPG2SU="; }) (fetchSrtm { file = "Eurasia/N51W001.hgt.zip"; - sha256 = "0p0kc9bghgik388ii86mabc8jdlmj567lpfbbjxpc6wqs1hmxjwp"; + hash = "sha256-l8teYdCYG3a7XMtdekyRlTaJ2FLVoBgRGjM++FZiE1w="; }) (fetchSrtm { file = "Eurasia/N42E071.hgt.zip"; - sha256 = "0qxpg4vb77wk056jp6qj03cmrwp0bbzf1nxihdwwxbmyhrxn2zrq"; + hash = "sha256-OH9he4a+rs55g7Hb4P5a4PJc2QASmytNAZOfszZ5t2M="; }) (fetchSrtm { file = "Eurasia/N43E087.hgt.zip"; - sha256 = "0hbqjskgi4is4wa5frndlgaxi6cbmxrh0kfddwbcml18nyyfw4xh"; + hash = "sha256-sBPuvLco0MoWb81NAHOvi5nY1aPNZlcUJzqS+KaWeEE="; }) (fetchSrtm { file = "Africa/N31E035.hgt.zip"; - sha256 = "0g20fzrlwmxzas3mdxlk0kf4nygxq5xl616ana9n4dg35m4ivva8"; + hash = "sha256-SO0dSS3jNWKTssoEQ3vB/XlL3AST9laHVr9XTvN3QDw="; }) (fetchSrtm { file = "Eurasia/N55E055.hgt.zip"; - sha256 = "0nm4yhrjx4m396bp5nyj4nzv8gdgbj4cpddls2fx24bp880vv8r2"; + hash = "sha256-IqO9AUJ3EdGd0LS1y4hcrz20vyXS23KXSaOSLjP0pFo="; }) (fetchSrtm { file = "Eurasia/N45E013.hgt.zip"; - sha256 = "1f802rw7z8s29jjbk0j4gkbyg9jgknrzbg2lalcbvq55hj1j95nb"; + hash = "sha256-y5Ykg4Sl4L0YVVS89bOdT6bn13xEgrmkTEKjf3gWALk="; }) (fetchSrtm { file = "Africa/N24E035.hgt.zip"; - sha256 = "1fyrybdm67r17fj5hj2i3nwcpyf2m8v5y9jwlfys7f3qicw692qv"; + hash = "sha256-G4tkOIt4uKO9o1wmXzaqwvnLuB1RSFikOyEfU9vy2bs="; }) ] diff --git a/pkgs/development/python-modules/mercantile/default.nix b/pkgs/development/python-modules/mercantile/default.nix @@ -1,17 +1,23 @@ -{ lib, python3Packages, sources }: +{ lib, fetchFromGitHub, python3Packages }: -python3Packages.buildPythonPackage { - pname = "mercantile-unstable"; - version = lib.substring 0 10 sources.mercantile.date; +python3Packages.buildPythonPackage rec { + pname = "mercantile"; + version = "1.2.1"; - src = sources.mercantile; + src = fetchFromGitHub { + owner = "mapbox"; + repo = pname; + rev = version; + hash = "sha256-DiDXO2XnD3We6NhP81z7aIHzHrHDi/nkqy98OT9986w="; + }; propagatedBuildInputs = with python3Packages; [ click ]; checkInputs = with python3Packages; [ pytestCheckHook hypothesis ]; meta = with lib; { - inherit (sources.mercantile) description homepage; + description = "Spherical mercator tile and coordinate utilities"; + homepage = "http://mercantile.readthedocs.io/en/latest/"; license = licenses.bsd3; maintainers = [ maintainers.sikmir ]; };