Merge pull request #93429 from danieldk/sortmerna-4.2.0

sortmerna: 3.0.3 -> 4.2.0
This commit is contained in:
Daniël de Kok 2020-07-21 09:34:01 +02:00 committed by GitHub
commit 622150e873
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,32 +2,39 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "sortmerna"; pname = "sortmerna";
version = "3.0.3"; version = "4.2.0";
src = fetchFromGitHub { src = fetchFromGitHub {
repo = pname; repo = pname;
owner = "biocore"; owner = "biocore";
rev = "v${version}"; rev = "v${version}";
sha256 = "0zx5fbzyr8wdr0zwphp8hhcn1xz43s5lg2ag4py5sv0pv5l1jh76"; sha256 = "0r91viylzr069jm7kpcgb45kagvf8sqcj5zc1af4arl9sgfs1f3j";
}; };
patches = [ nativeBuildInputs = [ cmake pkgconfig ];
(fetchpatch {
name = "CMakeInstallPrefix.patch";
url = "https://github.com/biocore/sortmerna/commit/4d36d620a3207e26cf3f588d4ec39889ea21eb79.patch";
sha256 = "0hc3jwdr6ylbyigg52q8islqc0mb1k8rrjadvjfqaxnili099apd";
})
];
nativeBuildInputs = [ cmake rapidjson pkgconfig ];
buildInputs = [ zlib rocksdb rapidjson ]; buildInputs = [ zlib rocksdb rapidjson ];
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_BUILD_TYPE=Release"
"-DROCKSDB_HOME=${rocksdb}" "-DPORTABLE=off"
"-DRAPIDJSON_HOME=${rapidjson}" "-DRAPIDJSON_HOME=${rapidjson}"
"-DROCKSDB_HOME=${rocksdb}"
"-DROCKSDB_STATIC=off"
"-DZLIB_STATIC=off"
]; ];
postPatch = ''
# Fix formatting string error:
# https://github.com/biocore/sortmerna/issues/255
substituteInPlace src/sortmerna/indexdb.cpp \
--replace 'is_verbose, ss' 'is_verbose, "%s", ss'
# Fix missing pthread dependency for the main binary.
substituteInPlace src/sortmerna/CMakeLists.txt \
--replace "target_link_libraries(sortmerna" \
"target_link_libraries(sortmerna Threads::Threads"
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Tools for filtering, mapping, and OTU-picking from shotgun genomics data"; description = "Tools for filtering, mapping, and OTU-picking from shotgun genomics data";
license = licenses.lgpl3; license = licenses.lgpl3;