tetrio-desktop: cleanup, fix GApps wrapping
gappsWrapperArgs must be added to wrapProgram in fixup phase
This commit is contained in:
parent
3a73976c74
commit
cc3ea17877
1 changed files with 14 additions and 13 deletions
|
@ -2,16 +2,17 @@
|
|||
, lib
|
||||
, fetchurl
|
||||
, autoPatchelfHook
|
||||
, wrapGAppsHook
|
||||
, alsa-lib
|
||||
, cups
|
||||
, libpulseaudio
|
||||
, libX11
|
||||
, libXScrnSaver
|
||||
, libXtst
|
||||
, mesa
|
||||
, nss
|
||||
, gtk3
|
||||
, libpulseaudio
|
||||
, systemd
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -37,19 +38,13 @@ stdenv.mkDerivation rec {
|
|||
libXtst
|
||||
mesa
|
||||
nss
|
||||
gtk3
|
||||
];
|
||||
|
||||
dontWrapGApps = true;
|
||||
|
||||
libPath = lib.makeLibraryPath [
|
||||
alsa-lib
|
||||
cups
|
||||
libpulseaudio
|
||||
libX11
|
||||
libXScrnSaver
|
||||
libXtst
|
||||
mesa
|
||||
nss
|
||||
systemd
|
||||
];
|
||||
|
||||
|
@ -61,15 +56,21 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
cp -R $TMP/tetrio-desktop/{usr/share,opt} $out/
|
||||
|
||||
wrapProgram $out/opt/TETR.IO/tetrio-desktop \
|
||||
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/TETR.IO
|
||||
|
||||
ln -s $out/opt/TETR.IO/tetrio-desktop $out/bin/
|
||||
|
||||
substituteInPlace $out/share/applications/tetrio-desktop.desktop \
|
||||
--replace "Exec=\"/opt/TETR.IO/tetrio-desktop\"" "Exec=\"$out/opt/TETR.IO/tetrio-desktop\""
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/opt/TETR.IO/tetrio-desktop \
|
||||
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/TETR.IO \
|
||||
''${gappsWrapperArgs[@]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue