diff --git a/pkgs/servers/osrm-backend/darwin.patch b/pkgs/servers/osrm-backend/darwin.patch deleted file mode 100644 index 0aa57e4e1b81..000000000000 --- a/pkgs/servers/osrm-backend/darwin.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e49fac2..25e3302 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -34,6 +34,14 @@ option(ENABLE_GLIBC_WORKAROUND "Workaround GLIBC symbol exports" OFF) - - list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") - -+IF(APPLE) -+ set(CMAKE_THREAD_LIBS_INIT "-lpthread") -+ set(CMAKE_HAVE_THREADS_LIBRARY 1) -+ set(CMAKE_USE_WIN32_THREADS_INIT 0) -+ set(CMAKE_USE_PTHREADS_INIT 1) -+ set(THREADS_PREFER_PTHREAD_FLAG ON) -+ENDIF() -+ - if(ENABLE_MASON) - # versions in use - set(MASON_BOOST_VERSION "1.65.1") -@@ -405,7 +413,8 @@ endif() - if(APPLE) - set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10") - execute_process(COMMAND xcrun --sdk macosx --show-sdk-path OUTPUT_VARIABLE CMAKE_OSX_SYSROOT OUTPUT_STRIP_TRAILING_WHITESPACE) -+ execute_process(COMMAND uname -m OUTPUT_VARIABLE JAMBA_OSX_NATIVE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) -- set(CMAKE_OSX_ARCHITECTURES "x86_64") -+ set(CMAKE_OSX_ARCHITECTURES "${JAMBA_OSX_NATIVE_ARCHITECTURE}") -+ message(STATUS "Set Architecture to ${JAMBA_OSX_NATIVE_ARCHITECTURE} on OS X") -- message(STATUS "Set Architecture to x64 on OS X") - exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION) - string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION}) diff --git a/pkgs/servers/osrm-backend/default.nix b/pkgs/servers/osrm-backend/default.nix index bf1d588ff1a6..23a3d85b91e2 100644 --- a/pkgs/servers/osrm-backend/default.nix +++ b/pkgs/servers/osrm-backend/default.nix @@ -1,19 +1,47 @@ -{lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config, bzip2, libxml2, libzip, boost179, lua, luabind, tbb, expat}: +{ + lib, + stdenv, + fetchFromGitHub, + fetchpatch, + cmake, + pkg-config, + bzip2, + libxml2, + libzip, + boost, + lua, + luabind, + tbb, + expat, + nixosTests, +}: stdenv.mkDerivation rec { pname = "osrm-backend"; - version = "5.26.0"; + version = "5.27.1"; src = fetchFromGitHub { - owner = "Project-OSRM"; - repo = "osrm-backend"; + owner = "Project-OSRM"; + repo = "osrm-backend"; rev = "v${version}"; - sha256 = "sha256-kqRYE26aeq7nCen56TJo3BlyLFWn4NMltsq+re64/VQ="; + sha256 = "sha256-3oA/U5O4GLfwMF7x99JQuFK7ewDrLJLh6BBLYfnyNaM="; }; - nativeBuildInputs = [ cmake pkg-config ]; + nativeBuildInputs = [ + cmake + pkg-config + ]; - buildInputs = [ bzip2 libxml2 libzip boost179 lua luabind tbb expat ]; + buildInputs = [ + bzip2 + libxml2 + libzip + boost + lua + luabind + tbb + expat + ]; patches = [ # gcc-13 build fix: @@ -23,8 +51,6 @@ stdenv.mkDerivation rec { url = "https://github.com/Project-OSRM/osrm-backend/commit/af59a9cfaee4d601b5c88391624a05f2a38da17b.patch"; hash = "sha256-dB9JP/DrJXpFGLD/paein2z64UtHIYZ17ycb91XWpEI="; }) - - ./darwin.patch ]; env.NIX_CFLAGS_COMPILE = toString [ @@ -35,13 +61,21 @@ stdenv.mkDerivation rec { "-Wno-error=array-bounds" ]; - postInstall = "mkdir -p $out/share/osrm-backend && cp -r ../profiles $out/share/osrm-backend/profiles"; + 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 ]; + maintainers = with lib.maintainers; [ erictapen ]; platforms = lib.platforms.unix; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 61530ac2ca3a..2a8e717d4047 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25429,7 +25429,11 @@ with pkgs; openxr-loader = callPackage ../development/libraries/openxr-loader { }; - osrm-backend = callPackage ../servers/osrm-backend { }; + osrm-backend = callPackage ../servers/osrm-backend { + tbb = tbb_2021_11; + # https://github.com/Project-OSRM/osrm-backend/issues/6503 + boost = boost179; + }; oven-media-engine = callPackage ../servers/misc/oven-media-engine { };