3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/slack-cli/default.nix
2018-08-15 12:32:19 +01:00

28 lines
699 B
Nix

# 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.
{ stdenv, lib, fetchFromGitHub, makeWrapper, curl, jq }:
stdenv.mkDerivation rec {
name = "slack-cli-${version}";
version = "0.18.0";
src = fetchFromGitHub {
owner = "rockymadden";
repo = "slack-cli";
rev = "v${version}";
sha256 = "022yr3cpfg0v7cxi62zzk08vp0l3w851qpfh6amyfgjiynnfyddl";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
mkdir -p "$out/bin"
cp src/slack "$out/bin"
wrapProgram "$out/bin/slack" --prefix PATH : ${lib.makeBinPath [ curl jq ]}
'';
}