From 5238a8ac8ea3f9b135b8dca9955f6e9a5e7038be Mon Sep 17 00:00:00 2001 From: Josh Holland Date: Tue, 7 Oct 2025 08:58:57 +0100 Subject: [PATCH] cld2: fix build with CMake 4 Import an updated patch from Debian to update the cmake_minimum_version to 3.10. Also add the patch from upstream to fix the build with C++0x. Fixes: #449383 Related: #445447 --- pkgs/by-name/cl/cld2/package.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/cl/cld2/package.nix b/pkgs/by-name/cl/cld2/package.nix index 0c9b5c6a0b37..5be7109400b9 100644 --- a/pkgs/by-name/cl/cld2/package.nix +++ b/pkgs/by-name/cl/cld2/package.nix @@ -4,6 +4,7 @@ fetchFromGitHub, cmake, fetchpatch, + fetchDebianPatch, }: stdenv.mkDerivation { @@ -18,10 +19,17 @@ stdenv.mkDerivation { }; patches = [ + (fetchDebianPatch { + pname = "cld2"; + version = "0.0.0-git20150806"; + debianRevision = "10"; + patch = "add-cmake-file.patch"; + hash = "sha256-iLacWD4jQxid76pzGpDW3ZJ8Dyaksfj1pNTrU7qSBQM="; + }) (fetchpatch { - name = "add-cmakelists.txt"; - url = "https://github.com/CLD2Owners/cld2/pull/65/commits/9cfac02c2ac7802ab7079560b38a474473c45f51.patch"; - hash = "sha256-uOjmUk8kMFl+wED44ErXoLRyblhgDwFx9K1Wj65Omh8="; + name = "fix-narrowing-errors.txt"; + url = "https://github.com/ripjar/cld2/pull/1/commits/79be1adea78f0d376cb793f4dae8e70b100dadcc.patch"; + hash = "sha256-i4WWYBx16kYXZ5IQPACWbS/HGsQysXre1SngYlAfNaM="; }) ];