wire-desktop: Add missing phase hooks

This commit is contained in:
toonn 2021-03-05 18:07:53 +01:00
parent dd4b13bcf3
commit 5d6f159ee6
No known key found for this signature in database
GPG Key ID: A1756943D328A924

View File

@ -95,9 +95,17 @@ let
buildInputs = atomEnv.packages; buildInputs = atomEnv.packages;
unpackPhase = "dpkg-deb -x $src ."; unpackPhase = ''
runHook preUnpack
dpkg-deb -x $src .
runHook postUnpack
'';
installPhase = '' installPhase = ''
runHook preInstall
mkdir -p "$out/bin" mkdir -p "$out/bin"
cp -R "opt" "$out" cp -R "opt" "$out"
cp -R "usr/share" "$out/share" cp -R "usr/share" "$out/share"
@ -106,6 +114,8 @@ let
# Desktop file # Desktop file
mkdir -p "$out/share/applications" mkdir -p "$out/share/applications"
cp "${desktopItem}/share/applications/"* "$out/share/applications" cp "${desktopItem}/share/applications/"* "$out/share/applications"
runHook postInstall
''; '';
runtimeDependencies = [ runtimeDependencies = [
@ -134,17 +144,29 @@ let
]; ];
unpackPhase = '' unpackPhase = ''
runHook preUnpack
xar -xf $src xar -xf $src
cd com.wearezeta.zclient.mac.pkg cd com.wearezeta.zclient.mac.pkg
runHook postUnpack
''; '';
buildPhase = '' buildPhase = ''
runHook preBuild
cat Payload | gunzip -dc | cpio -i cat Payload | gunzip -dc | cpio -i
runHook postBuild
''; '';
installPhase = '' installPhase = ''
runHook preInstall
mkdir -p $out/Applications mkdir -p $out/Applications
cp -r Wire.app $out/Applications cp -r Wire.app $out/Applications
runHook postInstall
''; '';
}; };