nixpkgs-suyu/pkgs/tools/misc/chezmoi/default.nix
2020-08-25 07:06:44 +00:00

38 lines
1 KiB
Nix

{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "chezmoi";
version = "1.8.5";
src = fetchFromGitHub {
owner = "twpayne";
repo = "chezmoi";
rev = "v${version}";
sha256 = "16sv1kbd66rllnnl851y3x54wkl0p7g0qsblprvfr9715svk1835";
};
vendorSha256 = "1i9d672mzmb97s26n0v01m70g4viyl9pdk25haxr6ny4rab2wbi7";
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 ];
};
}