aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2020-08-10 09:38:03 +1000
committerJustin Bedo <cu@cua0.org>2020-08-10 09:38:03 +1000
commitc3af7841394bbba1433a4e7e3e4aa225c697c81d (patch)
tree6f10b85b213619d714577c9ba00995b0ba6d752e /tools
parentc6b5b6dd77715c53acb0a19a7216e6d2cdb8dd91 (diff)
bwa2: update to release
Diffstat (limited to 'tools')
-rw-r--r--tools/bwa-index2.nix4
-rw-r--r--tools/bwa-mem2-app.nix33
2 files changed, 21 insertions, 16 deletions
diff --git a/tools/bwa-index2.nix b/tools/bwa-index2.nix
index f5cc69b..b02d007 100644
--- a/tools/bwa-index2.nix
+++ b/tools/bwa-index2.nix
@@ -1,5 +1,6 @@
{ bionix
, flags ? null
+, altRegex ? "^>.*_alt$"
}:
ref:
@@ -18,6 +19,7 @@ stage {
bwa-mem2 index ${optionalString (flags != null) flags} ref.fa
mkdir $out
mv ref.fa.* $out
- grep '^>[^ \t]*_alt$' ref.fa | tr -d '^>' > $out/idxbase.alt || true
+ grep -P '${altRegex}' ref.fa | tr -d '^>' > $out/idxbase.alt || true
'';
+ stripStorePaths = false;
}
diff --git a/tools/bwa-mem2-app.nix b/tools/bwa-mem2-app.nix
index 8cca5a5..b303485 100644
--- a/tools/bwa-mem2-app.nix
+++ b/tools/bwa-mem2-app.nix
@@ -1,15 +1,18 @@
-{ bwa, fetchFromGitHub }:
- bwa.overrideAttrs (_:
- {
- name = "bwa-mem2";
- src = fetchFromGitHub {
- owner = "bwa-mem2";
- repo = "bwa-mem2";
- rev = "f882015f7f46845f72c10094a621264f78d206d8";
- sha256 = "1wfx8j9mwbb29jw4zxp28lajmj774jy1l5x229nf065cqr2dgyqg";
- };
- installPhase = ''
- mkdir -p $out/bin
- cp bwa-mem2 $out/bin
- '';
- })
+{ clangStdenv, fetchFromGitHub, zlib }:
+ clangStdenv.mkDerivation rec {
+ pname = "bwa-mem2";
+ version = "2.0";
+ src = fetchFromGitHub {
+ fetchSubmodules = true;
+ owner = "bwa-mem2";
+ repo = "bwa-mem2";
+ rev = "v${version}";
+ sha256 = "0q5wqal0nfxd3yfbmxahyaiqqmsrrplnwhplcjvz1xzw7bxwwnnj";
+ };
+ buildInputs = [ zlib ];
+ installPhase = ''
+ mkdir -p $out/bin
+ cp bwa-mem2 $out/bin
+ '';
+ disableHardening = [ "pie" ];
+}