2022-01-25 03:21:06 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
, which
|
|
|
|
, ldc
|
|
|
|
, zlib
|
|
|
|
, lz4
|
|
|
|
}:
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "sambamba";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.0.1";
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "biod";
|
|
|
|
repo = "sambamba";
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-3O9bHGpMuCgdR2Wm7Dv1VUjMT1QTn8K1hdwgjvwhFDw=";
|
2020-10-16 20:44:37 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
nativeBuildInputs = [ which python3 ldc ];
|
2022-01-25 03:21:06 +00:00
|
|
|
buildInputs = [ zlib lz4 ];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
buildFlags = [
|
|
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
|
|
];
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
# Upstream's install target is broken; copy manually
|
|
|
|
installPhase = ''
|
2022-11-02 22:02:43 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 bin/sambamba-${version} $out/bin/sambamba
|
|
|
|
|
|
|
|
runHook postInstall
|
2020-10-16 20:44:37 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-16 20:44:37 +00:00
|
|
|
description = "SAM/BAM processing tool";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sambamba";
|
2020-10-16 20:44:37 +00:00
|
|
|
homepage = "https://lomereiter.github.io/sambamba/";
|
|
|
|
maintainers = with maintainers; [ jbedo ];
|
|
|
|
license = with licenses; gpl2;
|
|
|
|
platforms = platforms.x86_64;
|
|
|
|
};
|
|
|
|
}
|