nixpkgs/pkgs/by-name/bw/bwa/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

48 lines
1.3 KiB
Nix

{ lib, stdenv, fetchFromGitHub, zlib }:
stdenv.mkDerivation {
pname = "bwa";
version = "unstable-2022-09-23";
src = fetchFromGitHub {
owner = "lh3";
repo = "bwa";
rev = "139f68fc4c3747813783a488aef2adc86626b01b";
hash = "sha256-8u35lTK6gBKeapYoIkG9MuJ/pyy/HFA2OiPn+Ml2C6c=";
};
buildInputs = [ zlib ];
# Avoid hardcoding gcc to allow environments with a different
# C compiler to build
preConfigure = ''
sed -i '/^CC/d' Makefile
'';
makeFlags = lib.optional stdenv.hostPlatform.isStatic "AR=${stdenv.cc.targetPrefix}ar";
# 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; {
description = "Software package for mapping low-divergent sequences against a large reference genome, such as the human genome";
mainProgram = "bwa";
license = licenses.gpl3Plus;
homepage = "https://bio-bwa.sourceforge.net/";
maintainers = with maintainers; [ luispedro ];
platforms = platforms.unix;
};
}