1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
boost,
curl,
cxxopts,
gdal,
geos,
libspatialite,
luajit,
lz4,
prime-server,
protobuf,
python3,
rapidjson,
sqlite,
zeromq,
zlib,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "valhalla";
version = "3.6.3";
src = fetchFromGitHub {
owner = "valhalla";
repo = "valhalla";
tag = finalAttrs.version;
hash = "sha256-Q+h1k26UPiZEVhtonjipUS6gGIUZHM16pYgCxq/Zav0=";
fetchSubmodules = true;
};
postPatch = ''
substituteInPlace src/bindings/python/CMakeLists.txt \
--replace-fail "\''${Python_SITEARCH}" "${placeholder "out"}/${python3.sitePackages}"
'';
nativeBuildInputs = [
cmake
pkg-config
];
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
(lib.cmakeBool "ENABLE_TESTS" false)
(lib.cmakeBool "ENABLE_SINGLE_FILES_WERROR" false)
(lib.cmakeBool "PREFER_EXTERNAL_DEPS" true)
];
buildInputs = [
boost
cxxopts
lz4
(python3.withPackages (ps: [ ps.pybind11 ]))
rapidjson
zeromq
];
propagatedBuildInputs = [
curl
gdal
geos
libspatialite
luajit
prime-server
protobuf
sqlite
zlib
];
passthru.tests = {
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
meta = {
changelog = "https://github.com/valhalla/valhalla/blob/${finalAttrs.src.tag}/CHANGELOG.md";
description = "Open Source Routing Engine for OpenStreetMap";
homepage = "https://valhalla.readthedocs.io/";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.Thra11 ];
pkgConfigModules = [ "libvalhalla" ];
platforms = lib.platforms.linux;
};
})
|