From 9e5b4e9edefbc903b6a0593220f78de2182ccebc Mon Sep 17 00:00:00 2001 From: Olivier Le Doeuff Date: Sat, 27 Apr 2024 23:44:05 +0200 Subject: [PATCH] stduuid: fix cmake version stduuid reported the wrong version to cmake, causing `find_package(stduuid 1.2.3)` to fail (but `find_package(stduuid 1.0)` was working which is NOT expected. Patch is from this [PR](https://github.com/mariusbancila/stduuid/pull/79). This will need to be updated if `stduuid` is getting maintained again one day. --- pkgs/development/libraries/stduuid/default.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/stduuid/default.nix b/pkgs/development/libraries/stduuid/default.nix index c7e31c990087..af9ea3763981 100644 --- a/pkgs/development/libraries/stduuid/default.nix +++ b/pkgs/development/libraries/stduuid/default.nix @@ -1,7 +1,8 @@ -{ stdenv, cmake, fetchFromGitHub, lib }: let +{ stdenv, cmake, fetchFromGitHub, fetchpatch, lib }: let version = "1.2.3"; in stdenv.mkDerivation { - name = "stduuid-${version}"; + pname = "stduuid"; + inherit version; src = fetchFromGitHub { owner = "mariusbancila"; @@ -12,6 +13,15 @@ in stdenv.mkDerivation { nativeBuildInputs = [ cmake ]; + patches = [ + # stduuid report version 1.0 instead of 1.2.3 for cmake's find_package to properly work + # If version is updated one day, this patch will need to be updated + (fetchpatch { + url = "https://github.com/OlivierLDff/stduuid/commit/b02c70c0a4bef2c82152503e13c9a67d6631b13d.patch"; + hash = "sha256-tv4rllhngdgjXX35kcM69yXo0DXF/BQ+AUbiC1gJIU8="; + }) + ]; + meta = { description = "A C++17 cross-platform implementation for UUIDs"; license = lib.licenses.mit;