imagej: init at 150 (#25249)

* imagej: init at 150

* correcting for PR comments
This commit is contained in:
Yuri Aisaka 2017-05-05 15:00:38 +09:00 committed by Jörg Thalheim
parent 244b05e5e5
commit 17d2ff414d
3 changed files with 51 additions and 0 deletions

View file

@ -575,6 +575,7 @@
yarr = "Dmitry V. <savraz@gmail.com>";
yochai = "Yochai <yochai@titat.info>";
yorickvp = "Yorick van Pelt <yorickvanpelt@gmail.com>";
yuriaisaka = "Yuri Aisaka <yuri.aisaka+nix@gmail.com>";
yurrriq = "Eric Bailey <eric@ericb.me>";
z77z = "Marco Maggesi <maggesi@math.unifi.it>";
zagy = "Christian Zagrodnick <cz@flyingcircus.io>";

View file

@ -0,0 +1,48 @@
{ stdenv, fetchurl, jre, unzip, makeWrapper }:
# 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
imagej150 = stdenv.mkDerivation rec {
name = "imagej-${version}";
version = "150";
src = fetchurl {
url = "http://wsr.imagej.net/distros/cross-platform/ij150.zip";
sha256 = "97aba6fc5eb908f5160243aebcdc4965726693cb1353d9c0d71b8f5dd832cb7b";
};
buildInputs = [ unzip makeWrapper ];
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"
'';
meta = with stdenv.lib; {
homepage = https://imagej.nih.gov/ij/;
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

View file

@ -14284,6 +14284,8 @@ with pkgs;
inherit (perlPackages.override { pkgs = pkgs // { imagemagick = imagemagickBig;}; }) PerlMagick;
};
imagej = callPackage ../applications/graphics/imagej { };
imagemagick_light = imagemagick.override {
bzip2 = null;
zlib = null;