From eb51b462aa027c3302067dba167666378f19bcf1 Mon Sep 17 00:00:00 2001 From: Bruno Bzeznik Date: Fri, 4 Oct 2019 12:37:17 +0200 Subject: [PATCH] Quast: init at 5.0.2 --- .../science/biology/quast/default.nix | 58 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 60 insertions(+) create mode 100644 pkgs/applications/science/biology/quast/default.nix diff --git a/pkgs/applications/science/biology/quast/default.nix b/pkgs/applications/science/biology/quast/default.nix new file mode 100644 index 00000000000..e3c3ea23c2c --- /dev/null +++ b/pkgs/applications/science/biology/quast/default.nix @@ -0,0 +1,58 @@ +{ stdenv, fetchurl, python3Packages, zlib, bash, coreutils }: + +let + pythonPackages = python3Packages; + inherit (pythonPackages) python; +in + +pythonPackages.buildPythonApplication rec { + pname = "quast"; + version = "5.0.2"; + + src = fetchurl { + url = "https://github.com/ablab/quast/releases/download/${pname}_${version}/${pname}-${version}.tar.gz"; + sha256 = "13ml8qywbb4cc7wf2x7z5mz1rjqg51ab8wkizwcg4f6c40zgif6d"; + }; + + pythonPath = with pythonPackages; [ simplejson joblib setuptools matplotlib ]; + + nativeBuildInputs = [ coreutils ]; + + buildInputs = [ zlib ] ++ pythonPath; + + dontConfigure = true; + + dontBuild = true; + + installPhase = '' + substituteInPlace quast_libs/bedtools/Makefile \ + --replace "/bin/bash" "${bash}/bin/bash" + mkdir -p "$out/${python.sitePackages}" + export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH" + ${python.interpreter} setup.py install \ + --install-lib=$out/${python.sitePackages} \ + --prefix="$out" + ''; + + postFixup = '' + for file in $(find $out -type f -type f -perm /0111); do + old_rpath=$(patchelf --print-rpath $file) && \ + patchelf --set-rpath $old_rpath:${stdenv.cc.cc.lib}/lib $file || true + done + # Link to the master program + ln -s $out/bin/quast.py $out/bin/quast + ''; + + dontPatchELF = true; + + # Tests need to download data files, so manual run after packaging is needed + doCheck = false; + + meta = with stdenv.lib ; { + description = "Evaluates genome assemblies by computing various metrics"; + homepage = "https://github.com/ablab/quast"; + license = licenses.gpl2; + maintainers = [ maintainers.bzizou ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 614cd4e4e40..78f749dc385 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23058,6 +23058,8 @@ in prodigal = callPackage ../applications/science/biology/prodigal { }; + quast = callPackage ../applications/science/biology/quast { }; + raxml = callPackage ../applications/science/biology/raxml { }; raxml-mpi = appendToName "mpi" (raxml.override {