diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bwa-index2.nix | 4 | ||||
-rw-r--r-- | tools/bwa-mem2-app.nix | 33 |
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" ]; +} |