diff options
Diffstat (limited to 'pkgs/applications/science/biology/bwa')
-rw-r--r-- | pkgs/applications/science/biology/bwa/default.nix | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/applications/science/biology/bwa/default.nix b/pkgs/applications/science/biology/bwa/default.nix index a2a11b1d4517f..801ad00876bf5 100644 --- a/pkgs/applications/science/biology/bwa/default.nix +++ b/pkgs/applications/science/biology/bwa/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, zlib }: +{ lib, stdenv, fetchurl, fetchpatch, zlib }: stdenv.mkDerivation rec { pname = "bwa"; @@ -9,6 +9,16 @@ stdenv.mkDerivation rec { sha256 = "1zfhv2zg9v1icdlq4p9ssc8k01mca5d1bd87w71py2swfi74s6yy"; }; + patches = [ + # Pull upstream patch for -fno-common toolchain support like upstream + # gcc-10: https://github.com/lh3/bwa/pull/267 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/lh3/bwa/commit/2a1ae7b6f34a96ea25be007ac9d91e57e9d32284.patch"; + sha256 = "1lihfxai6vcshv5vr3m7yhk833bdivkja3gld6ilwrc4z28f6wqy"; + }) + ]; + buildInputs = [ zlib ]; # Avoid hardcoding gcc to allow environments with a different @@ -17,6 +27,8 @@ stdenv.mkDerivation rec { sed -i '/^CC/d' Makefile ''; + makeFlags = lib.optional stdenv.hostPlatform.isStatic "AR=${stdenv.cc.targetPrefix}ar"; + # it's unclear which headers are intended to be part of the public interface # so we may find ourselves having to add more here over time installPhase = '' |