mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
2641d97cbf
Reproduction script: # Bulk rewrite ./maintainers/scripts/sha-to-sri.py pkgs/by-name # Revert some packages which will need manual intervention for n in amdvlk azure-cli cargo-profiler corefonts flatito fluxcd gist perf_data_converter protoc-gen-js solana-cli swt verible; do git checkout -- "pkgs/by-name/${n:0:2}/${n}" done
93 lines
1.7 KiB
Nix
93 lines
1.7 KiB
Nix
{
|
|
autoconf,
|
|
bcftools,
|
|
boost,
|
|
bzip2,
|
|
cmake,
|
|
curl,
|
|
fetchFromGitHub,
|
|
htslib,
|
|
lib,
|
|
makeWrapper,
|
|
perl,
|
|
python3,
|
|
rtg-tools,
|
|
samtools,
|
|
stdenv,
|
|
xz,
|
|
zlib,
|
|
}:
|
|
|
|
let
|
|
# Bcftools needs perl
|
|
runtime = [
|
|
bcftools
|
|
htslib
|
|
my-python
|
|
perl
|
|
samtools
|
|
];
|
|
my-python-packages =
|
|
p: with p; [
|
|
bx-python
|
|
pysam
|
|
pandas
|
|
psutil
|
|
scipy
|
|
];
|
|
my-python = python3.withPackages my-python-packages;
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "hap.py";
|
|
version = "0.3.15";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Illumina";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-K8XXhioMGMHw56MKvp0Eo8S6R36JczBzGRaBz035zRQ=";
|
|
};
|
|
# For illumina script
|
|
BOOST_ROOT = "${boost.out}";
|
|
ZLIBSTATIC = "${zlib.static}";
|
|
# For cmake : boost lib and includedir are in differernt location
|
|
BOOST_LIBRARYDIR = "${boost.out}/lib";
|
|
BOOST_INCLUDEDIR = "${boost.dev}/include";
|
|
|
|
patches = [
|
|
# Compatibility with nix for boost and library flags : zlib, bzip2, curl, crypto, lzma
|
|
./boost-library-flags.patch
|
|
# Update to python3
|
|
./python3.patch
|
|
];
|
|
nativeBuildInputs = [
|
|
autoconf
|
|
cmake
|
|
makeWrapper
|
|
];
|
|
buildInputs = [
|
|
boost
|
|
bzip2
|
|
curl
|
|
htslib
|
|
my-python
|
|
rtg-tools
|
|
xz
|
|
zlib
|
|
];
|
|
|
|
postFixup = ''
|
|
wrapProgram $out/bin/hap.py \
|
|
--set PATH ${lib.makeBinPath runtime} \
|
|
--add-flags "--engine-vcfeval-path=${rtg-tools}/bin/rtg"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Compare genetics variants against a gold dataset";
|
|
homepage = "https://github.com/Illumina/hap.py";
|
|
license = licenses.bsd2;
|
|
maintainers = with maintainers; [ apraga ];
|
|
mainProgram = "hap.py";
|
|
};
|
|
}
|