2018-08-15 13:56:19 +01:00
|
|
|
# slack-cli must be configured using the SLACK_CLI_TOKEN environment variable.
|
|
|
|
# Using `slack init` will not work because it tries to write to the Nix store.
|
|
|
|
#
|
|
|
|
# There is no reason that we couldn't change the file path that slack-cli uses
|
|
|
|
# for token storage, except that it would make the Nix package inconsistent with
|
|
|
|
# upstream and other distributions.
|
2018-08-15 09:56:04 +01:00
|
|
|
|
2018-08-15 13:56:19 +01:00
|
|
|
{ stdenv, fetchFromGitHub }:
|
2018-08-15 09:56:04 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-08-15 12:28:43 +01:00
|
|
|
name = "slack-cli-${version}";
|
2018-08-15 09:56:04 +01:00
|
|
|
version = "0.18.0";
|
|
|
|
|
2018-08-15 11:36:28 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rockymadden";
|
|
|
|
repo = "slack-cli";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "022yr3cpfg0v7cxi62zzk08vp0l3w851qpfh6amyfgjiynnfyddl";
|
2018-08-15 09:56:04 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-08-15 12:32:19 +01:00
|
|
|
mkdir -p "$out/bin"
|
|
|
|
cp src/slack "$out/bin"
|
2018-08-15 09:56:04 +01:00
|
|
|
'';
|
|
|
|
}
|