2018-06-05 22:56:17 +01:00
|
|
|
{ stdenv, rustPlatform, fetchFromGitHub, cmake, pkgconfig, zlib, libiconv, darwin }:
|
2018-04-30 21:12:20 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
name = "bat-${version}";
|
2018-06-01 11:13:52 +01:00
|
|
|
version = "0.4.1";
|
2018-04-30 21:12:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sharkdp";
|
|
|
|
repo = "bat";
|
|
|
|
rev = "v${version}";
|
2018-06-01 11:13:52 +01:00
|
|
|
sha256 = "0fiif6b8g2hdb05s028dbcpav6ax0qap2hbsr9p2bld4z7j7321m";
|
2018-04-30 21:12:20 +01:00
|
|
|
};
|
|
|
|
|
2018-06-01 11:13:52 +01:00
|
|
|
cargoSha256 = "0w0y3sfrpk8sn9rls90kjqrqr62pd690ripdfbvb5ipkzizp429l";
|
2018-04-30 21:12:20 +01:00
|
|
|
|
2018-06-01 11:13:52 +01:00
|
|
|
nativeBuildInputs = [ cmake pkgconfig zlib ];
|
2018-04-30 21:12:20 +01:00
|
|
|
|
2018-06-05 22:56:17 +01:00
|
|
|
buildInputs = [ libiconv ] ++ stdenv.lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
|
|
|
|
2018-04-30 21:12:20 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A cat(1) clone with syntax highlighting and Git integration";
|
|
|
|
homepage = https://github.com/sharkdp/bat;
|
2018-05-09 07:59:52 +01:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = with maintainers; [ dywedir ];
|
2018-06-05 22:56:17 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2018-04-30 21:12:20 +01:00
|
|
|
};
|
|
|
|
}
|