nur-packages

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

commit 7720eb7a003b6aff22c703a40d8466d1a5f35fda
parent bb8f7a9221d6a1a4f32b747185a05355a9ced29d
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Sat,  7 Aug 2021 02:42:29 +0300

Fix format

Diffstat:
Mpkgs/applications/visualgps/default.nix | 15++++++++-------
Mpkgs/build-support/fetchfromgh/default.nix | 11++++++-----
Mpkgs/data/dicts/tatoeba/default.nix | 38+++++++++++++++++++++-----------------
Mpkgs/data/misc/osm-extracts/default.nix | 12+++++++-----
Mpkgs/gis/sasplanet/bin.nix | 9++++++++-
Mpkgs/gis/tdh/base.nix | 21+++++++++++++++++----
Mpkgs/images/gmnisrv/default.nix | 10+++++-----
Mpkgs/misc/polyvectorization/default.nix | 3+--
Mpkgs/nakarte/map-tiler/default.nix | 23+++++++++++++++++------
Mpkgs/osm/roentgen/default.nix | 31+++++++++++++++++++------------
Mpkgs/tools/geo/tilesets-cli/default.nix | 13+++++++++----
11 files changed, 118 insertions(+), 68 deletions(-)

diff --git a/pkgs/applications/visualgps/default.nix b/pkgs/applications/visualgps/default.nix @@ -24,13 +24,14 @@ mkDerivation rec { qmakeFlags = [ "Software/VisualGPSqt/Source/VisualGPSqt.pro" ]; - postInstall = if stdenv.isDarwin then '' - mkdir -p $out/Applications - mv *.app $out/Applications - wrapQtApp $out/Applications/VisualGPSqt.app/Contents/MacOS/VisualGPSqt - '' else '' - install -Dm755 VisualGPSqt -t $out/bin - ''; + postInstall = + if stdenv.isDarwin then '' + mkdir -p $out/Applications + mv *.app $out/Applications + wrapQtApp $out/Applications/VisualGPSqt.app/Contents/MacOS/VisualGPSqt + '' else '' + install -Dm755 VisualGPSqt -t $out/bin + ''; meta = with lib; { description = "A QT application (GUI) that makes use of the VisualGPS/NMEAParser project"; diff --git a/pkgs/build-support/fetchfromgh/default.nix b/pkgs/build-support/fetchfromgh/default.nix @@ -5,9 +5,10 @@ let baseUrl = "https://github.com/${owner}/${repo}"; in ( - fetchurl ( - { - url = "${baseUrl}/releases/download/${version}/${name}"; - } // removeAttrs args [ "owner" "repo" "version" "name" ] - ) // { meta.homepage = baseUrl; } + fetchurl + ( + { + url = "${baseUrl}/releases/download/${version}/${name}"; + } // removeAttrs args [ "owner" "repo" "version" "name" ] + ) // { meta.homepage = baseUrl; } ) diff --git a/pkgs/data/dicts/tatoeba/default.nix b/pkgs/data/dicts/tatoeba/default.nix @@ -30,27 +30,31 @@ stdenvNoCC.mkDerivation rec { unpackPhase = '' echo "{}" > versions.json - '' + lib.concatMapStringsSep "\n" (src: '' - bzcat ${src} > ${lib.removeSuffix ".bz2" src.name} - jq '.+{"${lib.removeSuffix ".tsv.bz2" src.name}":"${version} 00:00:00"}' versions.json | \ - sponge versions.json - '') srcs; + '' + lib.concatMapStringsSep "\n" + (src: '' + bzcat ${src} > ${lib.removeSuffix ".bz2" src.name} + jq '.+{"${lib.removeSuffix ".tsv.bz2" src.name}":"${version} 00:00:00"}' versions.json | \ + sponge versions.json + '') + srcs; nativeBuildInputs = [ dict jq moreutils stardict-tools tatoebatools ]; - buildPhase = let - makeDict = lang: with lib; '' - parallel_corpus ${lang} > tatoeba_${replaceStrings [ " " ] [ "_" ] lang}.tab - stardict-tabfile tatoeba_${replaceStrings [ " " ] [ "_" ] lang}.tab + buildPhase = + let + makeDict = lang: with lib; '' + parallel_corpus ${lang} > tatoeba_${replaceStrings [ " " ] [ "_" ] lang}.tab + stardict-tabfile tatoeba_${replaceStrings [ " " ] [ "_" ] lang}.tab + ''; + in + '' + export XDG_DATA_HOME=$PWD + mkdir -p tatoebatools/{links,sentences_detailed} + mv *_links.tsv tatoebatools/links + mv *_sentences_detailed.tsv tatoebatools/sentences_detailed + mv versions.json tatoebatools + ${lib.concatMapStringsSep "\n" makeDict langs} ''; - in '' - export XDG_DATA_HOME=$PWD - mkdir -p tatoebatools/{links,sentences_detailed} - mv *_links.tsv tatoebatools/links - mv *_sentences_detailed.tsv tatoebatools/sentences_detailed - mv versions.json tatoebatools - ${lib.concatMapStringsSep "\n" makeDict langs} - ''; installPhase = "install -Dm644 *.{dict*,idx,ifo} -t $out"; diff --git a/pkgs/data/misc/osm-extracts/default.nix b/pkgs/data/misc/osm-extracts/default.nix @@ -28,11 +28,13 @@ in nativeBuildInputs = [ gdal osmium-tool ]; - buildPhase = lib.concatMapStringsSep "\n" (name: '' - osmium tags-filter -o ${name}-boundary.osm $src r/ISO3166-2=${name} - osmium extract -p ${name}-boundary.osm $src -s simple -o ${name}.osm - ogr2ogr -f GeoJSON ${name}-boundary.geojson ${name}-boundary.osm multipolygons - '') regions; + buildPhase = lib.concatMapStringsSep "\n" + (name: '' + osmium tags-filter -o ${name}-boundary.osm $src r/ISO3166-2=${name} + osmium extract -p ${name}-boundary.osm $src -s simple -o ${name}.osm + ogr2ogr -f GeoJSON ${name}-boundary.geojson ${name}-boundary.osm multipolygons + '') + regions; installPhase = "install -Dm644 *.geojson *.osm -t $out"; diff --git a/pkgs/gis/sasplanet/bin.nix b/pkgs/gis/sasplanet/bin.nix @@ -1,4 +1,11 @@ -{ lib, stdenv, fetchurl, fetchgit, fetchgdrive, unzip, wine, makeWrapper +{ lib +, stdenv +, fetchurl +, fetchgit +, fetchgdrive +, unzip +, wine +, makeWrapper , withMaps ? true , withExtremum ? true }: diff --git a/pkgs/gis/tdh/base.nix b/pkgs/gis/tdh/base.nix @@ -1,7 +1,20 @@ -{ lib, stdenv, fetchgdrive, unzip -, gsettings-desktop-schemas, gtk3, wxgtk -, libredirect, makeWrapper, wrapGAppsHook -, pname, version, id, sha256, description, homepage }: +{ lib +, stdenv +, fetchgdrive +, unzip +, gsettings-desktop-schemas +, gtk3 +, wxgtk +, libredirect +, makeWrapper +, wrapGAppsHook +, pname +, version +, id +, sha256 +, description +, homepage +}: stdenv.mkDerivation { inherit pname version; diff --git a/pkgs/images/gmnisrv/default.nix b/pkgs/images/gmnisrv/default.nix @@ -2,13 +2,13 @@ let cfg = writeText "gmnisrv.ini" '' - listen=0.0.0.0:1965 [::]:1965 + listen=0.0.0.0:1965 [::]:1965 - [:tls] - store=/certs + [:tls] + store=/certs - [${domain}] - root=/gemini + [${domain}] + root=/gemini ''; in dockerTools.buildImage { diff --git a/pkgs/misc/polyvectorization/default.nix b/pkgs/misc/polyvectorization/default.nix @@ -34,4 +34,4 @@ mkDerivation rec { platforms = platforms.linux; skip.ci = stdenv.isDarwin; }; -} -\ No newline at end of file +} diff --git a/pkgs/nakarte/map-tiler/default.nix b/pkgs/nakarte/map-tiler/default.nix @@ -1,6 +1,13 @@ -{ lib, stdenv, python3Packages, fetchFromGitHub -, gobject-introspection, pango -, maprec, ozi_map, pyimagequant }: +{ lib +, stdenv +, python3Packages +, fetchFromGitHub +, gobject-introspection +, pango +, maprec +, ozi_map +, pyimagequant +}: python3Packages.buildPythonApplication rec { pname = "map-tiler"; @@ -28,9 +35,13 @@ python3Packages.buildPythonApplication rec { nativeBuildInputs = [ gobject-introspection pango ]; pythonPath = with python3Packages; [ - pillow purepng - pygobject3 pycairo - maprec ozi_map pyimagequant + pillow + purepng + pygobject3 + pycairo + maprec + ozi_map + pyimagequant ]; dontUseSetuptoolsBuild = true; diff --git a/pkgs/osm/roentgen/default.nix b/pkgs/osm/roentgen/default.nix @@ -25,19 +25,26 @@ python3Packages.buildPythonApplication rec { dontUseSetuptoolsBuild = true; dontUseSetuptoolsCheck = true; - installPhase = let - pythonEnv = python3Packages.python.withPackages (p: with p; [ - colour numpy portolan pyyaml svgwrite urllib3 - ]); - in '' - site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages - mkdir -p $site_packages $out/share/roentgen - cp -r roentgen roentgen.py $site_packages - cp -r icons scheme $out/share/roentgen + installPhase = + let + pythonEnv = python3Packages.python.withPackages (p: with p; [ + colour + numpy + portolan + pyyaml + svgwrite + urllib3 + ]); + in + '' + site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages + mkdir -p $site_packages $out/share/roentgen + cp -r roentgen roentgen.py $site_packages + cp -r icons scheme $out/share/roentgen - makeWrapper ${pythonEnv.interpreter} $out/bin/roentgen \ - --add-flags "$site_packages/roentgen.py" - ''; + makeWrapper ${pythonEnv.interpreter} $out/bin/roentgen \ + --add-flags "$site_packages/roentgen.py" + ''; meta = with lib; { description = "A simple renderer for OpenStreetMap with custom icons intended to display as many tags as possible"; diff --git a/pkgs/tools/geo/tilesets-cli/default.nix b/pkgs/tools/geo/tilesets-cli/default.nix @@ -14,10 +14,15 @@ python3Packages.buildPythonApplication rec { postPatch = "sed -i 's/~=.*\"/\"/' setup.py"; propagatedBuildInputs = with python3Packages; [ - boto3 click cligj - requests requests-toolbelt - jsonschema jsonseq - mercantile supermercado + boto3 + click + cligj + requests + requests-toolbelt + jsonschema + jsonseq + mercantile + supermercado ]; checkInputs = with python3Packages; [ pytestCheckHook ];