diff --git a/pkgs/tools/networking/slack-cli/default.nix b/pkgs/tools/networking/slack-cli/default.nix new file mode 100644 index 000000000000..3acf79932bcd --- /dev/null +++ b/pkgs/tools/networking/slack-cli/default.nix @@ -0,0 +1,25 @@ +# 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, fetchurl, makeWrapper, curl, jq }: + +stdenv.mkDerivation rec { + name = "slack-cli"; + version = "0.18.0"; + + src = fetchurl { + url = "https://github.com/rockymadden/slack-cli/archive/v${version}.tar.gz"; + sha256 = "0q19l88c1mvnzya58q21pc3v6mff56z43288kzk50000ri286wq2"; + }; + + buildInputs = [ makeWrapper ]; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + cp src/slack $out/bin + wrapProgram $out/bin/slack --prefix PATH : ${lib.makeBinPath [ curl jq ]} + ''; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 029a0a551384..c2f1f212a520 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16695,6 +16695,8 @@ with pkgs; slack = callPackage ../applications/networking/instant-messengers/slack { }; + slack-cli = callPackage ../tools/networking/slack-cli { }; + singularity = callPackage ../applications/virtualization/singularity { }; spectrwm = callPackage ../applications/window-managers/spectrwm { };