73 lines
1.3 KiB
Nix
73 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
pkg-config,
|
|
bzip2,
|
|
libxml2,
|
|
libzip,
|
|
boost,
|
|
lua,
|
|
luabind,
|
|
tbb_2022,
|
|
expat,
|
|
nixosTests,
|
|
}:
|
|
|
|
let
|
|
tbb = tbb_2022;
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "osrm-backend";
|
|
version = "6.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Project-OSRM";
|
|
repo = "osrm-backend";
|
|
tag = "V${version}";
|
|
hash = "sha256-R2Sx+DbT6gROI8X1fkxqOGbMqgmsnNiw2rUX6gSZuTs=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
bzip2
|
|
libxml2
|
|
libzip
|
|
boost
|
|
lua
|
|
luabind
|
|
tbb
|
|
expat
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
# Needed with GCC 12
|
|
"-Wno-error=uninitialized"
|
|
# Needed with GCC 14
|
|
"-Wno-error=maybe-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://project-osrm.org/";
|
|
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/${src.tag}/CHANGELOG.md";
|
|
license = lib.licenses.bsd2;
|
|
maintainers = with lib.maintainers; [ erictapen ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|