Unverified Commit 08418afb authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #251331 from Thra11/valhalla-3-4-0-aarch64

valhalla: fix build with gcc 12
parents 41948203 e7fb2651
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, boost
@@ -29,6 +30,14 @@ stdenv.mkDerivation (finalAttrs: {
    fetchSubmodules = true;
  };

  patches = [
    # Fix build
    (fetchpatch {
      url = "https://github.com/valhalla/valhalla/commit/e4845b68e8ef8de9eabb359b23bf34c879e21f2b.patch";
      hash = "sha256-xCufmXHGj1JxaMwm64JT9FPY+o0+x4glfJSYLdvHI8U=";
    })
  ];

  postPatch = ''
    substituteInPlace src/bindings/python/CMakeLists.txt \
      --replace "\''${Python_SITEARCH}" "${placeholder "out"}/${python3.sitePackages}"
@@ -44,6 +53,11 @@ stdenv.mkDerivation (finalAttrs: {
    "-DENABLE_BENCHMARKS=OFF"
  ];

  env.NIX_CFLAGS_COMPILE = toString [
    # Needed for date submodule with GCC 12 https://github.com/HowardHinnant/date/issues/750
    "-Wno-error=stringop-overflow"
  ];

  buildInputs = [
    boost
    curl
+12 −1
Original line number Diff line number Diff line
@@ -25562,6 +25562,11 @@ with pkgs;
  valhalla = callPackage ../development/libraries/valhalla {
    boost = boost.override { enablePython = true; python = python38; };
    protobuf = protobuf3_21.override {
      abseil-cpp = abseil-cpp_202103.override {
        cxxStandard = "17";
      };
    };
  };
  vamp-plugin-sdk = callPackage ../development/libraries/audio/vamp-plugin-sdk { };
@@ -34744,7 +34749,13 @@ with pkgs;
  osmo-sip-connector = callPackage ../servers/osmocom/osmo-sip-connector { };
  osmscout-server = libsForQt5.callPackage ../applications/misc/osmscout-server { };
  osmscout-server = libsForQt5.callPackage ../applications/misc/osmscout-server {
    protobuf = protobuf3_21.override {
      abseil-cpp = abseil-cpp_202103.override {
        cxxStandard = "17";
      };
    };
  };
  palemoon-bin = callPackage ../applications/networking/browsers/palemoon/bin.nix { };