starlum: use wrapGAppsHook
fixes https://github.com/NixOS/nixpkgs/issues/158888
This commit is contained in:
parent
102c02f432
commit
1b80328b19
|
@ -1,5 +1,6 @@
|
||||||
{ stdenv, lib, fetchurl, makeWrapper
|
{ stdenv, lib, fetchurl
|
||||||
, dpkg, patchelf
|
, dpkg, patchelf, wrapGAppsHook
|
||||||
|
, hicolor-icon-theme
|
||||||
, gtk3, glib, systemd
|
, gtk3, glib, systemd
|
||||||
, xorg, nss, nspr
|
, xorg, nss, nspr
|
||||||
, atk, at-spi2-atk, dbus
|
, atk, at-spi2-atk, dbus
|
||||||
|
@ -30,7 +31,8 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-CUOdpR8RExMLeOX8469egENotMNuPU4z8S1IGqA21z0=";
|
sha256 = "sha256-CUOdpR8RExMLeOX8469egENotMNuPU4z8S1IGqA21z0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper dpkg ];
|
nativeBuildInputs = [ wrapGAppsHook dpkg ];
|
||||||
|
buildInputs = [ glib hicolor-icon-theme ];
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
mkdir pkg
|
mkdir pkg
|
||||||
|
@ -39,8 +41,14 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir $out
|
mkdir -p $out/bin
|
||||||
mv opt/StarUML $out/bin
|
mv opt $out
|
||||||
|
|
||||||
|
mv usr/share $out
|
||||||
|
rm -rf $out/share/doc
|
||||||
|
|
||||||
|
substituteInPlace $out/share/applications/staruml.desktop \
|
||||||
|
--replace "/opt/StarUML/staruml" "$out/bin/staruml"
|
||||||
|
|
||||||
mkdir -p $out/lib
|
mkdir -p $out/lib
|
||||||
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
|
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
|
||||||
|
@ -48,9 +56,15 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
patchelf \
|
patchelf \
|
||||||
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||||
$out/bin/staruml
|
$out/opt/StarUML/staruml
|
||||||
wrapProgram $out/bin/staruml \
|
|
||||||
--prefix LD_LIBRARY_PATH : $out/lib:${LD_LIBRARY_PATH}
|
ln -s $out/opt/StarUML/staruml $out/bin/staruml
|
||||||
|
'';
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
gappsWrapperArgs+=(
|
||||||
|
--prefix LD_LIBRARY_PATH ':' $out/lib:${LD_LIBRARY_PATH}
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue