commit 80838bf116f84905c960b8a7cf614b912b6d5696
parent 0a74842d165f75e1eb95edefb5652279f5bf9ded
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Fri, 13 Dec 2024 00:30:01 +0400
Add libgeodesk
Diffstat:
2 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -467,6 +467,7 @@ lib.makeScope newScope (
cykhash = callPackage ./osm/cykhash { };
gcgn-converter = callPackage ./osm/gcgn-converter { };
level0 = callPackage ./osm/level0 { };
+ libgeodesk = callPackage ./osm/libgeodesk { };
map-machine = callPackage ./osm/map-machine { };
map-stylizer = callPackage ./osm/map-stylizer { };
maperitive = callPackage ./osm/maperitive { };
diff --git a/pkgs/osm/libgeodesk/default.nix b/pkgs/osm/libgeodesk/default.nix
@@ -0,0 +1,50 @@
+{
+ lib,
+ stdenv,
+ fetchFromGitHub,
+ cmake,
+}:
+
+let
+ boost_crc = fetchFromGitHub {
+ owner = "boostorg";
+ repo = "crc";
+ tag = "boost-1.86.0";
+ hash = "sha256-SzPDNHX9arnnZNWf/RedbSw1UwqTNuZCxVmegXHANgY=";
+ };
+ catch2 = fetchFromGitHub {
+ owner = "catchorg";
+ repo = "Catch2";
+ tag = "v3.7.1";
+ hash = "sha256-Zt53Qtry99RAheeh7V24Csg/aMW25DT/3CN/h+BaeoM=";
+ };
+in
+stdenv.mkDerivation rec {
+ pname = "libgeodesk";
+ version = "0.1";
+
+ src = fetchFromGitHub {
+ owner = "clarisma";
+ repo = "libgeodesk";
+ tag = "v${version}";
+ hash = "sha256-eX10Gkgsqa+RA+PDk+jdsQly3sUg2p3cFev5qXwhlG4=";
+ };
+
+ postPatch = ''
+ substituteInPlace CMakeLists.txt \
+ --replace-fail "GIT_REPOSITORY https://github.com/boostorg/crc.git" "SOURCE_DIR ${boost_crc}" \
+ --replace-fail "GIT_TAG boost-1.86.0" "" \
+ --replace-fail "GIT_REPOSITORY https://github.com/catchorg/Catch2.git" "SOURCE_DIR ${catch2}" \
+ --replace-fail "GIT_TAG v3.7.1" ""
+ '';
+
+ nativeBuildInputs = [ cmake ];
+
+ meta = {
+ description = "Fast and storage-efficient spatial database engine for OpenStreetMap data";
+ homepage = "https://github.com/clarisma/libgeodesk";
+ license = lib.licenses.lgpl3Only;
+ maintainers = [ lib.maintainers.sikmir ];
+ platforms = lib.platforms.unix;
+ };
+}