From 4f95b68b81f79917e80f593a0080d1c0b0adbba6 Mon Sep 17 00:00:00 2001 From: Ivan Mincik Date: Fri, 3 Jan 2025 11:01:31 +0100 Subject: [PATCH] osmium-tool: fix build with gcc14 Co-authored-by: Raphael Das Gupta --- pkgs/by-name/os/osmium-tool/package.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/by-name/os/osmium-tool/package.nix b/pkgs/by-name/os/osmium-tool/package.nix index 5e38abe58790..803b9c13ef99 100644 --- a/pkgs/by-name/os/osmium-tool/package.nix +++ b/pkgs/by-name/os/osmium-tool/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, cmake, installShellFiles, pandoc, @@ -25,6 +26,19 @@ stdenv.mkDerivation rec { sha256 = "sha256-DObqbzdPA4RlrlcZhqA0MQtWBE+D6GRD1pd9U4DARIk="; }; + patches = [ + # Work around https://github.com/osmcode/osmium-tool/issues/276 + # by applying changes from https://github.com/Tencent/rapidjson/pull/719 + (fetchpatch { + url = "https://github.com/Tencent/rapidjson/commit/3b2441b87f99ab65f37b141a7b548ebadb607b96.patch"; + hash = "sha256-Edmq+hdJQFQ4hT3Oz1cv5gX95qQxPLD4aY8QMTonDe8="; + }) + (fetchpatch { + url = "https://github.com/Tencent/rapidjson/commit/862c39be371278a45a88d4d1d75164be57bb7e2d.patch"; + hash = "sha256-V5zbq/THUY75p1RdEPKJK2NVnxbZs07MMwJBAH7nAMg="; + }) + ]; + nativeBuildInputs = [ cmake installShellFiles