git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #93429 from danieldk/sortmerna-4.2.0

sortmerna: 3.0.3 -> 4.2.0

commit622150e8734ba1c4528c40fd965c9e9a97f9d57a authorDaniël de Kok <me@danieldk.eu> dateTue 21 Jul 2020, 09:34 (6 years ago) parentc25528056c8413
1 file changed+19−12
pkgs/applications/science/biology/sortmerna/default.nix+19−12
pkgs/applications/science/biology/sortmerna/default.nix+19−12
@@ -2,32 +2,39 @@
22
33stdenv.mkDerivation rec {
44 pname = "sortmerna";
5− version = "3.0.3";
5+ version = "4.2.0";
66
77 src = fetchFromGitHub {
88 repo = pname;
99 owner = "biocore";
1010 rev = "v${version}";
11− sha256 = "0zx5fbzyr8wdr0zwphp8hhcn1xz43s5lg2ag4py5sv0pv5l1jh76";
11+ sha256 = "0r91viylzr069jm7kpcgb45kagvf8sqcj5zc1af4arl9sgfs1f3j";
1212 };
1313
14− patches = [
15− (fetchpatch {
16− name = "CMakeInstallPrefix.patch";
17− url = "https://github.com/biocore/sortmerna/commit/4d36d620a3207e26cf3f588d4ec39889ea21eb79.patch";
18− sha256 = "0hc3jwdr6ylbyigg52q8islqc0mb1k8rrjadvjfqaxnili099apd";
19− })
20− ];
21−
22− nativeBuildInputs = [ cmake rapidjson pkgconfig ];
14+ nativeBuildInputs = [ cmake pkgconfig ];
2315 buildInputs = [ zlib rocksdb rapidjson ];
2416
2517 cmakeFlags = [
2618 "-DCMAKE_BUILD_TYPE=Release"
27− "-DROCKSDB_HOME=${rocksdb}"
19+ "-DPORTABLE=off"
2820 "-DRAPIDJSON_HOME=${rapidjson}"
21+ "-DROCKSDB_HOME=${rocksdb}"
22+ "-DROCKSDB_STATIC=off"
23+ "-DZLIB_STATIC=off"
2924 ];
3025
26+ postPatch = ''
27+ # Fix formatting string error:
28+ # https://github.com/biocore/sortmerna/issues/255
29+ substituteInPlace src/sortmerna/indexdb.cpp \
30+ --replace 'is_verbose, ss' 'is_verbose, "%s", ss'
31+
32+ # Fix missing pthread dependency for the main binary.
33+ substituteInPlace src/sortmerna/CMakeLists.txt \
34+ --replace "target_link_libraries(sortmerna" \
35+ "target_link_libraries(sortmerna Threads::Threads"
36+ '';
37+
3138 meta = with stdenv.lib; {
3239 description = "Tools for filtering, mapping, and OTU-picking from shotgun genomics data";
3340 license = licenses.lgpl3;