delly: refactor

This commit is contained in:
natsukium 2023-07-14 00:10:19 +09:00
parent 61be2ca18a
commit ae95c0d5a5
No known key found for this signature in database
GPG key ID: 9EA45A31DB994C53

View file

@ -1,19 +1,37 @@
{ lib, stdenv, fetchFromGitHub, htslib, zlib, bzip2, xz, ncurses, boost, runCommand, delly }: { lib
, stdenv
, fetchFromGitHub
, boost
, bzip2
, htslib
, xz
, zlib
, delly
, runCommand
}:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "delly"; pname = "delly";
version = "1.1.6"; version = "1.1.6";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "dellytools"; owner = "dellytools";
repo = pname; repo = "delly";
rev = "v${version}"; rev = "v${finalAttrs.version}";
sha256 = "sha256-/I//7MhsC/CcBeIJblzbjXp/yOSBm83KWJsrYpl6UJk="; hash = "sha256-/I//7MhsC/CcBeIJblzbjXp/yOSBm83KWJsrYpl6UJk=";
}; };
buildInputs = [ zlib htslib bzip2 xz ncurses boost ]; buildInputs = [
boost
bzip2
htslib
xz
zlib
];
EBROOTHTSLIB = htslib; makeFlags = [
"EBROOTHTSLIB=${htslib}"
];
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
@ -24,7 +42,7 @@ stdenv.mkDerivation rec {
''; '';
passthru.tests = { passthru.tests = {
simple = runCommand "${pname}-test" { } '' simple = runCommand "${finalAttrs.pname}-test" { } ''
mkdir $out mkdir $out
${lib.getExe delly} call -g ${delly.src}/example/ref.fa ${delly.src}/example/sr.bam > $out/sr.vcf ${lib.getExe delly} call -g ${delly.src}/example/ref.fa ${delly.src}/example/sr.bam > $out/sr.vcf
${lib.getExe delly} lr -g ${delly.src}/example/ref.fa ${delly.src}/example/lr.bam > $out/lr.vcf ${lib.getExe delly} lr -g ${delly.src}/example/ref.fa ${delly.src}/example/lr.bam > $out/lr.vcf
@ -46,4 +64,4 @@ stdenv.mkDerivation rec {
genomic rearrangements throughout the genome. genomic rearrangements throughout the genome.
''; '';
}; };
} })