mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-10 14:14:20 +00:00
Merge pull request #321409 from eclairevoyant/hmcl
hmcl: fix gtk wrapping
This commit is contained in:
commit
637319bb0f
@ -1,7 +1,6 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, makeBinaryWrapper
|
|
||||||
, makeDesktopItem
|
, makeDesktopItem
|
||||||
, wrapGAppsHook3
|
, wrapGAppsHook3
|
||||||
, copyDesktopItems
|
, copyDesktopItems
|
||||||
@ -15,6 +14,7 @@
|
|||||||
, alsa-lib
|
, alsa-lib
|
||||||
, wayland
|
, wayland
|
||||||
, libpulseaudio
|
, libpulseaudio
|
||||||
|
, gobject-introspection
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -49,13 +49,24 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
makeBinaryWrapper
|
gobject-introspection
|
||||||
wrapGAppsHook3
|
wrapGAppsHook3
|
||||||
copyDesktopItems
|
copyDesktopItems
|
||||||
imagemagick
|
imagemagick
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase =
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/{bin,lib/hmcl}
|
||||||
|
cp $src $out/lib/hmcl/hmcl.jar
|
||||||
|
magick ${icon} hmcl.png
|
||||||
|
install -Dm644 hmcl-1.png $out/share/icons/hicolor/32x32/apps/hmcl.png
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
fixupPhase =
|
||||||
let
|
let
|
||||||
libpath = lib.makeLibraryPath ([
|
libpath = lib.makeLibraryPath ([
|
||||||
libGL
|
libGL
|
||||||
@ -73,17 +84,15 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
wayland
|
wayland
|
||||||
alsa-lib
|
alsa-lib
|
||||||
]);
|
]);
|
||||||
in
|
in ''
|
||||||
''
|
runHook preFixup
|
||||||
runHook preInstall
|
|
||||||
mkdir -p $out/{bin,lib/hmcl}
|
|
||||||
cp $src $out/lib/hmcl/hmcl.jar
|
|
||||||
magick ${icon} hmcl.png
|
|
||||||
install -Dm644 hmcl-1.png $out/share/icons/hicolor/32x32/apps/hmcl.png
|
|
||||||
makeBinaryWrapper ${jre}/bin/java $out/bin/hmcl \
|
makeBinaryWrapper ${jre}/bin/java $out/bin/hmcl \
|
||||||
--add-flags "-jar $out/lib/hmcl/hmcl.jar" \
|
--add-flags "-jar $out/lib/hmcl/hmcl.jar" \
|
||||||
--set LD_LIBRARY_PATH ${libpath}
|
--set LD_LIBRARY_PATH ${libpath} \
|
||||||
runHook postInstall
|
''${gappsWrapperArgs[@]}
|
||||||
|
|
||||||
|
runHook postFixup
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user