nur-packages

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

commit c2b1e2cbb1ac5f57dc04454ba1286270b0fd0c05
parent 1fe8e107252f8ec25273f4df36f0a2d9bb37768e
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Fri, 15 Oct 2021 20:43:56 +0300

Add mbutiles

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/geospatial/mbutiles/cargo-lock.patch | 385+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkgs/geospatial/mbutiles/default.nix | 27+++++++++++++++++++++++++++
3 files changed, 413 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -170,6 +170,7 @@ lib.makeScope newScope ( proj = pkgs.proj_7; }; mbtiles2osmand = callPackage ./geospatial/mbtiles2osmand { }; + mbutiles = callPackage ./geospatial/mbutiles { }; polyvectorization = libsForQt5.callPackage ./geospatial/polyvectorization { }; py-staticmaps = callPackage ./geospatial/py-staticmaps { }; qgis-bin = callPackage ./geospatial/qgis/bin.nix { }; diff --git a/pkgs/geospatial/mbutiles/cargo-lock.patch b/pkgs/geospatial/mbutiles/cargo-lock.patch @@ -0,0 +1,385 @@ +diff --git i/Cargo.lock w/Cargo.lock +index 8ed85d6..58b6ea1 100644 +--- i/Cargo.lock ++++ w/Cargo.lock +@@ -1,210 +1,309 @@ +-[root] +-name = "mbutiles" +-version = "0.1.0" +-dependencies = [ +- "docopt 0.6.78 (registry+https://github.com/rust-lang/crates.io-index)", +- "flate2 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", +- "jlens 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +- "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +- "regex 0.1.55 (registry+https://github.com/rust-lang/crates.io-index)", +- "rusqlite 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +- "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", +- "stdio_logger 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +- "walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +-] ++# This file is automatically @generated by Cargo. ++# It is not intended for manual editing. ++version = 3 + + [[package]] + name = "aho-corasick" +-version = "0.5.1" ++version = "0.5.3" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" + dependencies = [ +- "memchr 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ++ "memchr", + ] + + [[package]] + name = "bitflags" + version = "0.1.1" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2a6577517ecd0ee0934f48a7295a89aaef3e6dfafeac404f94c0b3448518ddfe" ++ ++[[package]] ++name = "cc" ++version = "1.0.69" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" ++ ++[[package]] ++name = "cfg-if" ++version = "1.0.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + + [[package]] + name = "docopt" +-version = "0.6.78" ++version = "0.6.86" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "4a7ef30445607f6fc8720f0a0a2c7442284b629cf0d049286860fae23e71c4d9" + dependencies = [ +- "regex 0.1.55 (registry+https://github.com/rust-lang/crates.io-index)", +- "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", +- "strsim 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ++ "lazy_static", ++ "regex", ++ "rustc-serialize", ++ "strsim", + ] + + [[package]] + name = "flate2" +-version = "0.2.13" ++version = "0.2.20" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423" + dependencies = [ +- "libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +- "miniz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc", ++ "miniz-sys", + ] + +-[[package]] +-name = "gcc" +-version = "0.3.25" +-source = "registry+https://github.com/rust-lang/crates.io-index" +- + [[package]] + name = "jlens" + version = "0.0.1" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ff7b5a32a955412ff7e459925d9df3433705e2f17e4e13da657f2791c499c5d2" + dependencies = [ +- "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", ++ "rustc-serialize", + ] + + [[package]] + name = "kernel32-sys" +-version = "0.2.1" ++version = "0.2.2" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" + dependencies = [ +- "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", +- "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ++ "winapi 0.2.8", ++ "winapi-build", + ] + ++[[package]] ++name = "lazy_static" ++version = "0.2.11" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" ++ + [[package]] + name = "libc" +-version = "0.2.8" ++version = "0.2.100" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "a1fa8cddc8fbbee11227ef194b5317ed014b8acbf15139bd716a18ad3fe99ec5" + + [[package]] + name = "libsqlite3-sys" + version = "0.4.0" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d0c8ae599fc97c180c41389b91ce9ca01813d8f65a89f8cdb8d76f19f4bee59b" ++dependencies = [ ++ "libc", ++ "pkg-config", ++] ++ ++[[package]] ++name = "log" ++version = "0.3.9" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" + dependencies = [ +- "libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +- "pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ++ "log 0.4.14", + ] + + [[package]] + name = "log" +-version = "0.3.5" ++version = "0.4.14" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" ++dependencies = [ ++ "cfg-if", ++] ++ ++[[package]] ++name = "mbutiles" ++version = "0.1.0" + dependencies = [ +- "libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ++ "docopt", ++ "flate2", ++ "jlens", ++ "log 0.3.9", ++ "regex", ++ "rusqlite", ++ "rustc-serialize", ++ "stdio_logger", ++ "walkdir", + ] + + [[package]] + name = "memchr" +-version = "0.1.10" ++version = "0.1.11" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" + dependencies = [ +- "libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc", + ] + + [[package]] + name = "miniz-sys" +-version = "0.1.7" ++version = "0.1.12" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "1e9e3ae51cea1576ceba0dde3d484d30e6e5b86dee0b2d412fe3a16a15c98202" + dependencies = [ +- "gcc 0.3.25 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ++ "cc", ++ "libc", + ] + + [[package]] + name = "pkg-config" +-version = "0.3.8" ++version = "0.3.19" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" + + [[package]] + name = "regex" +-version = "0.1.55" ++version = "0.1.80" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" + dependencies = [ +- "aho-corasick 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +- "memchr 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +- "regex-syntax 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", +- "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ++ "aho-corasick", ++ "memchr", ++ "regex-syntax", ++ "thread_local", ++ "utf8-ranges", + ] + + [[package]] + name = "regex-syntax" +-version = "0.2.5" ++version = "0.3.9" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" + + [[package]] + name = "rusqlite" +-version = "0.6.0" ++version = "0.6.1" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "640a993868ae442ddcd75e8d4a9babee283a6d1c9f49bd9eb7d1bfef88cea6e8" + dependencies = [ +- "bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +- "libsqlite3-sys 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +- "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", ++ "bitflags", ++ "libc", ++ "libsqlite3-sys", ++ "time", + ] + + [[package]] + name = "rustc-serialize" +-version = "0.3.18" ++version = "0.3.24" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" + + [[package]] + name = "stdio_logger" + version = "0.1.1" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9cc9f1601c4375726b715e7241f484d0784e7fc681f0699fddfdb66d525d6030" + dependencies = [ +- "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +- "term-painter 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ++ "log 0.3.9", ++ "term-painter", + ] + + [[package]] + name = "strsim" +-version = "0.3.0" ++version = "0.5.2" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "67f84c44fbb2f91db7fef94554e6b2ac05909c9c0b0bc23bb98d3a1aebfe7f7c" + + [[package]] + name = "term" +-version = "0.4.4" ++version = "0.4.6" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1" + dependencies = [ +- "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +- "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ++ "kernel32-sys", ++ "winapi 0.2.8", + ] + + [[package]] + name = "term-painter" +-version = "0.2.2" ++version = "0.2.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "dcaa948f0e3e38470cd8dc8dcfe561a75c9e43f28075bb183845be2b9b3c08cf" ++dependencies = [ ++ "term", ++] ++ ++[[package]] ++name = "thread-id" ++version = "2.0.0" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" + dependencies = [ +- "term 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ++ "kernel32-sys", ++ "libc", ++] ++ ++[[package]] ++name = "thread_local" ++version = "0.2.7" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" ++dependencies = [ ++ "thread-id", + ] + + [[package]] + name = "time" +-version = "0.1.34" ++version = "0.1.44" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" + dependencies = [ +- "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +- "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc", ++ "wasi", ++ "winapi 0.3.9", + ] + + [[package]] + name = "utf8-ranges" + version = "0.1.3" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" + + [[package]] + name = "walkdir" +-version = "0.1.5" ++version = "0.1.8" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "c66c0b9792f0a765345452775f3adbd28dde9d33f30d13e5dcc5ae17cf6f3780" + dependencies = [ +- "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +- "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ++ "kernel32-sys", ++ "winapi 0.2.8", + ] + ++[[package]] ++name = "wasi" ++version = "0.10.0+wasi-snapshot-preview1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" ++ + [[package]] + name = "winapi" +-version = "0.2.5" ++version = "0.2.8" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" ++ ++[[package]] ++name = "winapi" ++version = "0.3.9" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" ++dependencies = [ ++ "winapi-i686-pc-windows-gnu", ++ "winapi-x86_64-pc-windows-gnu", ++] + + [[package]] + name = "winapi-build" + version = "0.1.1" + source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + ++[[package]] ++name = "winapi-i686-pc-windows-gnu" ++version = "0.4.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" ++ ++[[package]] ++name = "winapi-x86_64-pc-windows-gnu" ++version = "0.4.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/pkgs/geospatial/mbutiles/default.nix b/pkgs/geospatial/mbutiles/default.nix @@ -0,0 +1,27 @@ +{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, sqlite }: + +rustPlatform.buildRustPackage rec { + pname = "mbutiles"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "amarant"; + repo = pname; + rev = version; + hash = "sha256-XVMmTqZsfIkCmZAdGi70HWiV10iawUpN3XbH93VEh7I="; + }; + + cargoPatches = [ ./cargo-lock.patch ]; + cargoHash = "sha256-fOCOtB/orCAKQROMBCecGBxArMafkTp/dby3O4GgCMg="; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ sqlite ]; + + meta = with lib; { + description = "mbtiles utility in Rust, generate MBTiles from tiles directories and extract tiles from MBTiles file"; + inherit (src.meta) homepage; + license = licenses.bsd3; + maintainers = [ maintainers.sikmir ]; + }; +}