Created
          December 14, 2023 21:34 
        
      - 
      
- 
        Save ento/96629e4e6b43d175ba27c30c8d772bd0 to your computer and use it in GitHub Desktop. 
Revisions
- 
        ento created this gist Dec 14, 2023 .There are no files selected for viewingThis file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ { 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; }; }