bowtie: add arm64 patch to build on M1 Macs

This does not fix the build on Macs, but it brings the build on M1 Macs
to parity with non-M1 Macs.
main
Theodore Ni 2 years ago
parent b376c2d2af
commit 802a8416b6
No known key found for this signature in database
GPG Key ID: 48B67583BDDD4474
  1. 12
      pkgs/applications/science/biology/bowtie/default.nix

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, zlib }:
{ lib, stdenv, fetchFromGitHub, fetchpatch, zlib }:
stdenv.mkDerivation rec {
pname = "bowtie";
@ -11,6 +11,16 @@ stdenv.mkDerivation rec {
sha256 = "sha256-mWItmrTMPst/NnzSpxxTHcBztDqHPCza9yOsZPwp7G4=";
};
patches = [
# Without this patch, compiling with clang on an M1 Mac fails because
# 'cpuid.h' is included. It only works on x86 and throws an error.
(fetchpatch {
name = "fix_compilation_on_arm64";
url = "https://github.com/BenLangmead/bowtie/commit/091d72f4cb69ca0713704d38bd7f9b37e6c4ff2d.patch";
sha256 = "sha256-XBvgICUBnE5HKpJ36IHTDiKjJgLFKETsIaJC46uN+2I=";
})
];
buildInputs = [ zlib ];
installFlags = [ "prefix=$(out)" ];

Loading…
Cancel
Save