-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #328295 from getchoo/pkgs/turbo/2.0.7
turbo: 1.13.2 -> 2.0.11; modernize; adopt
- Loading branch information
Showing
7 changed files
with
150 additions
and
13,733 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/crates/turborepo-lib/src/lib.rs b/crates/turborepo-lib/src/lib.rs | ||
index e8d41933da..26b8c7c92f 100644 | ||
--- a/crates/turborepo-lib/src/lib.rs | ||
+++ b/crates/turborepo-lib/src/lib.rs | ||
@@ -2,6 +2,7 @@ | ||
#![feature(box_patterns)] | ||
#![feature(error_generic_member_access)] | ||
#![feature(hash_extract_if)] | ||
+#![feature(lazy_cell)] | ||
#![feature(option_get_or_insert_default)] | ||
#![feature(once_cell_try)] | ||
#![feature(panic_info_message)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
stdenv, | ||
lib, | ||
fetchFromGitHub, | ||
rustPlatform, | ||
capnproto, | ||
darwin, | ||
extra-cmake-modules, | ||
fontconfig, | ||
llvmPackages, | ||
nix-update-script, | ||
openssl, | ||
pkg-config, | ||
protobuf, | ||
rust-jemalloc-sys, | ||
zlib, | ||
}: | ||
|
||
rustPlatform.buildRustPackage rec { | ||
pname = "turbo-unwrapped"; | ||
version = "2.0.12"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "vercel"; | ||
repo = "turbo"; | ||
rev = "v${version}"; | ||
hash = "sha256-rh9BX8M3Kgu07Pz4G3AM6S9zeK3Bb6CzOpcYo7rQgIw="; | ||
}; | ||
|
||
patches = [ | ||
# upstream uses nightly where lazy_cell is stable | ||
./enable-lazy_cell.patch | ||
]; | ||
|
||
cargoHash = "sha256-oZHSoPrPCUwXSrxEASm4LuYO+XHyNDRRl38Q7U7F/lk="; | ||
|
||
nativeBuildInputs = | ||
[ | ||
capnproto | ||
extra-cmake-modules | ||
pkg-config | ||
protobuf | ||
] | ||
# https://github.com/vercel/turbo/blob/ea740706e0592b3906ab34c7cfa1768daafc2a84/CONTRIBUTING.md#linux-dependencies | ||
++ lib.optional stdenv.isLinux llvmPackages.bintools; | ||
|
||
buildInputs = | ||
[ | ||
fontconfig | ||
openssl | ||
rust-jemalloc-sys | ||
zlib | ||
] | ||
++ lib.optionals stdenv.isDarwin ( | ||
with darwin.apple_sdk_11_0.frameworks; | ||
[ | ||
CoreFoundation | ||
CoreServices | ||
IOKit | ||
] | ||
); | ||
|
||
cargoBuildFlags = [ | ||
"--package" | ||
"turbo" | ||
]; | ||
|
||
# Browser tests time out with chromium and google-chrome | ||
doCheck = false; | ||
|
||
env = { | ||
# nightly features are used | ||
RUSTC_BOOTSTRAP = 1; | ||
}; | ||
|
||
passthru = { | ||
updateScript = nix-update-script { | ||
extraArgs = [ | ||
"--version-regex" | ||
"'v(\d+\.\d+\.\d+)'" | ||
]; | ||
}; | ||
}; | ||
|
||
meta = { | ||
description = "High-performance build system for JavaScript and TypeScript codebases"; | ||
homepage = "https://turbo.build/"; | ||
changelog = "https://github.com/vercel/turbo/releases/tag/v${version}"; | ||
license = lib.licenses.mit; | ||
maintainers = with lib.maintainers; [ | ||
dlip | ||
getchoo | ||
]; | ||
mainProgram = "turbo"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
lib, | ||
symlinkJoin, | ||
makeBinaryWrapper, | ||
testers, | ||
turbo, | ||
turbo-unwrapped, | ||
# https://turbo.build/repo/docs/telemetry | ||
disableTelemetry ? true, | ||
disableUpdateNotifier ? true, | ||
}: | ||
|
||
symlinkJoin rec { | ||
pname = "turbo"; | ||
inherit (turbo-unwrapped) version; | ||
name = "${pname}-${version}"; | ||
|
||
nativeBuildInputs = [ makeBinaryWrapper ]; | ||
|
||
paths = [ turbo-unwrapped ]; | ||
|
||
postBuild = '' | ||
wrapProgram $out/bin/turbo \ | ||
${lib.optionalString disableTelemetry "--set TURBO_TELEMETRY_DISABLED 1"} \ | ||
${lib.optionalString disableUpdateNotifier "--set TURBO_NO_UPDATE_NOTIFIER 1"} | ||
''; | ||
|
||
passthru = { | ||
tests.version = testers.testVersion { package = turbo; }; | ||
}; | ||
|
||
meta = { | ||
inherit (turbo-unwrapped.meta) | ||
description | ||
homepage | ||
changelog | ||
license | ||
mainProgram | ||
maintainers | ||
; | ||
}; | ||
} |
Oops, something went wrong.