2022-12-28 21:21:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "chezmoi";
|
2023-03-08 16:32:21 +00:00
|
|
|
version = "2.31.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "twpayne";
|
|
|
|
repo = "chezmoi";
|
|
|
|
rev = "v${version}";
|
2023-03-08 16:32:21 +00:00
|
|
|
hash = "sha256-zSr4lvrrGM+BgPWtq/J7vnB1lWHI8PmqP/N5csFL9kU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
vendorHash = "sha256-/CGdz6wIpEZrhZe6IYa43Z3bpN1byeSi9h4dTxCMxog=";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X main.version=${version}" "-X main.builtBy=nixpkgs"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --bash --name chezmoi.bash completions/chezmoi-completion.bash
|
|
|
|
installShellCompletion --fish completions/chezmoi.fish
|
|
|
|
installShellCompletion --zsh completions/chezmoi.zsh
|
|
|
|
'';
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.chezmoi.io/";
|
|
|
|
description = "Manage your dotfiles across multiple machines, securely";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/twpayne/chezmoi/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jhillyerd ];
|
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|