pinegrow: bugfix for missing gsettings

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
This commit is contained in:
Florian Brandes 2022-03-29 17:50:14 +02:00 committed by Artturin
parent 64ead2ba7d
commit 58b6768280

View file

@ -8,6 +8,7 @@
, autoPatchelfHook , autoPatchelfHook
, gsettings-desktop-schemas , gsettings-desktop-schemas
, gtk3 , gtk3
, wrapGAppsHook
, makeWrapper , makeWrapper
}: }:
@ -24,6 +25,7 @@ stdenv.mkDerivation rec {
unzip unzip
autoPatchelfHook autoPatchelfHook
makeWrapper makeWrapper
wrapGAppsHook
]; ];
buildInputs = [ buildInputs = [
@ -34,7 +36,8 @@ stdenv.mkDerivation rec {
gtk3 gtk3
]; ];
wrapProgramFlags = [ dontWrapGApps = true;
makeWrapperArgs = [
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ gcc-unwrapped.lib gtk3 udev ]}" "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ gcc-unwrapped.lib gtk3 udev ]}"
"--prefix PATH : ${lib.makeBinPath [ stdenv.cc ]}" "--prefix PATH : ${lib.makeBinPath [ stdenv.cc ]}"
]; ];
@ -51,7 +54,7 @@ stdenv.mkDerivation rec {
# we can't unzip it in $out/lib, because nw.js will start with # we can't unzip it in $out/lib, because nw.js will start with
# an empty screen. Therefore it will be unzipped in a non-typical # an empty screen. Therefore it will be unzipped in a non-typical
# folder and symlinked. # folder and symlinked.
unzip $src -d $out/opt/pinegrow unzip -q $src -d $out/opt/pinegrow
substituteInPlace $out/opt/pinegrow/Pinegrow.desktop \ substituteInPlace $out/opt/pinegrow/Pinegrow.desktop \
--replace 'Exec=sh -c "$(dirname %k)/PinegrowLibrary"' 'Exec=sh -c "$out/bin/Pinegrow"' --replace 'Exec=sh -c "$(dirname %k)/PinegrowLibrary"' 'Exec=sh -c "$out/bin/Pinegrow"'
mv $out/opt/pinegrow/Pinegrow.desktop $out/share/applications/Pinegrow.desktop mv $out/opt/pinegrow/Pinegrow.desktop $out/share/applications/Pinegrow.desktop
@ -60,9 +63,11 @@ stdenv.mkDerivation rec {
runHook postInstall runHook postInstall
''; '';
# GSETTINGS_SCHEMAS_PATH is not set in installPhase
preFixup = '' preFixup = ''
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS wrapProgram $out/bin/Pinegrow \
wrapProgram "$out/opt/pinegrow/PinegrowLibrary" ''${wrapProgramFlags[@]} ''${makeWrapperArgs[@]} \
''${gappsWrapperArgs[@]}
''; '';
meta = with lib; { meta = with lib; {