diff --git a/pkgs/tools/misc/bat/default.nix b/pkgs/tools/misc/bat/default.nix index d08a609735f2..95bc44dcce06 100644 --- a/pkgs/tools/misc/bat/default.nix +++ b/pkgs/tools/misc/bat/default.nix @@ -4,17 +4,22 @@ rustPlatform.buildRustPackage rec { pname = "bat"; - version = "0.15.0"; + version = "0.15.1"; src = fetchFromGitHub { owner = "sharkdp"; repo = pname; rev = "v${version}"; - sha256 = "07yng5bwhin7yqj1hihmxgi8w0n45nks05a8795zwsw92k373ib4"; + sha256 = "10cs94ja1dmn0f24gqkcy8rf68b3b43k6qpbb5njbg0hcx3x6cyj"; fetchSubmodules = true; }; - cargoSha256 = "1xqbpij6lr0bqyi0cfwgp3d4hcjhibpdc4dfm9gb39mmbgradrzf"; + cargoSha256 = "13cphi08bp6lg054acgliir8dx2jajll4m3c4xxy04skmx555zr8"; + + # Disable test that's broken on macOS. + # This should probably be removed on the next release. + # https://github.com/sharkdp/bat/issues/983 + patches = [ ./macos.patch ]; nativeBuildInputs = [ pkgconfig llvmPackages.libclang installShellFiles makeWrapper ]; diff --git a/pkgs/tools/misc/bat/macos.patch b/pkgs/tools/misc/bat/macos.patch new file mode 100644 index 000000000000..549782f0c91b --- /dev/null +++ b/pkgs/tools/misc/bat/macos.patch @@ -0,0 +1,13 @@ +diff --git a/src/assets.rs b/src/assets.rs +index 4f8556f..222abc2 100644 +--- a/src/assets.rs ++++ b/src/assets.rs +@@ -336,7 +336,7 @@ mod tests { + assert_eq!(test.syntax_for_file("Makefile"), "Makefile"); + } + +- #[cfg(unix)] ++ #[cfg(all(unix,not(target_os = "macos")))] + #[test] + fn syntax_detection_invalid_utf8() { + use std::os::unix::ffi::OsStrExt;