1{
2 BioPerl,
3 IOString,
4 buildPerlModule,
5 fetchFromGitHub,
6 fetchurl,
7 kent,
8 lib,
9 libmysqlclient,
10 libpng,
11 openssl,
12}:
13
14buildPerlModule rec {
15 pname = "Bio-BigFile";
16 version = "1.07";
17
18 src = fetchurl {
19 url = "mirror://cpan/authors/id/L/LD/LDS/Bio-BigFile-${version}.tar.gz";
20 sha256 = "277b66ce8acbdd52399e2c5a0cf4e3bd5c74c12b94877cd383d0c4c97740d16d";
21 };
22
23 # Only kent 335 works with Bio-BigFile, see
24 # - official documentation: https://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#bigfile
25 # - one of the developer's answer: https://github.com/Ensembl/ensembl-vep/issues/1412
26 # BioBigfile needs the environment variable KENT_SRC to find kent
27 KENT_SRC = kent.overrideAttrs (old: rec {
28 pname = "kent";
29 version = "335";
30
31 src = fetchFromGitHub {
32 owner = "ucscGenomeBrowser";
33 repo = "kent";
34 rev = "v${version}_base";
35 sha256 = "1455dwzpaq4hyhcqj3fpwgq5a39kp46qarfbr6ms6l2lz583r083";
36 };
37
38 patches = [
39 # Fix for linking error with zlib. Adding zlib as a dependency is not enough
40 ./kent-utils.patch
41 # Vendoring upstream patch (not merged in uscsGenomeBrowser/kent)
42 ./kent-316e4fd40f53c96850128fd65097a42623d1e736.patch
43 ];
44 });
45
46 buildInputs = [
47 BioPerl
48 IOString
49 libpng
50 libmysqlclient
51 openssl
52 ];
53
54 # Ensure compatibility with GCC-11 (compilation fails if -Wno-format-security)
55 hardeningDisable = [ "format" ];
56
57 meta = with lib; {
58 homepage = "https://metacpan.org/dist/Bio-BigFile";
59 description = "Manipulate Jim Kent's BigWig and BigBed index files for genomic features";
60 license = licenses.artistic2;
61 maintainers = with maintainers; [ apraga ];
62 };
63}