{ stdenv , lib , fetchFromGitHub , rustPlatform , installShellFiles , libiconv , Security }: rustPlatform.buildRustPackage rec { pname = "delta"; version = "0.8.2"; src = fetchFromGitHub { owner = "dandavison"; repo = pname; rev = version; sha256 = "sha256-ztRwUf73ioygkgmE9t/EKJPerJJscJYG4YNeNdzXH1g="; }; cargoSha256 = "sha256-cCMHMGHfI0JyIL8+q2fyzamBGGHZx3mc2FpwTUa4S9Y="; nativeBuildInputs = [ installShellFiles ]; buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; postInstall = '' installShellCompletion --bash --name delta.bash etc/completion/completion.bash installShellCompletion --zsh --name _delta etc/completion/completion.zsh ''; meta = with lib; { homepage = "https://github.com/dandavison/delta"; description = "A syntax-highlighting pager for git"; changelog = "https://github.com/dandavison/delta/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ marsam zowoq ]; }; }