mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 19:30:11 +00:00
54 lines
1.2 KiB
Nix
54 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
nix-update-script,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "chezmoi";
|
|
version = "2.72.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "twpayne";
|
|
repo = "chezmoi";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-vnVNPf4xSw7oVNy048i7lSQQukNjE7eTYG/8wfvs5VM=";
|
|
};
|
|
|
|
vendorHash = "sha256-89JSaV9hupRGhhiGsyLU7MUcDSiPE7dSX55El1SybLw=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
subPackages = [ "." ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.version=${finalAttrs.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
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Manage your dotfiles across multiple machines, securely";
|
|
homepage = "https://www.chezmoi.io/";
|
|
changelog = "https://github.com/twpayne/chezmoi/releases/tag/v${finalAttrs.version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ ];
|
|
mainProgram = "chezmoi";
|
|
};
|
|
})
|