2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2024-01-13 08:15:51 +00:00
|
|
|
, ant
|
|
|
|
, jdk
|
2023-10-09 19:29:22 +00:00
|
|
|
, jre
|
|
|
|
, makeWrapper
|
2024-04-21 15:54:59 +00:00
|
|
|
, stripJavaArchivesHook
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-10-09 19:29:22 +00:00
|
|
|
pname = "trimmomatic";
|
|
|
|
version = "0.39";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "usadellab";
|
|
|
|
repo = "Trimmomatic";
|
2024-01-13 08:15:51 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-u+ubmacwPy/vsEi0YQCv0fTnVDesQvqeQDEwCbS8M6I=";
|
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
# Remove jdk version requirement
|
2023-10-09 19:29:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ./build.xml \
|
2024-01-13 08:15:51 +00:00
|
|
|
--replace 'source="1.5" target="1.5"' ""
|
2023-10-09 19:29:22 +00:00
|
|
|
'';
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
ant
|
|
|
|
jdk
|
|
|
|
makeWrapper
|
2024-04-21 15:54:59 +00:00
|
|
|
stripJavaArchivesHook
|
2024-01-13 08:15:51 +00:00
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
ant
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
install -Dm644 dist/jar/trimmomatic-*.jar -t $out/share/trimmomatic
|
|
|
|
cp -r adapters $out/share/trimmomatic
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
makeWrapper ${jre}/bin/java $out/bin/trimmomatic \
|
2024-01-13 08:15:51 +00:00
|
|
|
--add-flags "-jar $out/share/trimmomatic/trimmomatic-*.jar"
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2024-01-13 08:15:51 +00:00
|
|
|
changelog = "https://github.com/usadellab/Trimmomatic/blob/main/versionHistory.txt";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Flexible read trimming tool for Illumina NGS data";
|
2023-10-09 19:29:22 +00:00
|
|
|
longDescription = ''
|
|
|
|
Trimmomatic performs a variety of useful trimming tasks for illumina
|
|
|
|
paired-end and single ended data: adapter trimming, quality trimming,
|
|
|
|
cropping to a specified length, length filtering, quality score
|
|
|
|
conversion.
|
|
|
|
'';
|
|
|
|
homepage = "http://www.usadellab.org/cms/?page=trimmomatic";
|
|
|
|
downloadPage = "https://github.com/usadellab/Trimmomatic/releases";
|
|
|
|
license = lib.licenses.gpl3Only;
|
|
|
|
sourceProvenance = [
|
|
|
|
lib.sourceTypes.fromSource
|
2024-01-13 08:15:51 +00:00
|
|
|
lib.sourceTypes.binaryBytecode # source bundles dependencies as jars
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
2024-01-13 08:15:51 +00:00
|
|
|
mainProgram = "trimmomatic";
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = [ lib.maintainers.kupac ];
|
|
|
|
};
|
2024-01-13 08:15:51 +00:00
|
|
|
})
|