Skip to content

Commit

Permalink
Merge pull request #93429 from danieldk/sortmerna-4.2.0
Browse files Browse the repository at this point in the history
sortmerna: 3.0.3 -> 4.2.0
  • Loading branch information
danieldk committed Jul 21, 2020
2 parents c255280 + 56c8413 commit 622150e
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions pkgs/applications/science/biology/sortmerna/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,39 @@

stdenv.mkDerivation rec {
pname = "sortmerna";
version = "3.0.3";
version = "4.2.0";

src = fetchFromGitHub {
repo = pname;
owner = "biocore";
rev = "v${version}";
sha256 = "0zx5fbzyr8wdr0zwphp8hhcn1xz43s5lg2ag4py5sv0pv5l1jh76";
sha256 = "0r91viylzr069jm7kpcgb45kagvf8sqcj5zc1af4arl9sgfs1f3j";
};

patches = [
(fetchpatch {
name = "CMakeInstallPrefix.patch";
url = "https://github.com/biocore/sortmerna/commit/4d36d620a3207e26cf3f588d4ec39889ea21eb79.patch";
sha256 = "0hc3jwdr6ylbyigg52q8islqc0mb1k8rrjadvjfqaxnili099apd";
})
];

nativeBuildInputs = [ cmake rapidjson pkgconfig ];
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ zlib rocksdb rapidjson ];

cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
"-DROCKSDB_HOME=${rocksdb}"
"-DPORTABLE=off"
"-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; {
description = "Tools for filtering, mapping, and OTU-picking from shotgun genomics data";
license = licenses.lgpl3;
Expand Down

0 comments on commit 622150e

Please sign in to comment.