From 01ddcaa879471f82eb5f8e704897e272a8206786 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 13 May 2023 17:51:01 +0900 Subject: [PATCH 1/3] bwa: 0.7.17 -> unstable-2022-09-23 Diff: https://github.com/lh3/bwa/compare/v0.7.17...139f68fc4c3747813783a488aef2adc86626b01b --- .../science/biology/bwa/default.nix | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/pkgs/applications/science/biology/bwa/default.nix b/pkgs/applications/science/biology/bwa/default.nix index d9ae226027a..aeea7ed2646 100644 --- a/pkgs/applications/science/biology/bwa/default.nix +++ b/pkgs/applications/science/biology/bwa/default.nix @@ -1,24 +1,16 @@ -{ lib, stdenv, fetchurl, fetchpatch, zlib }: +{ lib, stdenv, fetchFromGitHub, zlib }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "bwa"; - version = "0.7.17"; + version = "unstable-2022-09-23"; - src = fetchurl { - url = "mirror://sourceforge/bio-bwa/${pname}-${version}.tar.bz2"; - sha256 = "1zfhv2zg9v1icdlq4p9ssc8k01mca5d1bd87w71py2swfi74s6yy"; + src = fetchFromGitHub { + owner = "lh3"; + repo = "bwa"; + rev = "139f68fc4c3747813783a488aef2adc86626b01b"; + hash = "sha256-8u35lTK6gBKeapYoIkG9MuJ/pyy/HFA2OiPn+Ml2C6c="; }; - 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 @@ -45,6 +37,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3; homepage = "https://bio-bwa.sourceforge.net/"; maintainers = with maintainers; [ luispedro ]; - platforms = platforms.x86_64; + platforms = platforms.unix; }; } From c85dced23e4d0a0a860371880aad0d8bca83ed6f Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 13 May 2023 17:55:53 +0900 Subject: [PATCH 2/3] bwa: update license --- pkgs/applications/science/biology/bwa/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/science/biology/bwa/default.nix b/pkgs/applications/science/biology/bwa/default.nix index aeea7ed2646..36bf2288c54 100644 --- a/pkgs/applications/science/biology/bwa/default.nix +++ b/pkgs/applications/science/biology/bwa/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation { meta = with lib; { description = "A software package for mapping low-divergent sequences against a large reference genome, such as the human genome"; - license = licenses.gpl3; + license = licenses.gpl3Plus; homepage = "https://bio-bwa.sourceforge.net/"; maintainers = with maintainers; [ luispedro ]; platforms = platforms.unix; From 04dd7f41e720c10c48ba65f60a3063740fe081c8 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 13 May 2023 17:57:16 +0900 Subject: [PATCH 3/3] bwa: add runHook --- pkgs/applications/science/biology/bwa/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/science/biology/bwa/default.nix b/pkgs/applications/science/biology/bwa/default.nix index 36bf2288c54..4786f25beb5 100644 --- a/pkgs/applications/science/biology/bwa/default.nix +++ b/pkgs/applications/science/biology/bwa/default.nix @@ -24,12 +24,16 @@ stdenv.mkDerivation { # 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 = '' + runHook preInstall + 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 + + runHook postInstall ''; meta = with lib; {