summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/tg/tgswitch/package.nix
blob: a8199560f3b733f7566946d11d07cbf625c3ff85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
  buildGoModule,
  lib,
  fetchFromGitHub,
}:
buildGoModule (finalAttrs: {
  pname = "tgswitch";
  version = "0.6.0";

  src = fetchFromGitHub {
    owner = "warrensbox";
    repo = "tgswitch";
    rev = finalAttrs.version;
    sha256 = "sha256-Q3Cef3B7hfVHLvW8Rx6IdH9g/3luDhpUMZ8TXVpb8gQ=";
  };

  vendorHash = "sha256-PlTdbA8Z2I2SWoG7oYG87VQfczx9zP1SCJx70UWOEog=";

  ldflags = [
    "-s"
    "-w"
  ];

  # There are many modifications need to be done to make tests run. For example:
  # 1. Network access
  # 2. Operation on `/var/empty` not permitted on macOS
  doCheck = false;

  meta = {
    description = "Command line tool to switch between different versions of terragrunt";
    mainProgram = "tgswitch";
    homepage = "https://github.com/warrensbox/tgswitch";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ psibi ];
  };
})