{ stdenv, rustPlatform, fetchFromGitHub, cmake, pkgconfig, zlib , Security, libiconv }: rustPlatform.buildRustPackage rec { name = "bat-${version}"; version = "0.7.0"; src = fetchFromGitHub { owner = "sharkdp"; repo = "bat"; rev = "v${version}"; sha256 = "1dhn88asf08dvl4827v4mkxafcr01m1h5jmicvzda9ywmr82g1cs"; fetchSubmodules = true; }; cargoSha256 = "10s8ig08prs1wcsisrllvsixqkrkwjx769y1w5fypldn9kfk2lka"; nativeBuildInputs = [ cmake pkgconfig zlib ]; buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security libiconv ]; meta = with stdenv.lib; { description = "A cat(1) clone with syntax highlighting and Git integration"; homepage = https://github.com/sharkdp/bat; license = with licenses; [ asl20 /* or */ mit ]; maintainers = with maintainers; [ dywedir ]; platforms = platforms.linux ++ platforms.darwin; }; }