Skip to content

Commit

Permalink
rtg-tools: init at 3.12.1
Browse files Browse the repository at this point in the history
A subset of RTG Core that includes several useful utilities for dealing with VCF files and sequence data.
Mostly used for vcfeval to compare VCF.
  • Loading branch information
apraga committed Mar 29, 2024
1 parent 76fd5b7 commit b2ecb30
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions pkgs/by-name/rt/rtg-tools/package.nix
@@ -0,0 +1,57 @@
{
config,
lib,
pkgs,
stdenv,
fetchFromGitHub,
jdk,
ant,
git,
unzip,
}:

stdenv.mkDerivation rec {
pname = "rtg-tools";
version = "3.12.1";

src = fetchFromGitHub {
owner = "RealTimeGenomics";
repo = "rtg-tools";
rev = version;
sha256 = "sha256-fMrrjrgaGxBVxn6qMq2g0oFv6qtfhZcQlkvv1E9Os6Y=";
};

nativeBuildInputs = [
ant
jdk
git
unzip
];

buildPhase = ''
ant rtg-tools.jar
'';

installPhase = ''
mkdir -p $out/bin
cp build/rtg-tools.jar $out/bin/RTG.jar
cp installer/rtg $out/bin/
cp installer/rtg $out/bin/
'';

postFixup = ''
# Use a location outside nix (must be writable)
sed -i '/USER_JAVA_OPTS=$RTG_JAVA_OPTS/a mkdir -p $HOME/.config/rtg-tools' $out/bin/rtg
sed -i 's|$THIS_DIR/rtg.cfg|$HOME/.config/rtg-tools/rtg.cfg|g' $out/bin/rtg
# Use nix java
sed -i 's|RTG_JAVA="java".*|RTG_JAVA="${jdk}/lib/openjdk/bin/java"|' $out/bin/rtg
'';

meta = with lib; {
homepage = "https://github.com/RealTimeGenomics/rtg-tools/";
description = "Useful utilities for dealing with VCF files and sequence data, especially vcfeval";
license = licenses.bsd2;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ apraga ];
};
}

0 comments on commit b2ecb30

Please sign in to comment.