nixpkgs/pkgs/applications/science/biology/sambamba/default.nix

40 lines
1.0 KiB
Nix
Raw Normal View History

2021-05-22 18:56:09 +00:00
{ lib, stdenv, fetchFromGitHub, fetchpatch, python3, which, ldc, zlib }:
2019-12-17 21:54:44 +00:00
stdenv.mkDerivation rec {
pname = "sambamba";
2021-08-31 09:37:49 +00:00
version = "0.8.1";
2019-12-17 21:54:44 +00:00
src = fetchFromGitHub {
owner = "biod";
repo = "sambamba";
rev = "v${version}";
2021-08-31 09:37:49 +00:00
sha256 = "0f4qngnys2zjb0ri54k6kxqnssg938mnnscs4z9713hjn41rk7yd";
2019-12-17 21:54:44 +00:00
fetchSubmodules = true;
};
2021-05-22 18:56:09 +00:00
patches = [
2021-08-31 09:37:49 +00:00
# make ldc 1.27.1 compatible
2021-05-22 18:56:09 +00:00
(fetchpatch {
2021-08-31 09:37:49 +00:00
url = "https://github.com/biod/sambamba/pull/480/commits/b5c80feb62683d24ec0529f685a1d7a36962a1d4.patch";
sha256 = "0yr9baxqbhyb4scwcwczk77z8gazhkl60jllhz9dnrb7p5qsvs7r";
2021-05-22 18:56:09 +00:00
})
];
nativeBuildInputs = [ which python3 ldc ];
2019-12-17 21:54:44 +00:00
buildInputs = [ zlib ];
# Upstream's install target is broken; copy manually
installPhase = ''
mkdir -p $out/bin
cp bin/sambamba-${version} $out/bin/sambamba
'';
meta = with lib; {
2019-12-17 21:54:44 +00:00
description = "SAM/BAM processing tool";
homepage = "https://lomereiter.github.io/sambamba/";
maintainers = with maintainers; [ jbedo ];
license = with licenses; gpl2;
platforms = platforms.x86_64;
};
}