From 0045d3e4f92c61d2d442f63df992fd9cd6e06fe6 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Mon, 13 Sep 2021 12:09:04 -0700 Subject: [PATCH] slack: run preInstall & postInstall hooks --- .../networking/instant-messengers/slack/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/applications/networking/instant-messengers/slack/default.nix b/pkgs/applications/networking/instant-messengers/slack/default.nix index 61a859e331ec..a98d7a386fb1 100644 --- a/pkgs/applications/networking/instant-messengers/slack/default.nix +++ b/pkgs/applications/networking/instant-messengers/slack/default.nix @@ -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