2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, jre, unzip, makeWrapper }:
|
2017-05-05 07:00:38 +01:00
|
|
|
|
|
|
|
# Note:
|
|
|
|
# - User config dir is hard coded by upstream to $HOME/.imagej on linux systems
|
|
|
|
# and to $HOME/Library/Preferences on macOS.
|
|
|
|
# (The current trend appears to be to use $HOME/.config/imagej
|
|
|
|
# on linux systems, but we here do not attempt to fix it.)
|
|
|
|
|
|
|
|
let
|
2019-08-13 22:52:01 +01:00
|
|
|
imagej150 = stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "imagej";
|
2017-05-05 07:00:38 +01:00
|
|
|
version = "150";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://wsr.imagej.net/distros/cross-platform/ij150.zip";
|
2017-05-05 07:00:38 +01:00
|
|
|
sha256 = "97aba6fc5eb908f5160243aebcdc4965726693cb1353d9c0d71b8f5dd832cb7b";
|
|
|
|
};
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ unzip ];
|
2017-05-05 07:00:38 +01:00
|
|
|
inherit jre;
|
|
|
|
|
|
|
|
# JAR files that are intended to be used by other packages
|
|
|
|
# should go to $out/share/java.
|
|
|
|
# (Some uses ij.jar as a library not as a standalone program.)
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/java
|
|
|
|
# Read permisssion suffices for the jar and others.
|
|
|
|
# Simple cp shall clear suid bits, if any.
|
|
|
|
cp ij.jar $out/share/java
|
|
|
|
cp -dR luts macros plugins $out/share
|
|
|
|
mkdir $out/bin
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/imagej \
|
|
|
|
--add-flags "-jar $out/share/java/ij.jar -ijpath $out/share"
|
|
|
|
'';
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://imagej.nih.gov/ij/";
|
2017-05-05 07:00:38 +01:00
|
|
|
description = "Image processing and analysis in Java";
|
|
|
|
longDescription = ''
|
|
|
|
ImageJ is a public domain Java image processing program
|
|
|
|
inspired by NIH Image for the Macintosh.
|
|
|
|
It runs on any computer with a Java 1.4 or later virtual machine.
|
|
|
|
'';
|
|
|
|
license = licenses.publicDomain;
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
maintainers = with maintainers; [ yuriaisaka ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
imagej150
|