1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 installShellFiles,
6}:
7
8buildGoModule rec {
9 pname = "scalingo";
10 version = "1.40.0";
11
12 src = fetchFromGitHub {
13 owner = pname;
14 repo = "cli";
15 rev = version;
16 hash = "sha256-AY2Iy7MwZ0OmNdv9EPgJ79Ug8pDuxlVNtLRhlX+XCC4=";
17 };
18
19 vendorHash = null;
20
21 preCheck = ''
22 export HOME=$TMPDIR
23 '';
24
25 nativeBuildInputs = [ installShellFiles ];
26 postInstall = ''
27 rm $out/bin/dists
28 installShellCompletion --cmd scalingo \
29 --bash cmd/autocomplete/scripts/scalingo_complete.bash \
30 --zsh cmd/autocomplete/scripts/scalingo_complete.zsh
31 '';
32
33 meta = with lib; {
34 description = "Command line client for the Scalingo PaaS";
35 mainProgram = "scalingo";
36 homepage = "https://doc.scalingo.com/platform/cli/start";
37 changelog = "https://github.com/Scalingo/cli/blob/master/CHANGELOG.md";
38 license = licenses.bsdOriginal;
39 maintainers = with maintainers; [ cimm ];
40 platforms = with lib.platforms; unix;
41 };
42}