From 5c603601b15d623b195c7f819cb030443c7de7e3 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 14 Jan 2026 06:42:32 +0100 Subject: [PATCH] ocamlPackages.owl: fix for GCC 15 --- .../ocaml-modules/owl-base/default.nix | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/pkgs/development/ocaml-modules/owl-base/default.nix b/pkgs/development/ocaml-modules/owl-base/default.nix index 864a3fa5b870..a9c1b14af8b6 100644 --- a/pkgs/development/ocaml-modules/owl-base/default.nix +++ b/pkgs/development/ocaml-modules/owl-base/default.nix @@ -2,17 +2,27 @@ lib, buildDunePackage, fetchurl, + fetchpatch, + applyPatches, }: -buildDunePackage rec { +buildDunePackage (finalAttrs: { pname = "owl-base"; version = "1.2"; - duneVersion = "3"; + src = applyPatches { + src = fetchurl { + url = "https://github.com/owlbarn/owl/releases/download/${finalAttrs.version}/owl-${finalAttrs.version}.tbz"; + hash = "sha256-OBei5DkZIsiiIltOM8qV2mgJJGmU5r8pGjAMgtjKxsU="; + }; - src = fetchurl { - url = "https://github.com/owlbarn/owl/releases/download/${version}/owl-${version}.tbz"; - hash = "sha256-OBei5DkZIsiiIltOM8qV2mgJJGmU5r8pGjAMgtjKxsU="; + patches = [ + # Compatibility with GCC 15 + (fetchpatch { + url = "https://github.com/owlbarn/owl/commit/3e66ccb0b1d21b73fa703f3d3f416ec0107860a4.patch"; + hash = "sha256-0bV0ogTvtDoO8kEvE5QcJFRWqOJ1qiXGjXY9Ekp30M0="; + }) + ]; }; minimalOCamlVersion = "4.10"; @@ -25,4 +35,4 @@ buildDunePackage rec { maintainers = [ lib.maintainers.bcdarwin ]; license = lib.licenses.mit; }; -} +})