Merge pull request #186462 from apraga/bio-bigfile-1.07

bio-bigfile: init 1.07
This commit is contained in:
Doron Behar 2023-11-30 13:39:01 +00:00 committed by GitHub
commit df20638983
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 121 additions and 5 deletions

View file

@ -24,16 +24,12 @@ stdenv.mkDerivation rec {
buildInputs = [ libpng libuuid zlib bzip2 xz openssl curl libmysqlclient ];
patchPhase = ''
runHook prePatch
postPatch = ''
substituteInPlace ./src/checkUmask.sh \
--replace "/bin/bash" "${bash}/bin/bash"
substituteInPlace ./src/hg/sqlEnvTest.sh \
--replace "which mysql_config" "${which}/bin/which ${libmysqlclient}/bin/mysql_config"
runHook postPatch
'';
buildPhase = ''

View file

@ -0,0 +1,66 @@
{
BioPerl,
IOString,
buildPerlModule,
fetchFromGitHub,
fetchpatch,
fetchurl,
kent,
lib,
libmysqlclient,
libpng,
openssl,
perl
}:
buildPerlModule rec {
pname = "Bio-BigFile";
version = "1.07";
src = fetchurl {
url = "mirror://cpan/authors/id/L/LD/LDS/Bio-BigFile-${version}.tar.gz";
sha256 = "277b66ce8acbdd52399e2c5a0cf4e3bd5c74c12b94877cd383d0c4c97740d16d";
};
# 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
# BioBigfile needs the environment variable KENT_SRC to find kent
KENT_SRC = kent.overrideAttrs (old: rec {
pname = "kent";
version = "335";
src = fetchFromGitHub {
owner = "ucscGenomeBrowser";
repo = "kent";
rev = "v${version}_base";
sha256 = "1455dwzpaq4hyhcqj3fpwgq5a39kp46qarfbr6ms6l2lz583r083";
};
patches = [
# Fix for linking error with zlib. Adding zlib as a dependency is not enough
./kent-utils.patch
# Vendoring upstream patch (not merged in uscsGenomeBrowser/kent)
./kent-316e4fd40f53c96850128fd65097a42623d1e736.patch
];
});
buildInputs = [
BioPerl
IOString
libpng
libmysqlclient
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.artistic2;
maintainers = with maintainers; [ apraga ];
};
}

View file

@ -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().

View file

@ -0,0 +1,27 @@
--- ./src/utils/bigWigCat/makefile 2023-03-27 14:03:01.585896516 +0000
+++ ./src/utils/bigWigCat/makefile 2023-03-27 14:03:27.716180479 +0000
@@ -1,3 +1,4 @@
kentSrc = ../..
A = bigWigCat
include $(kentSrc)/inc/userApp.mk
+L += -lz
--- ./src/utils/pslLiftSubrangeBlat/makefile 1970-01-01 00:00:01.000000000 +0000
+++ ./src/utils/pslLiftSubrangeBlat/makefile 2023-03-27 14:36:59.044600213 +0000
@@ -3,7 +3,7 @@
preMyLibs += ../../lib/$(MACHTYPE)/jkhgap.a
include $(kentSrc)/inc/userApp.mk
HG_INC += -I../../hg/inc
-L += $(MYSQLLIBS) -lm
+L += $(MYSQLLIBS) -lm -lz
test::
cd tests && ${MAKE} test
--- ./src/utils/bigWigCorrelate/makefile 2023-03-27 14:36:23.117545553 +0000
+++ ./src/utils/bigWigCorrelate/makefile 2023-03-27 14:36:33.854328176 +0000
@@ -1,3 +1,4 @@
kentSrc = ../..
A = bigWigCorrelate
include $(kentSrc)/inc/userApp.mk
+L += -lz

View file

@ -1803,6 +1803,8 @@ with self; {
};
};
BioBigFile = callPackage ../development/perl-modules/Bio-BigFile { };
BioPerl = buildPerlPackage {
pname = "BioPerl";
version = "1.7.8";