about summary refs log tree commit diff
path: root/pkgs/applications/science/biology/quast
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-04-25 07:53:37 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2020-04-25 07:53:37 +0200
commitbb10352242dceb863069797bb92131944b0ac62f (patch)
treed3f5ceea6723e3d6c901652146e41ffe45100c9b /pkgs/applications/science/biology/quast
parent7fb1ff90031c59cbc9ef79224516a74bc138c7a6 (diff)
parent5c70040db2dd2123f7728f1bdcd40d5018de0ef9 (diff)
downloadnixlib-bb10352242dceb863069797bb92131944b0ac62f.tar
nixlib-bb10352242dceb863069797bb92131944b0ac62f.tar.gz
nixlib-bb10352242dceb863069797bb92131944b0ac62f.tar.bz2
nixlib-bb10352242dceb863069797bb92131944b0ac62f.tar.lz
nixlib-bb10352242dceb863069797bb92131944b0ac62f.tar.xz
nixlib-bb10352242dceb863069797bb92131944b0ac62f.tar.zst
nixlib-bb10352242dceb863069797bb92131944b0ac62f.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/applications/science/biology/quast')
-rw-r--r--pkgs/applications/science/biology/quast/default.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/applications/science/biology/quast/default.nix b/pkgs/applications/science/biology/quast/default.nix
new file mode 100644
index 000000000000..e3c3ea23c2c0
--- /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;
+  };
+}