lol

Merge pull request #248414 from dotlambda/valhalla-3.4.0

valhalla: 3.1.0 -> 3.4.0

authored by

Robert Schütz and committed by
GitHub
0e860bc0 231801e7

+80 -22
+33 -4
pkgs/applications/misc/osmscout-server/default.nix
··· 1 - { lib, mkDerivation, fetchFromGitHub, pkg-config 2 - , qmake, qttools, kirigami2, qtquickcontrols2, qtlocation 3 - , libosmscout, valhalla, libpostal, osrm-backend, protobuf 4 - , libmicrohttpd, sqlite, marisa, kyotocabinet, boost 1 + { lib 2 + , mkDerivation 3 + , fetchFromGitHub 4 + , fetchpatch 5 + , pkg-config 6 + , qmake 7 + , qttools 8 + , boost 9 + , kirigami2 10 + , kyotocabinet 11 + , libmicrohttpd 12 + , libosmscout 13 + , libpostal 14 + , marisa 15 + , osrm-backend 16 + , protobuf 17 + , qtquickcontrols2 18 + , qtlocation 19 + , sqlite 20 + , valhalla 5 21 }: 6 22 7 23 let ··· 29 45 kirigami2 qtquickcontrols2 qtlocation 30 46 valhalla libosmscout osrm-backend libmicrohttpd 31 47 libpostal sqlite marisa kyotocabinet boost protobuf date 48 + ]; 49 + 50 + patches = [ 51 + # Valhalla 3.2.1 support. Only required for next patch to apply cleanly 52 + (fetchpatch { 53 + url = "https://github.com/rinigus/osmscout-server/commit/1df9d383e61dd14cbe9e5b52412a2e951cee2ee4.patch"; 54 + hash = "sha256-h+YTyHr4RYgwH5bfVgyujSekbL2LfV8vJgVkjXT0I10="; 55 + }) 56 + # Valhalla 3.4.0 support 57 + (fetchpatch { 58 + url = "https://github.com/rinigus/osmscout-server/commit/fe6562a4c3ba5da2735232ea8fdc7f71d7e7e714.patch"; 59 + hash = "sha256-wibLTFk3cFS5mcC71TgMA9ZAAHS3mbjboFHqax6nCxs="; 60 + }) 32 61 ]; 33 62 34 63 qmakeFlags = [
+47 -18
pkgs/development/libraries/valhalla/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, pkg-config 2 - , zlib, curl, protobuf, prime-server, boost, sqlite, libspatialite 3 - , luajit, geos39, python3, zeromq }: 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , cmake 5 + , pkg-config 6 + , boost 7 + , curl 8 + , geos 9 + , libspatialite 10 + , luajit 11 + , prime-server 12 + , protobuf 13 + , python3 14 + , sqlite 15 + , zeromq 16 + , zlib 17 + , testers 18 + }: 4 19 5 - stdenv.mkDerivation rec { 20 + stdenv.mkDerivation (finalAttrs: { 6 21 pname = "valhalla"; 7 - version = "3.1.0"; 22 + version = "3.4.0"; 8 23 9 24 src = fetchFromGitHub { 10 25 owner = "valhalla"; 11 26 repo = "valhalla"; 12 - rev = version; 13 - sha256 = "04vxvzy6hnhdvb9lh1p5vqzzi2drv0g4l2gnbdp44glipbzgd4dr"; 27 + rev = finalAttrs.version; 28 + hash = "sha256-1X9vsWsgnzmXn7bCMhN2PNwtfV0RRdzRFZIrQN2PLfA="; 14 29 fetchSubmodules = true; 15 30 }; 16 31 17 - # https://github.com/valhalla/valhalla/issues/2119 18 32 postPatch = '' 19 - for f in valhalla/mjolnir/transitpbf.h \ 20 - src/mjolnir/valhalla_query_transit.cc; do 21 - substituteInPlace $f --replace 'SetTotalBytesLimit(limit, limit)' \ 22 - 'SetTotalBytesLimit(limit)' 23 - done 33 + substituteInPlace src/bindings/python/CMakeLists.txt \ 34 + --replace "\''${Python_SITEARCH}" "${placeholder "out"}/${python3.sitePackages}" 24 35 ''; 25 36 26 - nativeBuildInputs = [ cmake pkg-config ]; 27 - buildInputs = [ 28 - zlib curl protobuf prime-server boost sqlite libspatialite 29 - luajit geos39 python3 zeromq 37 + nativeBuildInputs = [ 38 + cmake 39 + pkg-config 30 40 ]; 31 41 32 42 cmakeFlags = [ ··· 34 44 "-DENABLE_BENCHMARKS=OFF" 35 45 ]; 36 46 47 + buildInputs = [ 48 + boost 49 + curl 50 + geos 51 + libspatialite 52 + luajit 53 + prime-server 54 + protobuf 55 + python3 56 + sqlite 57 + zeromq 58 + zlib 59 + ]; 60 + 37 61 postFixup = '' 38 62 substituteInPlace "$out"/lib/pkgconfig/libvalhalla.pc \ 39 63 --replace '=''${prefix}//' '=/' \ 40 64 --replace '=''${exec_prefix}//' '=/' 41 65 ''; 42 66 67 + passthru.tests = { 68 + pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 69 + }; 70 + 43 71 meta = with lib; { 72 + changelog = "https://github.com/valhalla/valhalla/blob/${finalAttrs.src.rev}/CHANGELOG.md"; 44 73 description = "Open Source Routing Engine for OpenStreetMap"; 45 74 homepage = "https://valhalla.readthedocs.io/"; 46 75 license = licenses.mit; 47 76 maintainers = [ maintainers.Thra11 ]; 48 77 platforms = platforms.linux; 49 78 }; 50 - } 79 + })