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
|
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
bzip2,
libxml2,
libzip,
boost,
lua,
luabind,
tbb,
expat,
nixosTests,
}:
stdenv.mkDerivation {
pname = "osrm-backend";
version = "5.27.1-unstable-2024-11-03";
src = fetchFromGitHub {
owner = "Project-OSRM";
repo = "osrm-backend";
rev = "3614af7f6429ee35c3f2e836513b784a74664ab6";
hash = "sha256-iix++G49cC13wZGZIpXu1SWGtVAcqpuX3GhsIaETzUU=";
};
patches = [
# Taken from https://github.com/Project-OSRM/osrm-backend/pull/7073.
./boost187-compat.patch
];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
bzip2
libxml2
libzip
boost
lua
luabind
tbb
expat
];
# Needed with GCC 12
env.NIX_CFLAGS_COMPILE = "-Wno-error=uninitialized";
postInstall = ''
mkdir -p $out/share/osrm-backend
cp -r ../profiles $out/share/osrm-backend/profiles
'';
passthru.tests = {
inherit (nixosTests) osrm-backend;
};
meta = {
homepage = "https://github.com/Project-OSRM/osrm-backend/wiki";
description = "Open Source Routing Machine computes shortest paths in a graph. It was designed to run well with map data from the Openstreetmap Project";
changelog = "https://github.com/Project-OSRM/osrm-backend/blob/master/CHANGELOG.md";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ erictapen ];
platforms = lib.platforms.unix;
};
}
|