2023-09-01 04:25:59 +02:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, libgit2_1_6
|
2023-11-19 01:10:41 +01:00
|
|
|
, rust-jemalloc-sys
|
2023-09-01 04:25:59 +02:00
|
|
|
, zlib
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
, git
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "biome";
|
2023-11-27 21:46:05 +01:00
|
|
|
version = "1.4.0";
|
2023-09-01 04:25:59 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "biomejs";
|
|
|
|
repo = "biome";
|
|
|
|
rev = "cli/v${version}";
|
2023-11-27 21:46:05 +01:00
|
|
|
hash = "sha256-6dg/Snp9hjeE/4N2N4tEBOjurzWK3eesO1QhujMw1yY=";
|
2023-09-01 04:25:59 +02:00
|
|
|
};
|
|
|
|
|
2023-11-27 21:46:05 +01:00
|
|
|
cargoHash = "sha256-NGojVRaHFZSLfsjl7xh5h6tEer3BF0Hi7HJ7p5zDdfo=";
|
2023-09-01 04:25:59 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libgit2_1_6
|
2023-11-19 01:10:41 +01:00
|
|
|
rust-jemalloc-sys
|
2023-09-01 04:25:59 +02:00
|
|
|
zlib
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
git
|
|
|
|
];
|
|
|
|
|
2023-09-15 16:55:59 +02:00
|
|
|
cargoBuildFlags = [ "-p=biome_cli" ];
|
2023-09-01 04:25:59 +02:00
|
|
|
cargoTestFlags = cargoBuildFlags;
|
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
}
|