hap-py: cleanup, fix cmake 4 compatibility (#468825)
This commit is contained in:
@@ -37,22 +37,26 @@ let
|
||||
];
|
||||
my-python = python3.withPackages my-python-packages;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hap.py";
|
||||
version = "0.3.15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Illumina";
|
||||
repo = "hap.py";
|
||||
rev = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-K8XXhioMGMHw56MKvp0Eo8S6R36JczBzGRaBz035zRQ=";
|
||||
};
|
||||
# For illumina script
|
||||
BOOST_ROOT = "${boost.out}";
|
||||
ZLIBSTATIC = "${zlib.static}";
|
||||
# For cmake : boost lib and includedir are in different location
|
||||
BOOST_LIBRARYDIR = "${boost.out}/lib";
|
||||
BOOST_INCLUDEDIR = "${boost.dev}/include";
|
||||
|
||||
# CMake 4 dropped support of versions lower than 3.5,
|
||||
# versions lower than 3.10 are deprecated.
|
||||
# https://github.com/NixOS/nixpkgs/issues/445447
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
"cmake_minimum_required (VERSION 2.8)" \
|
||||
"cmake_minimum_required (VERSION 3.10)"
|
||||
'';
|
||||
|
||||
patches = [
|
||||
# Compatibility with nix for boost and library flags : zlib, bzip2, curl, crypto, lzma
|
||||
@@ -76,17 +80,27 @@ stdenv.mkDerivation rec {
|
||||
zlib
|
||||
];
|
||||
|
||||
env = {
|
||||
# For illumina script
|
||||
BOOST_ROOT = "${boost.out}";
|
||||
ZLIBSTATIC = "${zlib.static}";
|
||||
|
||||
# For cmake : boost lib and includedir are in different location
|
||||
BOOST_LIBRARYDIR = "${boost.out}/lib";
|
||||
BOOST_INCLUDEDIR = "${boost.dev}/include";
|
||||
};
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/hap.py \
|
||||
--set PATH ${lib.makeBinPath runtime} \
|
||||
--add-flags "--engine-vcfeval-path=${rtg-tools}/bin/rtg"
|
||||
--add-flags "--engine-vcfeval-path=${lib.getExe rtg-tools}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Compare genetics variants against a gold dataset";
|
||||
homepage = "https://github.com/Illumina/hap.py";
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [ apraga ];
|
||||
license = lib.licenses.bsd2;
|
||||
maintainers = with lib.maintainers; [ apraga ];
|
||||
mainProgram = "hap.py";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
unzip,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rtg-tools";
|
||||
version = "3.13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "RealTimeGenomics";
|
||||
repo = "rtg-tools";
|
||||
rev = version;
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-vPzKrgnX6BCQmn9aOVWWpFLC6SbPBHZhZ+oL1LCbvmo=";
|
||||
};
|
||||
|
||||
@@ -59,11 +59,12 @@ stdenv.mkDerivation rec {
|
||||
ant runalltests
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://github.com/RealTimeGenomics/rtg-tools";
|
||||
description = "Useful utilities for dealing with VCF files and sequence data, especially vcfeval";
|
||||
license = licenses.bsd2;
|
||||
license = lib.licenses.bsd2;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ apraga ];
|
||||
maintainers = with lib.maintainers; [ apraga ];
|
||||
mainProgram = "rtg";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user