depot/third_party/nixpkgs/pkgs/tools/misc/chezmoi/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

43 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
pname = "chezmoi";
version = "2.33.6";
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${version}";
hash = "sha256-tBEhhYfwbipOmGl9lkzhOdXRf3CPNhaIYi4wppAW4Ps=";
};
vendorHash = "sha256-NDqwA6JHpq8ItT7ctv3KKkUwDZNgAjfgigqX9mGEYVY=";
doCheck = false;
ldflags = [
"-s" "-w" "-X main.version=${version}" "-X main.builtBy=nixpkgs"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --bash --name chezmoi.bash completions/chezmoi-completion.bash
installShellCompletion --fish completions/chezmoi.fish
installShellCompletion --zsh completions/chezmoi.zsh
'';
subPackages = [ "." ];
meta = with lib; {
homepage = "https://www.chezmoi.io/";
description = "Manage your dotfiles across multiple machines, securely";
changelog = "https://github.com/twpayne/chezmoi/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ jhillyerd ];
};
}