Merge pull request #248414 from dotlambda/valhalla-3.4.0
valhalla: 3.1.0 -> 3.4.0
This commit is contained in:
commit
0e860bc023
@ -1,7 +1,23 @@
|
||||
{ lib, mkDerivation, fetchFromGitHub, pkg-config
|
||||
, qmake, qttools, kirigami2, qtquickcontrols2, qtlocation
|
||||
, libosmscout, valhalla, libpostal, osrm-backend, protobuf
|
||||
, libmicrohttpd, sqlite, marisa, kyotocabinet, boost
|
||||
{ lib
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, pkg-config
|
||||
, qmake
|
||||
, qttools
|
||||
, boost
|
||||
, kirigami2
|
||||
, kyotocabinet
|
||||
, libmicrohttpd
|
||||
, libosmscout
|
||||
, libpostal
|
||||
, marisa
|
||||
, osrm-backend
|
||||
, protobuf
|
||||
, qtquickcontrols2
|
||||
, qtlocation
|
||||
, sqlite
|
||||
, valhalla
|
||||
}:
|
||||
|
||||
let
|
||||
@ -31,6 +47,19 @@ mkDerivation rec {
|
||||
libpostal sqlite marisa kyotocabinet boost protobuf date
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Valhalla 3.2.1 support. Only required for next patch to apply cleanly
|
||||
(fetchpatch {
|
||||
url = "https://github.com/rinigus/osmscout-server/commit/1df9d383e61dd14cbe9e5b52412a2e951cee2ee4.patch";
|
||||
hash = "sha256-h+YTyHr4RYgwH5bfVgyujSekbL2LfV8vJgVkjXT0I10=";
|
||||
})
|
||||
# Valhalla 3.4.0 support
|
||||
(fetchpatch {
|
||||
url = "https://github.com/rinigus/osmscout-server/commit/fe6562a4c3ba5da2735232ea8fdc7f71d7e7e714.patch";
|
||||
hash = "sha256-wibLTFk3cFS5mcC71TgMA9ZAAHS3mbjboFHqax6nCxs=";
|
||||
})
|
||||
];
|
||||
|
||||
qmakeFlags = [
|
||||
"SCOUT_FLAVOR=kirigami" # Choose to build the kirigami UI variant
|
||||
"CONFIG+=disable_mapnik" # Disable the optional mapnik backend
|
||||
|
@ -1,32 +1,42 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
||||
, zlib, curl, protobuf, prime-server, boost, sqlite, libspatialite
|
||||
, luajit, geos39, python3, zeromq }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, boost
|
||||
, curl
|
||||
, geos
|
||||
, libspatialite
|
||||
, luajit
|
||||
, prime-server
|
||||
, protobuf
|
||||
, python3
|
||||
, sqlite
|
||||
, zeromq
|
||||
, zlib
|
||||
, testers
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "valhalla";
|
||||
version = "3.1.0";
|
||||
version = "3.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "valhalla";
|
||||
repo = "valhalla";
|
||||
rev = version;
|
||||
sha256 = "04vxvzy6hnhdvb9lh1p5vqzzi2drv0g4l2gnbdp44glipbzgd4dr";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-1X9vsWsgnzmXn7bCMhN2PNwtfV0RRdzRFZIrQN2PLfA=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
# https://github.com/valhalla/valhalla/issues/2119
|
||||
postPatch = ''
|
||||
for f in valhalla/mjolnir/transitpbf.h \
|
||||
src/mjolnir/valhalla_query_transit.cc; do
|
||||
substituteInPlace $f --replace 'SetTotalBytesLimit(limit, limit)' \
|
||||
'SetTotalBytesLimit(limit)'
|
||||
done
|
||||
substituteInPlace src/bindings/python/CMakeLists.txt \
|
||||
--replace "\''${Python_SITEARCH}" "${placeholder "out"}/${python3.sitePackages}"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [
|
||||
zlib curl protobuf prime-server boost sqlite libspatialite
|
||||
luajit geos39 python3 zeromq
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
@ -34,17 +44,36 @@ stdenv.mkDerivation rec {
|
||||
"-DENABLE_BENCHMARKS=OFF"
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
curl
|
||||
geos
|
||||
libspatialite
|
||||
luajit
|
||||
prime-server
|
||||
protobuf
|
||||
python3
|
||||
sqlite
|
||||
zeromq
|
||||
zlib
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
substituteInPlace "$out"/lib/pkgconfig/libvalhalla.pc \
|
||||
--replace '=''${prefix}//' '=/' \
|
||||
--replace '=''${exec_prefix}//' '=/'
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/valhalla/valhalla/blob/${finalAttrs.src.rev}/CHANGELOG.md";
|
||||
description = "Open Source Routing Engine for OpenStreetMap";
|
||||
homepage = "https://valhalla.readthedocs.io/";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.Thra11 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user