diff options
author | László Kupcsik <koopac@gmail.com> | 2023-09-08 23:12:55 +0200 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-09-22 13:50:18 -0300 |
commit | c678bba28cfb9a7572e31a3788effafc3b5cbef5 (patch) | |
tree | 6cb992d81ac65b65edb528da6a8ada823845ab67 /pkgs/applications/science/biology/trimmomatic | |
parent | 0820c58d090981d3c0b6c080796aa42bc7ba8026 (diff) |
trimmomatic: init at 0.39
Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
Diffstat (limited to 'pkgs/applications/science/biology/trimmomatic')
-rw-r--r-- | pkgs/applications/science/biology/trimmomatic/default.nix | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/applications/science/biology/trimmomatic/default.nix b/pkgs/applications/science/biology/trimmomatic/default.nix new file mode 100644 index 0000000000000..ad1dc45c5c26d --- /dev/null +++ b/pkgs/applications/science/biology/trimmomatic/default.nix @@ -0,0 +1,66 @@ +{ lib +, stdenv +, ant +, fetchFromGitHub +, jdk11_headless +, jre +, makeWrapper +}: + +stdenv.mkDerivation rec { + pname = "trimmomatic"; + version = "0.39"; + + src = fetchFromGitHub { + owner = "usadellab"; + repo = "Trimmomatic"; + rev = "v${version}"; + hash = "sha256-u+ubmacwPy/vsEi0YQCv0fTnVDesQvqeQDEwCbS8M6I="; + }; + + # Set source and target version to 11 + postPatch = '' + substituteInPlace ./build.xml \ + --replace 'source="1.5" target="1.5"' 'release="11"' + ''; + + nativeBuildInputs = [ jdk11_headless ant makeWrapper ]; + + buildPhase = '' + runHook preBuild + + ant + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin $out/share + cp dist/jar/trimmomatic-${version}.jar $out/share/ + cp -r adapters $out/share/ + makeWrapper ${jre}/bin/java $out/bin/trimmomatic \ + --add-flags "-cp $out/share/trimmomatic-${version}.jar org.usadellab.trimmomatic.Trimmomatic" + + runHook postInstall + ''; + + meta = { + description = "A flexible read trimming tool for Illumina NGS data"; + 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 + lib.sourceTypes.binaryBytecode # source bundles dependencies as jars + ]; + maintainers = [ lib.maintainers.kupac ]; + }; +} |