bowtie2: fix build on aarch64

This commit is contained in:
natsukium
2023-10-20 17:07:55 +09:00
parent aae51697be
commit 13fe1effaf
@@ -16,13 +16,24 @@ stdenv.mkDerivation (finalAttrs: {
owner = "BenLangmead";
repo = "bowtie2";
rev = "refs/tags/v${finalAttrs.version}";
sha256 = "sha256-Bem4SHY/74suZPDbw/rwKMLBn3bRq5ooHbBoVnKuYk0=";
fetchSubmodules = true;
hash = "sha256-rWeopeYuCk9ZhJX2SFCcxZWcjXjjTiVRiwkzLQcIgd0=";
};
# because of this flag, gcc on aarch64 cannot find the Threads
# Could NOT find Threads (missing: Threads_FOUND)
# TODO: check with other distros and report upstream
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "-m64" ""
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ tbb zlib python3 perl ];
cmakeFlags = lib.optional (!stdenv.hostPlatform.isx86) ["-DCMAKE_CXX_FLAGS=-I${finalAttrs.src}/third_party"];
meta = with lib; {
description = "An ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences";
license = licenses.gpl3Plus;
@@ -30,7 +41,6 @@ stdenv.mkDerivation (finalAttrs: {
changelog = "https://github.com/BenLangmead/bowtie2/releases/tag/${finalAttrs.src.rev}";
maintainers = with maintainers; [ rybern ];
platforms = platforms.all;
broken = stdenv.isAarch64; # only x86 is supported
mainProgram = "bowtie2";
};
})