Files
nixpkgs/pkgs/by-name/bf/bftools/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

49 lines
1.2 KiB
Nix

{
stdenv,
lib,
makeWrapper,
fetchzip,
jre,
}:
stdenv.mkDerivation rec {
pname = "bftools";
version = "6.3.0";
src = fetchzip {
url = "http://downloads.openmicroscopy.org/bio-formats/${version}/artifacts/bftools.zip";
sha256 = "02nvvmpfglpah1ihd08aw65g1794w588c988cdar1hfl4s80qwhb";
};
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 ];
meta = with lib; {
description = "Bundle of scripts for using Bio-Formats on the command line with bioformats_package.jar already included";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.gpl2;
platforms = platforms.all;
homepage = "https://www.openmicroscopy.org/bio-formats/";
maintainers = [ maintainers.tbenst ];
};
}