2024-06-16 23:18:13 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
bzip2,
|
|
|
|
cmake,
|
2024-06-17 10:07:02 +00:00
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
ncurses,
|
2024-06-16 23:18:13 +00:00
|
|
|
python3,
|
2024-06-17 10:07:02 +00:00
|
|
|
readline,
|
2024-06-16 23:18:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "spades";
|
2024-06-17 10:07:02 +00:00
|
|
|
version = "4.0.0";
|
2024-06-16 23:18:13 +00:00
|
|
|
|
2024-06-17 10:07:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ablab";
|
|
|
|
repo = "spades";
|
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-k2+ddJIgGE41KGZODovU9VdurbWerEtdqNrFDwyuFjo=";
|
2024-06-16 23:18:13 +00:00
|
|
|
};
|
|
|
|
|
2024-08-02 12:53:11 +00:00
|
|
|
sourceRoot = "${finalAttrs.src.name}/src";
|
2024-06-17 10:07:02 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# https://github.com/ablab/spades/pull/1314
|
|
|
|
(fetchpatch {
|
|
|
|
name = "copytree.patch";
|
|
|
|
url = "https://github.com/ablab/spades/commit/af1f756a46c5da669897b841d4f753af1eaa9588.patch";
|
|
|
|
hash = "sha256-tkT7hb0TqsbLkcTs9u43nzvV8bVdh3G9VKYqFFLrQv8=";
|
|
|
|
stripLen = 3;
|
|
|
|
extraPrefix = "projects/";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DZLIB_ENABLE_TESTS=OFF"
|
|
|
|
"-DSPADES_BUILD_INTERNAL=OFF"
|
2024-06-16 23:18:13 +00:00
|
|
|
];
|
|
|
|
|
2024-06-17 10:07:02 +00:00
|
|
|
preConfigure = ''
|
|
|
|
# The CMakeListsInternal.txt file should be empty in the release tarball
|
|
|
|
echo "" > CMakeListsInternal.txt
|
|
|
|
'';
|
|
|
|
|
2024-06-16 23:18:13 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
bzip2
|
2024-06-17 10:07:02 +00:00
|
|
|
ncurses
|
2024-06-16 23:18:13 +00:00
|
|
|
python3
|
2024-06-17 10:07:02 +00:00
|
|
|
readline
|
2024-06-16 23:18:13 +00:00
|
|
|
];
|
|
|
|
|
2024-07-03 22:36:01 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation";
|
|
|
|
|
2024-06-16 23:18:13 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2024-06-17 10:07:02 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2024-06-16 23:18:13 +00:00
|
|
|
meta = {
|
|
|
|
description = "St. Petersburg genome assembler, a toolkit for assembling and analyzing sequencing data";
|
2024-06-17 10:07:02 +00:00
|
|
|
changelog = "https://github.com/ablab/spades/blob/${finalAttrs.version}/changelog.md";
|
|
|
|
downloadPage = "https://github.com/ablab/spades";
|
2024-06-16 23:18:13 +00:00
|
|
|
homepage = "http://ablab.github.io/spades";
|
2024-06-17 10:07:02 +00:00
|
|
|
license = lib.licenses.gpl2Only;
|
2024-07-03 22:36:01 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2024-06-16 23:18:13 +00:00
|
|
|
maintainers = with lib.maintainers; [ bzizou ];
|
2024-07-03 22:36:01 +00:00
|
|
|
broken = stdenv.hostPlatform.isMusl;
|
2024-06-16 23:18:13 +00:00
|
|
|
};
|
|
|
|
})
|