2023-05-13 08:51:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, zlib }:
|
2016-06-07 21:44:42 +00:00
|
|
|
|
2023-05-13 08:51:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "bwa";
|
2023-05-13 08:51:01 +00:00
|
|
|
version = "unstable-2022-09-23";
|
2016-06-07 21:44:42 +00:00
|
|
|
|
2023-05-13 08:51:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lh3";
|
|
|
|
repo = "bwa";
|
|
|
|
rev = "139f68fc4c3747813783a488aef2adc86626b01b";
|
|
|
|
hash = "sha256-8u35lTK6gBKeapYoIkG9MuJ/pyy/HFA2OiPn+Ml2C6c=";
|
2016-06-07 21:44:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
2020-11-29 22:46:51 +00:00
|
|
|
# Avoid hardcoding gcc to allow environments with a different
|
|
|
|
# C compiler to build
|
|
|
|
preConfigure = ''
|
|
|
|
sed -i '/^CC/d' Makefile
|
|
|
|
'';
|
|
|
|
|
2022-05-04 00:20:50 +00:00
|
|
|
makeFlags = lib.optional stdenv.hostPlatform.isStatic "AR=${stdenv.cc.targetPrefix}ar";
|
|
|
|
|
2020-09-19 00:59:07 +00:00
|
|
|
# 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
|
2016-06-07 21:44:42 +00:00
|
|
|
installPhase = ''
|
2023-05-13 08:57:16 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-09-19 00:59:07 +00:00
|
|
|
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
|
2023-05-13 08:57:16 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2016-06-07 21:44:42 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-06-07 21:44:42 +00:00
|
|
|
description = "Software package for mapping low-divergent sequences against a large reference genome, such as the human genome";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "bwa";
|
2023-05-13 08:55:53 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2023-01-21 21:41:12 +00:00
|
|
|
homepage = "https://bio-bwa.sourceforge.net/";
|
2016-06-07 21:44:42 +00:00
|
|
|
maintainers = with maintainers; [ luispedro ];
|
2023-05-13 08:51:01 +00:00
|
|
|
platforms = platforms.unix;
|
2016-06-07 21:44:42 +00:00
|
|
|
};
|
|
|
|
}
|