{ stdenv , lib , fetchFromGitHub , rustPlatform , installShellFiles , DiskArbitration , Foundation , libiconv , Security }: rustPlatform.buildRustPackage rec { pname = "delta"; version = "0.12.1"; src = fetchFromGitHub { owner = "dandavison"; repo = pname; rev = version; sha256 = "sha256-khW+Ri+MZytMZcd2tRXhc/D6kOOhk+LP6MsS+GijjQM="; }; cargoSha256 = "sha256-SD1y+l86wqlJUUaG4ae4PXXSMS+4CPth3F4pLYbXMVc="; nativeBuildInputs = [ installShellFiles ]; buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation 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 ]; }; }