nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 htslib,
7 zlib,
8 bzip2,
9 xz,
10 curl,
11 perl,
12 python3,
13 bash,
14}:
15
16stdenv.mkDerivation (finalAttrs: {
17 pname = "bcftools";
18 version = "1.22";
19
20 src = fetchFromGitHub {
21 owner = "samtools";
22 repo = "bcftools";
23 tag = finalAttrs.version;
24 hash = "sha256-S+FuqjiOf38sAQKWYOixv/MlXGnuDmkx9z4Co/pk/eM=";
25 };
26
27 nativeBuildInputs = [
28 autoreconfHook
29 perl
30 python3
31 ];
32
33 buildInputs = [
34 htslib
35 zlib
36 bzip2
37 xz
38 curl
39 ];
40
41 nativeCheckInputs = [
42 htslib
43 ];
44
45 strictDeps = true;
46
47 makeFlags = [
48 "HSTDIR=${htslib}"
49 "prefix=$(out)"
50 "CC=${stdenv.cc.targetPrefix}cc"
51 ];
52
53 preCheck = ''
54 patchShebangs misc/
55 patchShebangs test/
56 sed -i -e 's|/bin/bash|${bash}/bin/bash|' test/test.pl
57 '';
58
59 enableParallelBuilding = true;
60
61 doCheck = true;
62
63 meta = {
64 description = "Tools for manipulating BCF2/VCF/gVCF format, SNP and short indel sequence variants";
65 license = lib.licenses.mit;
66 homepage = "http://www.htslib.org/";
67 platforms = lib.platforms.unix;
68 maintainers = [ lib.maintainers.mimame ];
69 };
70})