nixpkgs/pkgs/tools/misc/chezmoi/default.nix
2020-08-13 07:36:55 +00:00

40 lines
1.0 KiB
Nix

{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "chezmoi";
version = "1.8.4";
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${version}";
sha256 = "0m8ik01y1lag3mgg3g4rxvzndh86b972hv2702dqs28l5zy5h3mv";
};
vendorSha256 = "18s60k7y64z12lx9lgj13fl1jh0aiqinwxrsz751d2iqhgdi2jja";
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 ];
platforms = platforms.all;
};
}