2022-04-27 09:35:20 +00:00
|
|
|
{ lib, stdenv, fetchurl, python3Packages, zlib, bash }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
|
|
|
|
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"
|
2023-11-16 04:20:00 +00:00
|
|
|
${python.pythonOnBuildForHost.interpreter} setup.py install \
|
2020-04-24 23:36:52 +00:00
|
|
|
--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;
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
meta = with lib ; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Evaluates genome assemblies by computing various metrics";
|
|
|
|
homepage = "https://github.com/ablab/quast";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [
|
|
|
|
fromSource
|
|
|
|
binaryNativeCode # source bundles binary dependencies
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.bzizou ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|