{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { pname = "chezmoi"; version = "1.7.7"; src = fetchFromGitHub { owner = "twpayne"; repo = "chezmoi"; rev = "v${version}"; sha256 = "18v3sgi0aa8cd9sk3nhhyc4dmzpmq28wa21zyc9nvyw40ngmmxsb"; }; modSha256 = "0c2jslcigq9ajchfr7inb7b6cpla7xjibcmjsvwspfzknrlrsbfn"; buildFlagsArray = [ "-ldflags=-s -w -X github.com/twpayne/chezmoi/cmd.VersionStr=${version}" ]; nativeBuildInputs = [ installShellFiles ]; postInstall = '' installShellCompletion --bash completions/chezmoi-completion.bash installShellCompletion --fish completions/chezmoi.fish installShellCompletion --zsh completions/chezmoi.zsh ''; subPackages = [ "." ]; meta = with stdenv.lib; { homepage = https://github.com/twpayne/chezmoi; description = "Manage your dotfiles across multiple machines, securely"; license = licenses.mit; maintainers = with maintainers; [ jhillyerd ]; platforms = platforms.all; }; }