about summary refs log tree commit diff
path: root/pkgs/development/perl-modules
diff options
context:
space:
mode:
authorAlexis Praga <alexis.praga@free.fr>2023-11-19 20:30:17 +0100
committerAlexis Praga <alexis.praga@free.fr>2023-11-21 23:16:39 +0100
commit75fc8ae0f4380d790d71ba76da932b333b2a49f8 (patch)
tree0d43d0737ae0614bf28baec6fa5a14e0bd5a5e67 /pkgs/development/perl-modules
parentcc4bd303877c3eb2db186ca214712f54dbe69bae (diff)
perlPackages.BioBigFile: Addressing reviewer change
Diffstat (limited to 'pkgs/development/perl-modules')
-rw-r--r--pkgs/development/perl-modules/Bio-BigFile/default.nix14
-rw-r--r--pkgs/development/perl-modules/Bio-BigFile/kent-316e4fd40f53c96850128fd65097a42623d1e736.patch25
2 files changed, 32 insertions, 7 deletions
diff --git a/pkgs/development/perl-modules/Bio-BigFile/default.nix b/pkgs/development/perl-modules/Bio-BigFile/default.nix
index a84b218239783..516b6d014c5a4 100644
--- a/pkgs/development/perl-modules/Bio-BigFile/default.nix
+++ b/pkgs/development/perl-modules/Bio-BigFile/default.nix
@@ -25,7 +25,7 @@ buildPerlModule rec {
   # Only kent 335 works with Bio-BigFile, see
   # - official documentation: https://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#bigfile
   # - one of the developer's answer: https://github.com/Ensembl/ensembl-vep/issues/1412
-  # KENT_SRC is needed for building BioBigfil
+  # BioBigfile needs the environment variable KENT_SRC to find kent
   KENT_SRC = kent.overrideAttrs (old: rec {
     pname = "kent";
     version = "335";
@@ -37,13 +37,12 @@ buildPerlModule rec {
       sha256 = "1455dwzpaq4hyhcqj3fpwgq5a39kp46qarfbr6ms6l2lz583r083";
     };
 
-    # The first patch is a custom fix  for linking error with zlib.
     patches = [
+      # Fix  for linking error with zlib. Adding zlib as a dependency is not enough
       ./kent-utils.patch
-      (fetchpatch {
-        url = "https://github.com/ucscGenomeBrowser/kent/commit/316e4fd40f53c96850128fd65097a42623d1e736.patch";
-        sha256 = "sha256-wr3NP5qoSonKz1TLKtQyrTPErCOk2gC1RimcX0tE7cM=";
-      })];
+      # Vendoring upstream patch (not merged in uscsGenomeBrowser/kent)
+      ./kent-316e4fd40f53c96850128fd65097a42623d1e736.patch
+    ];
   });
 
 
@@ -55,12 +54,13 @@ buildPerlModule rec {
     openssl
   ];
 
+  # Ensure compatibility with GCC-11 (compilation fails if -Wno-format-security)
   hardeningDisable = [ "format" ];
 
   meta = with lib; {
     homepage = "https://metacpan.org/dist/Bio-BigFile";
     description = "Manipulate Jim Kent's BigWig and BigBed index files for genomic features";
-    license = licenses.unfree;
+    license = licenses.artistic2;
     maintainers = with maintainers; [ apraga ];
   };
 }
diff --git a/pkgs/development/perl-modules/Bio-BigFile/kent-316e4fd40f53c96850128fd65097a42623d1e736.patch b/pkgs/development/perl-modules/Bio-BigFile/kent-316e4fd40f53c96850128fd65097a42623d1e736.patch
new file mode 100644
index 0000000000000..42d122a8b0f75
--- /dev/null
+++ b/pkgs/development/perl-modules/Bio-BigFile/kent-316e4fd40f53c96850128fd65097a42623d1e736.patch
@@ -0,0 +1,25 @@
+From 316e4fd40f53c96850128fd65097a42623d1e736 Mon Sep 17 00:00:00 2001
+From: Marcel Bargull <marcel.bargull@udo.edu>
+Date: Sat, 27 Mar 2021 16:23:34 +0100
+Subject: [PATCH] Fix linking Clang 11 compiled objects
+
+With Clang 11 htmlRecover from lib/htmshell.h is picked up as a
+definition, not just declaration of the jmp_buf. As such both
+lib/htmshell.c and hg/lib/cart.c export two symbols with the same name.
+---
+ src/inc/htmshell.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/inc/htmshell.h b/src/inc/htmshell.h
+index 9d85f45b936..dd586db761c 100644
+--- a/src/inc/htmshell.h
++++ b/src/inc/htmshell.h
+@@ -160,7 +160,7 @@ void htmlBadVar(char *varName);
+ void htmlImage(char *fileName, int width, int height);
+ /* Display centered image file. */
+ 
+-jmp_buf htmlRecover;  /* Error recovery jump. Exposed for cart's use. */
++extern jmp_buf htmlRecover;  /* Error recovery jump. Exposed for cart's use. */
+ 
+ void htmlVaWarn(char *format, va_list args);
+ /* Write an error message.  (Generally you just call warn() or errAbort().