From f1d249105763e68c11fa77227e2075d44dc122fb Mon Sep 17 00:00:00 2001
From: Robert Scott <code@humanleg.org.uk>
Date: Sat, 19 Sep 2020 01:59:07 +0100
Subject: [PATCH] bwa: include static library and some key headers in output

---
 pkgs/applications/science/biology/bwa/default.nix | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/pkgs/applications/science/biology/bwa/default.nix b/pkgs/applications/science/biology/bwa/default.nix
index e478c104edef..7212b42198c4 100644
--- a/pkgs/applications/science/biology/bwa/default.nix
+++ b/pkgs/applications/science/biology/bwa/default.nix
@@ -11,8 +11,15 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ zlib ];
 
+  # 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 = ''
-    install -vD bwa $out/bin/bwa
+    install -vD -t $out/bin bwa
+    install -vD -t $out/lib libbwa.a
+    install -vD -t $out/include bntseq.h
+    install -vD -t $out/include bwa.h
+    install -vD -t $out/include bwamem.h
+    install -vD -t $out/include bwt.h
   '';
 
   meta = with stdenv.lib; {