12 inherit (stdenvNoCC.hostPlatform) system;
18 x86_64-linux = "sha256-6VS21x2egWBV6eJqRCBGG7mEGPIDFtY9GN6Ry4ilC70=";
19 x86_64-darwin = "sha256-UBUGjA+jUkT6p9714l8IvDDI/qhWNctVFOvcA2S5kQU=";
20 aarch64-linux = "sha256-2QAahqcM2gi3lT+18q2Nm9GNqVsqzX3RajBsTn+KB1c=";
21 aarch64-darwin = "sha256-uEH7Y7c9BcU/Q/jwx/inFMvUrgm2dUruID+FJL+rA6Y=";
27 x86_64-linux = "sha256-jNPL30e5xvyajlIqivtEpSb3cRhfgFhLFlC+CaLY2IM=";
28 x86_64-darwin = "sha256-U1eQaYwnm/mdQoZ8YxK/+s3HboVfMIAtdI7aQnCiDM8=";
29 aarch64-linux = "sha256-YtSyKZYG8vdubZUfo2FjEoVwSF82TXzeLJjPpHqgFDk=";
30 aarch64-darwin = "sha256-aQSiXK7voP5/mPFIscfTnSc4Ae5/f+WW8MR6ZtuC/eY=";
35 stdenvNoCC.mkDerivation (finalAttrs: {
37 version = channels.${channel}.version;
39 hash = (channels.${channel}.hash).${system};
44 x86_64-linux = "linux_amd64";
45 aarch64-linux = "linux_arm64";
46 x86_64-darwin = "darwin_amd64";
47 aarch64-darwin = "darwin_arm64";
51 x86_64-linux = "tar.gz";
52 aarch64-linux = "tar.gz";
53 x86_64-darwin = "zip";
54 aarch64-darwin = "zip";
57 "https://github.com/coder/coder/releases/download/v${finalAttrs.version}/coder_${finalAttrs.version}_${systemName}.${ext}";
70 *.tar.gz) tar -xz -f "$src" ;;
71 *.zip) unzip "$src" ;;
80 install -D -m755 coder $out/bin/coder
86 installShellCompletion --cmd coder \
87 --bash <($out/bin/coder completion bash) \
88 --fish <($out/bin/coder completion fish) \
89 --zsh <($out/bin/coder completion zsh)
91 wrapProgram $out/bin/coder \
92 --prefix PATH : ${lib.makeBinPath [ terraform ]}
95 # integration tests require network access
99 description = "Provision remote development environments via Terraform";
100 homepage = "https://coder.com";
101 license = lib.licenses.agpl3Only;
102 mainProgram = "coder";
103 maintainers = with lib.maintainers; [ ghuntley urandom ];
107 updateScript = ./update.sh;