Merge pull request #94337 from sikmir/slack
slack: 4.4.3 -> 4.7.0 (linux), 4.6.0 -> 4.8.0 (darwin)
This commit is contained in:
commit
ba21e8b0ef
1 changed files with 27 additions and 26 deletions
|
@ -1,6 +1,7 @@
|
|||
{ stdenv
|
||||
, fetchurl
|
||||
, dpkg
|
||||
, undmg
|
||||
, makeWrapper
|
||||
, nodePackages
|
||||
, alsaLib
|
||||
|
@ -19,10 +20,12 @@
|
|||
, gnome2
|
||||
, gtk3
|
||||
, libappindicator-gtk3
|
||||
, libdrm
|
||||
, libnotify
|
||||
, libpulseaudio
|
||||
, libuuid
|
||||
, libxcb
|
||||
, mesa
|
||||
, nspr
|
||||
, nss
|
||||
, pango
|
||||
|
@ -32,21 +35,26 @@
|
|||
}:
|
||||
|
||||
let
|
||||
|
||||
pname = "slack";
|
||||
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
|
||||
throwSystem = throw "Unsupported system: ${system}";
|
||||
|
||||
sha256 = {
|
||||
x86_64-darwin = "09daxnqxyccshkrmr7ysgjvgvgmlgd590ym68fz0l8n6ayfpkgw0";
|
||||
x86_64-linux = "00ihhsgxm441nsmav7pq4n4y9s7p2r4x5dqld160658xyqi836cq";
|
||||
pname = "slack";
|
||||
version = {
|
||||
x86_64-darwin = "4.8.0";
|
||||
x86_64-linux = "4.7.0";
|
||||
}.${system} or throwSystem;
|
||||
|
||||
version = {
|
||||
x86_64-darwin = "4.6.0";
|
||||
x86_64-linux = "4.4.3";
|
||||
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 = "0k22w3c3brbc7ivmc5npqy8h7zxfgnbs7bqwii03psymm6sw53j2";
|
||||
};
|
||||
x86_64-linux = fetchurl {
|
||||
url = "${base}/linux_releases/slack-desktop-${version}-amd64.deb";
|
||||
sha256 = "1nwyl70caaz9k0hccfpkjli0jjc6m9zbjb3nf4bwmykpbxbzr9w3";
|
||||
};
|
||||
}.${system} or throwSystem;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -58,11 +66,7 @@ let
|
|||
};
|
||||
|
||||
linux = stdenv.mkDerivation rec {
|
||||
inherit pname meta version;
|
||||
src = fetchurl {
|
||||
url = "https://downloads.slack-edge.com/linux_releases/slack-desktop-${version}-amd64.deb";
|
||||
inherit sha256;
|
||||
};
|
||||
inherit pname version src meta;
|
||||
|
||||
rpath = stdenv.lib.makeLibraryPath [
|
||||
alsaLib
|
||||
|
@ -81,10 +85,12 @@ let
|
|||
gnome2.GConf
|
||||
gtk3
|
||||
libappindicator-gtk3
|
||||
libdrm
|
||||
libnotify
|
||||
libpulseaudio
|
||||
libuuid
|
||||
libxcb
|
||||
mesa
|
||||
nspr
|
||||
nss
|
||||
pango
|
||||
|
@ -143,21 +149,16 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
darwin = stdenv.mkDerivation rec {
|
||||
inherit pname meta version;
|
||||
darwin = stdenv.mkDerivation {
|
||||
inherit pname version src meta;
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
nativeBuildInputs = [ undmg ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.slack-edge.com/mac_releases/Slack-${version}-macOS.dmg";
|
||||
inherit sha256;
|
||||
};
|
||||
sourceRoot = "Slack.app";
|
||||
|
||||
installPhase = ''
|
||||
/usr/bin/hdiutil mount -nobrowse -mountpoint slack-mnt $src
|
||||
mkdir -p $out/Applications
|
||||
cp -r ./slack-mnt/Slack.app $out/Applications
|
||||
/usr/bin/hdiutil unmount slack-mnt
|
||||
mkdir -p $out/Applications/Slack.app
|
||||
cp -R . $out/Applications/Slack.app
|
||||
/usr/bin/defaults write com.tinyspeck.slackmacgap SlackNoAutoUpdates -bool YES
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue