depot/third_party/nixpkgs/pkgs/by-name/ch/chezmoi/package.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

53 lines
1.2 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
let
argset = {
pname = "chezmoi";
version = "2.52.3";
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${argset.version}";
hash = "sha256-OoVf0Gxyd+hTlM4VOei1atNEZYL2ZF3eKAHyUqRkRzs=";
};
vendorHash = "sha256-QJkTscj3MvmscanEqA9Md2OZPYoNtxIJsAd2J6E9zHk=";
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