{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { pname = "chezmoi"; version = "1.7.18"; src = fetchFromGitHub { owner = "twpayne"; repo = "chezmoi"; rev = "v${version}"; sha256 = "12gx78cbs7abizlqhs7y2w6lwlk5d1hhvixj0ki8d1d5vdr747bc"; }; modSha256 = "15b3hik3nzb7xnd6806dqdb36v7z2a0wmvxbrfwvnbigd8zd2y0j"; 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; }; }