From 396995f006e93374d9f9f8ad1965374f30eb0b9c Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 7 Jan 2024 10:46:19 +0000 Subject: [PATCH] valhalla: upstream fix for `gcc-13` build Without the change `valhalla` build fails on `staging-next` as https://hydra.nixos.org/build/245511803: /build/source/src/baldr/transitdeparture.cc: In constructor 'valhalla::baldr::TransitDeparture::TransitDeparture(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, bool, bool)': /build/source/src/baldr/transitdeparture.cc:24:16: error: 'runtime_error' is not a member of 'std' 24 | throw std::runtime_error("TransitDeparture: Exceeded maximum transit line Ids per tile"); | ^~~~~~~~~~~~~ /build/source/src/baldr/transitdeparture.cc:3:1: note: 'std::runtime_error' is defined in header ''; did you forget to '#include '? 2 | #include "midgard/logging.h" +++ |+#include --- pkgs/development/libraries/valhalla/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/valhalla/default.nix b/pkgs/development/libraries/valhalla/default.nix index bfd23747db0a..8ad3bb9c356c 100644 --- a/pkgs/development/libraries/valhalla/default.nix +++ b/pkgs/development/libraries/valhalla/default.nix @@ -36,6 +36,14 @@ stdenv.mkDerivation (finalAttrs: { url = "https://github.com/valhalla/valhalla/commit/e4845b68e8ef8de9eabb359b23bf34c879e21f2b.patch"; hash = "sha256-xCufmXHGj1JxaMwm64JT9FPY+o0+x4glfJSYLdvHI8U="; }) + + # Fix gcc-13 build: + # https://github.com/valhalla/valhalla/pull/4154 + (fetchpatch { + name = "gcc-13.patch"; + url = "https://github.com/valhalla/valhalla/commit/ed93f30272377cc6803533a1bb94fe81d14af81c.patch"; + hash = "sha256-w4pnOqk/Jj3unVuesE64QSecrUIVSqwK69t9xNVc4GA="; + }) ]; postPatch = ''