imagej: fix crash with opening dialogs (#142841)
This commit is contained in:
parent
0dbfc99b52
commit
0254860766
@ -1,11 +1,13 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
|
, glib
|
||||||
, jre
|
, jre
|
||||||
, unzip
|
, unzip
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, makeDesktopItem
|
, makeDesktopItem
|
||||||
, copyDesktopItems
|
, copyDesktopItems
|
||||||
|
, wrapGAppsHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -21,7 +23,10 @@ in stdenv.mkDerivation rec {
|
|||||||
url = "https://wsr.imagej.net/distros/cross-platform/ij${version}.zip";
|
url = "https://wsr.imagej.net/distros/cross-platform/ij${version}.zip";
|
||||||
sha256 = "sha256-MGuUdUDuW3s/yGC68rHr6xxzmYScUjdXRawDpc1UQqw=";
|
sha256 = "sha256-MGuUdUDuW3s/yGC68rHr6xxzmYScUjdXRawDpc1UQqw=";
|
||||||
};
|
};
|
||||||
nativeBuildInputs = [ copyDesktopItems makeWrapper unzip ];
|
nativeBuildInputs = [ copyDesktopItems makeWrapper unzip wrapGAppsHook ];
|
||||||
|
buildInputs = [ glib ];
|
||||||
|
dontWrapGApps = true;
|
||||||
|
|
||||||
desktopItems = lib.optionals stdenv.isLinux [
|
desktopItems = lib.optionals stdenv.isLinux [
|
||||||
(makeDesktopItem {
|
(makeDesktopItem {
|
||||||
name = "ImageJ";
|
name = "ImageJ";
|
||||||
@ -47,13 +52,15 @@ in stdenv.mkDerivation rec {
|
|||||||
# Simple cp shall clear suid bits, if any.
|
# Simple cp shall clear suid bits, if any.
|
||||||
cp ij.jar $out/share/java
|
cp ij.jar $out/share/java
|
||||||
cp -dR luts macros plugins $out/share
|
cp -dR luts macros plugins $out/share
|
||||||
makeWrapper ${jre}/bin/java $out/bin/imagej \
|
|
||||||
--add-flags "-jar $out/share/java/ij.jar -ijpath $out/share"
|
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = lib.optionalString stdenv.isLinux ''
|
postFixup = lib.optionalString stdenv.isLinux ''
|
||||||
|
makeWrapper ${jre}/bin/java $out/bin/imagej \
|
||||||
|
''${gappsWrapperArgs[@]} \
|
||||||
|
--add-flags "-jar $out/share/java/ij.jar -ijpath $out/share"
|
||||||
|
|
||||||
install -Dm644 ${icon} $out/share/icons/hicolor/128x128/apps/imagej.png
|
install -Dm644 ${icon} $out/share/icons/hicolor/128x128/apps/imagej.png
|
||||||
substituteInPlace $out/share/applications/ImageJ.desktop \
|
substituteInPlace $out/share/applications/ImageJ.desktop \
|
||||||
--replace Exec=imagej Exec=$out/bin/imagej
|
--replace Exec=imagej Exec=$out/bin/imagej
|
||||||
|
Loading…
Reference in New Issue
Block a user