nixpkgs/pkgs/development/tools/biome/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.4 KiB
Nix
Raw Normal View History

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, libgit2_1_6
2023-11-19 00:10:41 +00:00
, rust-jemalloc-sys
, zlib
, stdenv
, darwin
, git
}:
rustPlatform.buildRustPackage rec {
pname = "biome";
2024-02-21 15:22:08 +00:00
version = "1.5.3";
src = fetchFromGitHub {
owner = "biomejs";
repo = "biome";
rev = "cli/v${version}";
2024-02-21 15:22:08 +00:00
hash = "sha256-70LHsmS01ssD4yCbHfBouV+NyhMIlBbX0jcHFu8aLMw=";
};
2024-02-21 15:22:08 +00:00
cargoHash = "sha256-wf6X6aY1O9EABQ6sDNAb3XsVrC0lgUtpgoieiPZ7r3k=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
libgit2_1_6
2023-11-19 00:10:41 +00:00
rust-jemalloc-sys
zlib
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
nativeCheckInputs = [
git
];
cargoBuildFlags = [ "-p=biome_cli" ];
2024-02-21 15:22:08 +00:00
cargoTestFlags = cargoBuildFlags ++
# skip a broken test from v1.5.3 release
# this will be removed on the next version
[ "-- --skip=diagnostics::test::termination_diagnostic_size" ];
env = {
BIOME_VERSION = version;
};
preCheck = ''
# tests assume git repository
git init
# tests assume $BIOME_VERSION is unset
unset BIOME_VERSION
'';
meta = with lib; {
description = "Toolchain of the web";
homepage = "https://biomejs.dev/";
changelog = "https://github.com/biomejs/biome/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "biome";
};
}