diff --git a/pkgs/tools/misc/bat/default.nix b/pkgs/tools/misc/bat/default.nix index b4e5501fb739..e5b06521d72b 100644 --- a/pkgs/tools/misc/bat/default.nix +++ b/pkgs/tools/misc/bat/default.nix @@ -1,27 +1,39 @@ -{ stdenv, rustPlatform, fetchFromGitHub, pkgconfig, less -, Security, libiconv, installShellFiles, makeWrapper +{ stdenv +, rustPlatform +, fetchFromGitHub +, pkg-config +, less +, Security +, libiconv +, installShellFiles +, makeWrapper }: rustPlatform.buildRustPackage rec { - pname = "bat"; - version = "0.15.4"; + pname = "bat"; + version = "0.16.0"; src = fetchFromGitHub { - owner = "sharkdp"; - repo = pname; - rev = "v${version}"; - sha256 = "0pjdba2c6p7ldgx2yfffxqlpasrcfrlkw63m1ma34zdq0f287w3p"; + owner = "sharkdp"; + repo = pname; + rev = "v${version}"; + sha256 = "161pfix42j767ziyp4mslffdd20v9i0ncplvjw2pmpccwdm106kg"; }; - cargoSha256 = "0myz06hjv4hwzmyqa9l36i9j9d213a0mnq8rvx6wyff7mr9zk99i"; + cargoSha256 = "19vhhxfyx3nrngcs6dvwldnk9h4lvs7xjkb31aj1y0pyawz882h9"; - nativeBuildInputs = [ pkgconfig installShellFiles makeWrapper ]; + nativeBuildInputs = [ pkg-config installShellFiles makeWrapper ]; buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security libiconv ]; + # Remove after https://github.com/NixOS/nixpkgs/pull/97000 lands into master + preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' + unset SDKROOT + ''; + postInstall = '' installManPage $releaseDir/build/bat-*/out/assets/manual/bat.1 - installShellCompletion $releaseDir/build/bat-*/out/assets/completions/bat.fish + installShellCompletion $releaseDir/build/bat-*/out/assets/completions/bat.{fish,zsh} ''; # Insert Nix-built `less` into PATH because the system-provided one may be too old to behave as @@ -33,8 +45,8 @@ rustPlatform.buildRustPackage rec { 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 ]; + homepage = "https://github.com/sharkdp/bat"; + license = with licenses; [ asl20 /* or */ mit ]; maintainers = with maintainers; [ dywedir lilyball zowoq ]; }; }