depot/third_party/nixpkgs/pkgs/by-name/ch/chezmoi/package.nix
Default email 83627f9931 Project import generated by Copybara.
GitOrigin-RevId: 2893f56de08021cffd9b6b6dfc70fd9ccd51eb60
2024-06-24 14:47:55 -04:00

53 lines
1.2 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
let
argset = {
pname = "chezmoi";
version = "2.49.1";
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${argset.version}";
hash = "sha256-DrilLcV6wyUVPPiDs5KiC8kztNCH4Fug5h35+xerLZU=";
};
vendorHash = "sha256-3nufF280WuDNvhKn9xP9dnxNX2VC59nifuJp+ebUSvk=";
nativeBuildInputs = [
installShellFiles
];
ldflags = [
"-s"
"-w"
"-X main.version=${argset.version}"
"-X main.builtBy=nixpkgs"
];
doCheck = false;
postInstall = ''
installShellCompletion --bash --name chezmoi.bash completions/chezmoi-completion.bash
installShellCompletion --fish completions/chezmoi.fish
installShellCompletion --zsh completions/chezmoi.zsh
'';
subPackages = [ "." ];
meta = {
homepage = "https://www.chezmoi.io/";
description = "Manage your dotfiles across multiple machines, securely";
changelog = "https://github.com/twpayne/chezmoi/releases/tag/${argset.src.rev}";
license = lib.licenses.mit;
mainProgram = "chezmoi";
maintainers = with lib.maintainers; [ AndersonTorres ];
};
};
in
buildGoModule argset