Skip to content

Commit

Permalink
slack: refactor to be amenable to auto-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
samuela committed Nov 4, 2020
1 parent d5560be commit 04990cd
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions pkgs/applications/networking/instant-messengers/slack/default.nix
Expand Up @@ -39,21 +39,28 @@ let
throwSystem = throw "Unsupported system: ${system}";

pname = "slack";

x86_64-darwin-version = "4.10.3";
x86_64-darwin-sha256 = "0r77l57vr603xamich4h4gbdd5vdcj0sjs6yjpymfx9s0f98v8bb";

x86_64-linux-version = "4.10.3";
x86_64-linux-sha256 = "1gnjj2iyk8cwjajg8h9qpmzx10j4qjxjzciq8csg45qfzwkr3drf";

version = {
x86_64-darwin = "4.10.3";
x86_64-linux = "4.10.3";
x86_64-darwin = x86_64-darwin-version;
x86_64-linux = x86_64-linux-version;
}.${system} or throwSystem;

src = let
base = "https://downloads.slack-edge.com";
in {
x86_64-darwin = fetchurl {
url = "${base}/releases/macos/${version}/prod/x64/Slack-${version}-macOS.dmg";
sha256 = "0r77l57vr603xamich4h4gbdd5vdcj0sjs6yjpymfx9s0f98v8bb";
sha256 = x86_64-darwin-sha256;
};
x86_64-linux = fetchurl {
url = "${base}/linux_releases/slack-desktop-${version}-amd64.deb";
sha256 = "1gnjj2iyk8cwjajg8h9qpmzx10j4qjxjzciq8csg45qfzwkr3drf";
sha256 = x86_64-linux-sha256;
};
}.${system} or throwSystem;

Expand Down

0 comments on commit 04990cd

Please sign in to comment.