2019-01-10 23:28:28 +00:00
|
|
|
{ stdenv, lib, makeWrapper, fetchzip, jre }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "bftools";
|
2019-12-06 10:11:00 +00:00
|
|
|
version = "6.3.0";
|
2019-01-10 23:28:28 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "http://downloads.openmicroscopy.org/bio-formats/${version}/artifacts/bftools.zip";
|
2019-12-06 10:11:00 +00:00
|
|
|
sha256 = "02nvvmpfglpah1ihd08aw65g1794w588c988cdar1hfl4s80qwhb";
|
2019-01-10 23:28:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
find . -maxdepth 1 -perm -111 -type f -not -name "*.sh" \
|
|
|
|
-exec install -vD {} "$out"/bin/{} \;
|
|
|
|
|
|
|
|
mkdir $out/libexec
|
|
|
|
mkdir -p $out/share/java
|
|
|
|
|
|
|
|
cp ./*.sh $out/libexec
|
|
|
|
cp ./*.jar $out/share/java
|
|
|
|
|
|
|
|
for file in $out/bin/*; do
|
|
|
|
substituteInPlace $file --replace "\$BF_DIR" $out/libexec
|
|
|
|
done
|
|
|
|
substituteInPlace $out/libexec/bf.sh --replace "\$BF_JAR_DIR" $out/share/java
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/libexec/bf.sh --prefix PATH : "${lib.makeBinPath [ jre ]}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-01-10 23:28:28 +00:00
|
|
|
description = "A bundle of scripts for using Bio-Formats on the command line with bioformats_package.jar already included";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.all;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.openmicroscopy.org/bio-formats/";
|
2019-01-10 23:28:28 +00:00
|
|
|
maintainers = [ maintainers.tbenst ];
|
|
|
|
};
|
|
|
|
}
|