Merge pull request #137680 from benley/slack-hooks

slack: run preInstall & postInstall hooks
This commit is contained in:
Timothy DeHerrera 2021-09-13 13:59:34 -06:00 committed by GitHub
commit f5d48e200a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,6 +147,8 @@ let
dontPatchELF = true;
installPhase = ''
runHook preInstall
# The deb file contains a setuid binary, so 'dpkg -x' doesn't work here
dpkg --fsys-tarfile $src | tar --extract
rm -rf usr/share/lintian
@ -172,6 +174,8 @@ let
substituteInPlace $out/share/applications/slack.desktop \
--replace /usr/bin/ $out/bin/ \
--replace /usr/share/ $out/share/
runHook postInstall
'';
};
@ -185,9 +189,11 @@ let
sourceRoot = "Slack.app";
installPhase = ''
runHook preInstall
mkdir -p $out/Applications/Slack.app
cp -R . $out/Applications/Slack.app
/usr/bin/defaults write com.tinyspeck.slackmacgap SlackNoAutoUpdates -bool YES
runHook postInstall
'';
};
in