nixpkgs/pkgs/by-name/tg/tgswitch/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

31 lines
832 B
Nix

{ buildGoModule, lib, fetchFromGitHub }:
buildGoModule rec {
pname = "tgswitch";
version = "0.6.0";
src = fetchFromGitHub {
owner = "warrensbox";
repo = "tgswitch";
rev = 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 = with lib; {
description = "Command line tool to switch between different versions of terragrunt";
mainProgram = "tgswitch";
homepage = "https://github.com/warrensbox/tgswitch";
license = licenses.mit;
maintainers = with maintainers; [ psibi ];
};
}