Created
December 14, 2023 21:34
-
-
Save ento/96629e4e6b43d175ba27c30c8d772bd0 to your computer and use it in GitHub Desktop.
Slack CLI for the next-generation Slack apps. The binary is statically linked, so it seems to work without autopatchelf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib, stdenv, fetchurl, ... }: | |
let | |
version = "2.11.0"; | |
platform = stdenv.hostPlatform; | |
archive = | |
if platform.isLinux then | |
{ | |
url = "https://downloads.slack-edge.com/slack-cli/slack_cli_${version}_linux_64-bit.tar.gz"; | |
sha256 = "1sk6hb1m6j327fp8zlnw8bd8sni1wfwgc95wxqaxmr5gcg1fxqks"; | |
} | |
else if platform.isDarwin then | |
{ | |
url = "https://downloads.slack-edge.com/slack-cli/slack_cli_${version}_macOS_64-bit.tar.gz"; | |
sha256 = "0ln6mf66a2n8yysq2x721h0j4s403y3967mqkh7jjh19mx2823mq"; | |
} | |
else throw "Unsupported platform ${platform}"; | |
in | |
stdenv.mkDerivation rec { | |
pname = "slack-cli"; | |
inherit version; | |
src = fetchurl { | |
inherit (archive) url sha256; | |
}; | |
installPhase = '' | |
mkdir -p $out/bin | |
cp slack $out/bin/slack | |
''; | |
meta = { | |
platforms = lib.platforms.unix; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment