{ stdenv , lib , fetchFromGitHub , rustPlatform , installShellFiles , libiconv , Security }: rustPlatform.buildRustPackage rec { pname = "delta"; version = "0.10.0"; src = fetchFromGitHub { owner = "dandavison"; repo = pname; rev = version; sha256 = "sha256-PkVZag/h1KzOWsE6+61HIixs+DldrGk9khlZy7DEbC8="; }; cargoSha256 = "sha256-o1HyPJ81g9fLA7CKQNKg1EctoIh3W0uGzKF2YNE+Ado="; 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 SuperSandro2000 ]; }; }