2023-07-12 20:11:37 +02:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2023-02-16 04:27:44 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, protobuf
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, extra-cmake-modules
|
|
|
|
, fontconfig
|
2023-07-13 21:13:10 +02:00
|
|
|
, rust-jemalloc-sys
|
2023-03-11 12:07:29 +01:00
|
|
|
, testers
|
|
|
|
, turbo
|
2023-07-12 20:11:37 +02:00
|
|
|
, nix-update-script
|
|
|
|
, IOKit
|
|
|
|
, CoreServices
|
|
|
|
, CoreFoundation
|
2024-01-29 07:04:12 +01:00
|
|
|
, capnproto
|
2023-02-16 04:27:44 +01:00
|
|
|
}:
|
2024-01-29 07:04:12 +01:00
|
|
|
rustPlatform.buildRustPackage rec{
|
|
|
|
pname = "turbo";
|
2024-01-20 06:33:01 +01:00
|
|
|
version = "1.11.3";
|
2023-02-16 04:27:44 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vercel";
|
|
|
|
repo = "turbo";
|
|
|
|
rev = "v${version}";
|
2024-01-20 06:33:01 +01:00
|
|
|
hash = "sha256-hjJXbGct9ZmriKdVjB7gwfmFsV1Tv57V7DfUMFZ8Xv0=";
|
2023-02-16 04:27:44 +01:00
|
|
|
};
|
|
|
|
cargoBuildFlags = [
|
|
|
|
"--package"
|
|
|
|
"turbo"
|
|
|
|
];
|
|
|
|
RELEASE_TURBO_CLI = "true";
|
|
|
|
|
2024-01-20 06:33:01 +01:00
|
|
|
cargoHash = "sha256-bAXO4Lqv4ibo+fz3679MjNgP2MMY8TbxhG0+DRy0xcA=";
|
2023-07-12 20:11:37 +02:00
|
|
|
|
2023-02-16 04:27:44 +01:00
|
|
|
RUSTC_BOOTSTRAP = 1;
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
extra-cmake-modules
|
2023-04-05 06:52:42 +02:00
|
|
|
protobuf
|
2024-01-20 06:33:01 +01:00
|
|
|
capnproto
|
2023-02-16 04:27:44 +01:00
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
fontconfig
|
2023-07-13 21:13:10 +02:00
|
|
|
rust-jemalloc-sys
|
2023-07-12 20:11:37 +02:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
IOKit
|
|
|
|
CoreServices
|
|
|
|
CoreFoundation
|
2023-02-16 04:27:44 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
# Browser tests time out with chromium and google-chrome
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-07-12 20:11:37 +02:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
extraArgs = [ "--version-regex" "^\d+\.\d+\.\d+$" ];
|
|
|
|
};
|
|
|
|
tests.version = testers.testVersion { package = turbo; };
|
|
|
|
};
|
2023-03-11 12:07:29 +01:00
|
|
|
|
2023-02-16 04:27:44 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "High-performance build system for JavaScript and TypeScript codebases";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "turbo";
|
2023-02-16 04:27:44 +01:00
|
|
|
homepage = "https://turbo.build/";
|
|
|
|
maintainers = with maintainers; [ dlip ];
|
|
|
|
license = licenses.mpl20;
|
|
|
|
};
|
|
|
|
}
|