mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
571c71e6f7
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.
46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "terraform-backend-git";
|
|
version = "0.1.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "plumber-cd";
|
|
repo = "terraform-backend-git";
|
|
rev = "v${version}";
|
|
hash = "sha256-mLgUA7f4enlVuQx4VM3QbNuaAq7FgDaRyiG0sbT31ng=";
|
|
};
|
|
|
|
vendorHash = "sha256-vFx59dIdniLRP0xHcD3c22GidZOPdGZvmvg/BvxFBGI=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=github.com/plumber-cd/terraform-backend-git/cmd.Version=${version}"
|
|
];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd terraform-backend-git \
|
|
--bash <($out/bin/terraform-backend-git completion bash) \
|
|
--fish <($out/bin/terraform-backend-git completion fish) \
|
|
--zsh <($out/bin/terraform-backend-git completion zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Terraform HTTP Backend implementation that uses Git repository as storage";
|
|
mainProgram = "terraform-backend-git";
|
|
homepage = "https://github.com/plumber-cd/terraform-backend-git";
|
|
changelog = "https://github.com/plumber-cd/terraform-backend-git/blob/${src.rev}/CHANGELOG.md";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ blaggacao ];
|
|
};
|
|
}
|