depot/third_party/nixpkgs/pkgs/tools/misc/chezmoi/default.nix
Default email d6cfb865ad Project import generated by Copybara.
GitOrigin-RevId: 5265d49a36bb5a18c85e6817b338b456acc3b8cc
2020-10-18 20:13:06 -04:00

38 lines
1 KiB
Nix

{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "chezmoi";
version = "1.8.7";
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${version}";
sha256 = "1inmrcp01rxrjylkj9vzgw3q713q6jsqbnqllbzvp8q6kqfliayg";
};
vendorSha256 = "0m946g6iw42q5ggki2j1lqdshpsxjmdsm1snnyzjzyy8gd88m4cx";
doCheck = false;
buildFlagsArray = [
"-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 stdenv.lib; {
homepage = "https://www.chezmoi.io/";
description = "Manage your dotfiles across multiple machines, securely";
license = licenses.mit;
maintainers = with maintainers; [ jhillyerd ];
};
}