nixpkgs/pkgs/by-name/ch/chezmoi/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.2 KiB
Nix
Raw Normal View History

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
2022-12-26 19:55:25 +00:00
}:
2019-02-07 01:17:17 +00:00
let
argset = {
pname = "chezmoi";
2024-12-08 06:42:43 +00:00
version = "2.55.0";
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${argset.version}";
2024-12-08 06:42:43 +00:00
hash = "sha256-S9g0v/p3Hv6yMKz3OPtaZrtkyvIXbtFW4GlGxeGqx+M=";
};
2024-12-08 06:42:43 +00:00
vendorHash = "sha256-hmNb712gnQsJSjfhVKlNTkFx/Nmx0rkJMFRdcwJj3ZA=";
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 ];
};
2019-02-07 01:17:17 +00:00
};
in
buildGoModule argset