2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "chezmoi";
|
2022-11-04 12:27:35 +00:00
|
|
|
version = "2.26.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "twpayne";
|
|
|
|
repo = "chezmoi";
|
|
|
|
rev = "v${version}";
|
2022-11-04 12:27:35 +00:00
|
|
|
sha256 = "sha256-2NtYaKZiUPp33wZuH4pA0uSPdu8xxQASPlsSqjRDTRc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
vendorSha256 = "sha256-iDzVe8wnvJlrY8F+LyzLkX+BlvkgUPOEDQqkUPNDuUg=";
|
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";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jhillyerd ];
|
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|