{mariadb-connector-c_{3_1,3_2,3_3},unixODBCDrivers.mariadb}: fix build with CMake 4 (#441576)

This commit is contained in:
K900
2025-09-18 08:40:47 +03:00
committed by GitHub
2 changed files with 10 additions and 3 deletions
@@ -42,13 +42,13 @@
mariadb = stdenv.mkDerivation rec {
pname = "mariadb-connector-odbc";
version = "3.1.20";
version = "3.2.6";
src = fetchFromGitHub {
owner = "mariadb-corporation";
repo = "mariadb-connector-odbc";
rev = version;
hash = "sha256-l+HlS7/A0shwsEXYKDhi+QCmwHaMTeKrtcvo9yYpYws=";
hash = "sha256-FdnA3/xDxnk2910LCMPWQTcUUSYfUsnnZ3Hqj0uey5s=";
# this driver only seems to build correctly when built against the mariadb-connect-c subrepo
# (see https://github.com/NixOS/nixpkgs/issues/73258)
fetchSubmodules = true;
@@ -29,12 +29,19 @@ stdenv.mkDerivation {
inherit hash;
};
patches = [
patches = lib.optionals (lib.versionOlder version "3.4") [
# fix compilation against gcc15
(fetchpatch {
url = "https://github.com/mariadb-corporation/mariadb-connector-c/commit/e8448137f3365568090d5c0d4051039ddc1cdb6f.patch";
hash = "sha256-aDbaaJA8DxGG5RrOa+CHhk4wuzlBy5tWyS+f/zVYU0c=";
})
# Fix the build with CMake 4.
(fetchpatch {
name = "mariadb-connector-c-fix-cmake-4.patch";
url = "https://github.com/mariadb-corporation/mariadb-connector-c/commit/598dc3d2d7a63e5d250421dd0ea88be55ea8511f.patch";
hash = "sha256-HojNRobguBmtpEdr2lVi/MpcoDAsZnb3+tw/pt376es=";
})
];
outputs = [