67 lines
1.3 KiB
Nix
67 lines
1.3 KiB
Nix
|
{
|
||
|
lib,
|
||
|
rustPlatform,
|
||
|
fetchFromGitHub,
|
||
|
pkg-config,
|
||
|
libgit2,
|
||
|
rust-jemalloc-sys,
|
||
|
zlib,
|
||
|
git,
|
||
|
}:
|
||
|
rustPlatform.buildRustPackage rec {
|
||
|
pname = "biome";
|
||
|
version = "1.9.4";
|
||
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "biomejs";
|
||
|
repo = "biome";
|
||
|
rev = "cli/v${version}";
|
||
|
hash = "sha256-oK1tCPoTeUHvVdi+ym4J5xEj2NIi2zHQpNU1KUchQfY=";
|
||
|
};
|
||
|
|
||
|
cargoHash = "sha256-4vITbsXfgNFoeWMHz7a9Rk7FrsEZRe75nHiyHSMujEQ=";
|
||
|
|
||
|
nativeBuildInputs = [ pkg-config ];
|
||
|
|
||
|
buildInputs = [
|
||
|
libgit2
|
||
|
rust-jemalloc-sys
|
||
|
zlib
|
||
|
];
|
||
|
|
||
|
nativeCheckInputs = [ git ];
|
||
|
|
||
|
cargoBuildFlags = [ "-p=biome_cli" ];
|
||
|
cargoTestFlags =
|
||
|
cargoBuildFlags
|
||
|
++
|
||
|
# skip a broken test from v1.7.3 release
|
||
|
# this will be removed on the next version
|
||
|
[ "-- --skip=diagnostics::test::termination_diagnostic_size" ];
|
||
|
|
||
|
env = {
|
||
|
BIOME_VERSION = version;
|
||
|
LIBGIT2_NO_VENDOR = 1;
|
||
|
};
|
||
|
|
||
|
preCheck = ''
|
||
|
# tests assume git repository
|
||
|
git init
|
||
|
|
||
|
# tests assume $BIOME_VERSION is unset
|
||
|
unset BIOME_VERSION
|
||
|
'';
|
||
|
|
||
|
meta = {
|
||
|
description = "Toolchain of the web";
|
||
|
homepage = "https://biomejs.dev/";
|
||
|
changelog = "https://github.com/biomejs/biome/blob/${src.rev}/CHANGELOG.md";
|
||
|
license = lib.licenses.mit;
|
||
|
maintainers = with lib.maintainers; [
|
||
|
figsoda
|
||
|
isabelroses
|
||
|
];
|
||
|
mainProgram = "biome";
|
||
|
};
|
||
|
}
|