From 658cb5ee7638a146333e7d9424a9a2df85286408 Mon Sep 17 00:00:00 2001 From: Harinn Date: Tue, 5 May 2026 21:50:00 +0700 Subject: [PATCH] paml: fix build with GCC 15 --- .../paml/fix-ProcessNodeAnnotation-declaration.patch | 11 +++++++++++ pkgs/by-name/pa/paml/package.nix | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 pkgs/by-name/pa/paml/fix-ProcessNodeAnnotation-declaration.patch diff --git a/pkgs/by-name/pa/paml/fix-ProcessNodeAnnotation-declaration.patch b/pkgs/by-name/pa/paml/fix-ProcessNodeAnnotation-declaration.patch new file mode 100644 index 000000000000..ffe065566ec0 --- /dev/null +++ b/pkgs/by-name/pa/paml/fix-ProcessNodeAnnotation-declaration.patch @@ -0,0 +1,11 @@ +--- a/src/mcmctree.c ++++ b/src/mcmctree.c +@@ -42,7 +42,7 @@ extern double PjumpOptimum; + + int GetOptions(char *ctlf); + int ReadTreeSeqs(FILE*fout); +-int ProcessNodeAnnotation(); ++int ProcessNodeAnnotation(int* haslabel); + int ReadBlengthGH(char infile[]); + int GenerateBlengthGH(char infile[]); + int GetMem(void); diff --git a/pkgs/by-name/pa/paml/package.nix b/pkgs/by-name/pa/paml/package.nix index 5de83b4b243a..2910b1f3f966 100644 --- a/pkgs/by-name/pa/paml/package.nix +++ b/pkgs/by-name/pa/paml/package.nix @@ -15,6 +15,11 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-P/oHaLxoQzjFuvmHyRdShHv1ayruy6O/I9w8aTyya2s="; }; + patches = [ + # https://github.com/abacus-gene/paml/pull/78 + ./fix-ProcessNodeAnnotation-declaration.patch + ]; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-D_POSIX_C_SOURCE"; preBuild = ''