nur-packages

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

commit b137b8f6d0ace59bf1d5403b6c0efb0eeebac059
parent b6faaf421264eb5561dbbff4cf155d3abb6d0dc8
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Tue,  6 Sep 2022 22:37:20 +0300

Up

Diffstat:
Mpkgs/default.nix | 20+++++---------------
Mpkgs/geospatial/elevation/default.nix | 13++++++++++---
Mpkgs/geospatial/morecantile/default.nix | 6++++--
Mpkgs/geospatial/pmtiles/default.nix | 6+++---
Mpkgs/geospatial/polyvectorization/default.nix | 1+
Mpkgs/geospatial/tilecloud/default.nix | 4++--
Mpkgs/geospatial/tilesets-cli/default.nix | 16++++++++++++++--
Mpkgs/geospatial/tpkutils/default.nix | 18+++++++++++++-----
Mpkgs/geospatial/vt2geojson/default.nix | 8+++++++-
Mpkgs/linguistics/odict/default.nix | 14+++++++++-----
Mpkgs/misc/musig/default.nix | 10++++++----
Mpkgs/misc/telegabber/default.nix | 6+++++-
Mpkgs/osm/smrender/default.nix | 11+++++------
Mpkgs/suckless/farbfeld-utils/default.nix | 4++++
Mpkgs/suckless/nextvi/default.nix | 2++
15 files changed, 90 insertions(+), 49 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -132,9 +132,7 @@ lib.makeScope newScope ( ### GEMINI agunua = callPackage ./gemini/agunua { }; - astronaut = callPackage ./gemini/astronaut { - buildGoModule = pkgs.buildGo117Module; - }; + astronaut = callPackage ./gemini/astronaut { }; comitium = callPackage ./gemini/comitium { }; gemcert = callPackage ./gemini/gemcert { }; gemgen = callPackage ./gemini/gemgen { }; @@ -219,9 +217,7 @@ lib.makeScope newScope ( tile-stitch = callPackage ./geospatial/tile-stitch { }; tilesets-cli = callPackage ./geospatial/tilesets-cli { }; tpkutils = callPackage ./geospatial/tpkutils { }; - vt2geojson = callPackage ./geospatial/vt2geojson { - buildGoModule = pkgs.buildGo117Module; - }; + vt2geojson = callPackage ./geospatial/vt2geojson { }; titiler = callPackage ./geospatial/titiler { }; tilecloud = callPackage ./geospatial/tilecloud { }; @@ -279,9 +275,7 @@ lib.makeScope newScope ( i18n-editor-bin = callPackage ./linguistics/i18n-editor { jre = pkgs.jdk11; }; lsdreader = callPackage ./linguistics/lsdreader { }; mikatools = callPackage ./linguistics/mikatools { }; - odict = callPackage ./linguistics/odict { - buildGoModule = pkgs.buildGo117Module; - }; + odict = callPackage ./linguistics/odict { }; python-hfst = callPackage ./linguistics/python-hfst { }; pytorchtext = callPackage ./linguistics/pytorchtext { }; redict = libsForQt5.callPackage ./linguistics/redict { }; @@ -322,9 +316,7 @@ lib.makeScope newScope ( md2html = callPackage ./misc/md2html { }; miband4 = callPackage ./misc/miband4 { }; morse-talk = callPackage ./misc/morse-talk { }; - musig = callPackage ./misc/musig { - buildGoModule = pkgs.buildGo117Module; - }; + musig = callPackage ./misc/musig { }; nanodns = callPackage ./misc/nanodns { }; nmtree = callPackage ./misc/nmtree { }; objlab = callPackage ./misc/objlab { }; @@ -338,9 +330,7 @@ lib.makeScope newScope ( sdorfehs = callPackage ./misc/sdorfehs { }; taskcoach = callPackage ./misc/taskcoach { }; tcvt = callPackage ./misc/tcvt { }; - telegabber = callPackage ./misc/telegabber { - buildGoModule = pkgs.buildGo117Module; - }; + telegabber = callPackage ./misc/telegabber { }; tlstunnel = callPackage ./misc/tlstunnel { }; worm = callPackage ./misc/worm { }; wptools = callPackage ./misc/wptools { }; diff --git a/pkgs/geospatial/elevation/default.nix b/pkgs/geospatial/elevation/default.nix @@ -7,6 +7,8 @@ , unzip , gzip , gdal +, testers +, elevation }: python3Packages.buildPythonApplication rec { @@ -20,6 +22,10 @@ python3Packages.buildPythonApplication rec { hash = "sha256-sZStJgToQtWYrBH1BjqxCUwQUT5dcAlyZwnb4aYga+4="; }; + nativeBuildInputs = with python3Packages; [ setuptools-scm ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + propagatedBuildInputs = with python3Packages; [ fasteners appdirs click setuptools ]; postPatch = '' @@ -43,14 +49,15 @@ python3Packages.buildPythonApplication rec { install -Dm644 elevation/datasource.mk -t $out/lib/${python3Packages.python.libPrefix}/site-packages/elevation ''; - doInstallCheck = true; - - installCheckPhase = "$out/bin/eio selfcheck"; + passthru.tests.version = testers.testVersion { + package = elevation; + }; meta = with lib; { description = "Python script to download global terrain digital elevation models, SRTM 30m DEM and SRTM 90m DEM"; homepage = "http://elevation.bopen.eu/"; license = licenses.asl20; maintainers = [ maintainers.sikmir ]; + mainProgram = "eio"; }; } diff --git a/pkgs/geospatial/morecantile/default.nix b/pkgs/geospatial/morecantile/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, python3Packages }: +{ lib, stdenv, fetchFromGitHub, python3Packages, testers, morecantile }: python3Packages.buildPythonPackage rec { pname = "morecantile"; @@ -16,7 +16,9 @@ python3Packages.buildPythonPackage rec { checkInputs = with python3Packages; [ mercantile pytestCheckHook ]; - installCheckPhase = "$out/bin/morecantile --version | grep ${version} > /dev/null"; + passthru.tests.version = testers.testVersion { + package = morecantile; + }; meta = with lib; { description = "Construct and use map tile grids in different projection"; diff --git a/pkgs/geospatial/pmtiles/default.nix b/pkgs/geospatial/pmtiles/default.nix @@ -2,13 +2,13 @@ python3Packages.buildPythonApplication rec { pname = "pmtiles"; - version = "2021-12-29"; + version = "0.0.1-alpha"; src = fetchFromGitHub { owner = "protomaps"; repo = "PMTiles"; - rev = "fb4aa544d98654b575c2d694ddaeb9384b2a3f77"; - hash = "sha256-AWaKlJGjqMM3mRx2q2YD6X5DHYEoV9RCuszh36QdXX0="; + rev = "v${version}"; + hash = "sha256-RxAEnQge/2xaIMH0dIQiTYP6kOPTM0QtfSNwE9hpkao="; }; sourceRoot = "${src.name}/python"; diff --git a/pkgs/geospatial/polyvectorization/default.nix b/pkgs/geospatial/polyvectorization/default.nix @@ -32,6 +32,7 @@ mkDerivation rec { license = licenses.mit; maintainers = [ maintainers.sikmir ]; platforms = platforms.linux; + mainProgram = "polyvector_thing"; skip.ci = stdenv.isDarwin; }; } diff --git a/pkgs/geospatial/tilecloud/default.nix b/pkgs/geospatial/tilecloud/default.nix @@ -2,13 +2,13 @@ python3Packages.buildPythonApplication rec { pname = "tilecloud"; - version = "1.8.0"; + version = "1.8.2"; src = fetchFromGitHub { owner = "camptocamp"; repo = "tilecloud"; rev = version; - hash = "sha256-TaBwrh+bvyMBx8IlCLZ/S/7Sb0Gp9tz02204qbWStBA="; + hash = "sha256-rg85xlmPq5pSrHAjA+9YlkQLndhNha8+OsqbGqe8JSM="; }; patches = [ ./set-tmpl-path.patch ]; diff --git a/pkgs/geospatial/tilesets-cli/default.nix b/pkgs/geospatial/tilesets-cli/default.nix @@ -1,4 +1,6 @@ -{ lib, fetchFromGitHub, python3Packages, jsonseq, supermercado }: +{ lib, fetchFromGitHub, python3Packages, jsonseq, supermercado +, testers, tilesets-cli +}: python3Packages.buildPythonApplication rec { pname = "tilesets-cli"; @@ -27,12 +29,22 @@ python3Packages.buildPythonApplication rec { checkInputs = with python3Packages; [ pytestCheckHook ]; - installCheckPhase = "$out/bin/tilesets --version | grep ${version} > /dev/null"; + disabledTests = [ + "test_cli_create_private_invalid" + "test_cli_add_source" + "test_cli_upload_source_replace" + "test_cli_upload_source_no_replace" + ]; + + passthru.tests.version = testers.testVersion { + package = tilesets-cli; + }; meta = with lib; { description = "CLI for interacting with the Mapbox Tilesets API"; homepage = "https://docs.mapbox.com/mapbox-tiling-service"; license = licenses.bsd2; maintainers = [ maintainers.sikmir ]; + mainProgram = "tilesets"; }; } diff --git a/pkgs/geospatial/tpkutils/default.nix b/pkgs/geospatial/tpkutils/default.nix @@ -1,17 +1,24 @@ -{ lib, fetchFromGitHub, python3Packages, pymbtiles }: +{ lib, fetchFromGitHub, python3Packages, pymbtiles, poetry }: python3Packages.buildPythonApplication rec { pname = "tpkutils"; - version = "2021-02-10"; + version = "0.8.2"; + format = "pyproject"; src = fetchFromGitHub { owner = "consbio"; repo = "tpkutils"; - rev = "5f3694451a1759548af579b689f478cefc633252"; - hash = "sha256-6eEDRGpBP27jT2KAg7EtsUm9wxEYrlKa8EkB/7/1JWc="; + rev = version; + hash = "sha256-iKM+tEEOtSkwDdkBN+n35q3D2IBi7a/bnY/fSlGDowU="; }; - propagatedBuildInputs = with python3Packages; [ mercantile pymbtiles setuptools six ]; + nativeBuildInputs = [ poetry ]; + + propagatedBuildInputs = with python3Packages; [ + mercantile + pymbtiles + six + ]; checkInputs = with python3Packages; [ pytestCheckHook ]; @@ -20,5 +27,6 @@ python3Packages.buildPythonApplication rec { inherit (src.meta) homepage; license = licenses.isc; maintainers = [ maintainers.sikmir ]; + mainProgram = "tpk"; }; } diff --git a/pkgs/geospatial/vt2geojson/default.nix b/pkgs/geospatial/vt2geojson/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, testers, vt2geojson }: buildGoModule rec { pname = "vt2geojson"; @@ -13,6 +13,12 @@ buildGoModule rec { vendorHash = "sha256-FnLxhhytgNC4OIvh9pUM+cVDdNfqVOocjmkzFDU1fmA="; + ldflags = [ "-X main.appVersion=${version}" ]; + + passthru.tests.version = testers.testVersion { + package = vt2geojson; + }; + meta = with lib; { description = "Command line tool to dump Mapbox Vector Tiles to GeoJSON"; inherit (src.meta) homepage; diff --git a/pkgs/linguistics/odict/default.nix b/pkgs/linguistics/odict/default.nix @@ -1,17 +1,21 @@ -{ lib, fetchFromGitHub, buildGoModule }: +{ lib, fetchFromGitHub, buildGoModule, testers, odict }: buildGoModule rec { pname = "odict"; - version = "2021-01-08"; + version = "1.5.0"; src = fetchFromGitHub { owner = "TheOpenDictionary"; repo = "odict"; - rev = "639dbab4feac15c4f69049bfb9b7bcfecaf68b47"; - hash = "sha256-cshWHsFTcejNNz/95FNkadXx8XWOW0fjlJTl4POR07k="; + rev = version; + hash = "sha256-2520kNT3aTylE0ZVGuX92z1NehdCKKvGKd8OgdJ1q3M="; }; - vendorSha256 = "sha256-+gHYFbCZkfsfsdSZvmbQho4JUn3RRQpKBcxrylpaB9g="; + vendorHash = "sha256-8vDlrbdmGfpCLZIU3rxuk004T9om/CGTc8vJElvlP3s="; + + passthru.tests.version = testers.testVersion { + package = odict; + }; meta = with lib; { description = "A blazingly-fast portable dictionary file format"; diff --git a/pkgs/misc/musig/default.nix b/pkgs/misc/musig/default.nix @@ -1,4 +1,6 @@ -{ stdenv, lib, fetchFromGitHub, buildGoModule, pkg-config, portaudio }: +{ stdenv, lib, fetchFromGitHub, buildGoModule, pkg-config, portaudio +, testers, musig +}: buildGoModule rec { pname = "musig"; @@ -19,9 +21,9 @@ buildGoModule rec { ldflags = [ "-X main.VERSION=${version}" ]; - doInstallCheck = true; - - installCheckPhase = "$out/bin/musig --version | grep ${version} > /dev/null"; + passthru.tests.version = testers.testVersion { + package = musig; + }; meta = with lib; { description = "A shazam like tool to store songs fingerprints and retrieve them"; diff --git a/pkgs/misc/telegabber/default.nix b/pkgs/misc/telegabber/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitea, openssl, tdlib, zlib }: +{ lib, buildGoModule, fetchFromGitea, openssl, tdlib, zlib, testers, telegabber }: buildGoModule rec { pname = "telegabber"; @@ -20,6 +20,10 @@ buildGoModule rec { install -Dm644 config_schema.json config.yml.example -t $out/share/telegabber ''; + passthru.tests.version = testers.testVersion { + package = telegabber; + }; + meta = with lib; { description = "XMPP/Jabber transport to Telegram network"; inherit (src.meta) homepage; diff --git a/pkgs/osm/smrender/default.nix b/pkgs/osm/smrender/default.nix @@ -1,5 +1,6 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, cairo, librsvg , Foundation, memstreamHook +, testers, smrender }: stdenv.mkDerivation rec { @@ -18,12 +19,10 @@ stdenv.mkDerivation rec { buildInputs = [ cairo librsvg ] ++ lib.optionals stdenv.isDarwin [ Foundation memstreamHook ]; - doInstallCheck = true; - installCheckPhase = '' - runHook preInstallCheck - $out/bin/smrender -v | grep ${version} > /dev/null - runHook postInstallCheck - ''; + passthru.tests.version = testers.testVersion { + package = smrender; + version = "V${version}"; + }; meta = with lib; { description = "A powerful, flexible, and modular rule-based rendering engine for OSM data"; diff --git a/pkgs/suckless/farbfeld-utils/default.nix b/pkgs/suckless/farbfeld-utils/default.nix @@ -13,10 +13,14 @@ stdenv.mkDerivation { buildInputs = [ libGL libX11 SDL ghostscript ]; buildPhase = '' + runHook preBuild + mkdir -p $out/bin $CC -c lodepng.c find . -name '*.c' -exec grep 'gcc' {} + -print0 | \ awk -F: '{print $2}' | sed 's#~/bin#$out/bin#;s#gcc#$CC#;s#/usr/lib/libgs.so.9#-lgs#' | xargs -0 sh -c + + runHook postBuild ''; dontInstall = true; diff --git a/pkgs/suckless/nextvi/default.nix b/pkgs/suckless/nextvi/default.nix @@ -12,7 +12,9 @@ stdenv.mkDerivation rec { }; buildPhase = '' + runHook preBuild sh ./build.sh + runHook postBuild ''; installPhase = ''