turbo: Add turbo-unwrapped / disable update checks & telemetry in turbo

This commit is contained in:
Sam A. Horvath-Hunt 2024-05-01 11:19:23 +01:00
parent 53248e5576
commit 2c0219bb23
No known key found for this signature in database
GPG Key ID: 4667250BD56735A8
3 changed files with 13 additions and 2 deletions

View File

@ -17,7 +17,7 @@
, capnproto
}:
rustPlatform.buildRustPackage rec{
pname = "turbo";
pname = "turbo-unwrapped";
version = "1.13.2";
src = fetchFromGitHub {
owner = "vercel";

View File

@ -0,0 +1,9 @@
{ lib, runCommand, makeWrapper, turbo-unwrapped
, disableTelemetry ? true, disableUpdateNotifier ? true }:
runCommand "turbo" { nativeBuildInputs = [ makeWrapper ]; } ''
mkdir -p $out/bin
makeWrapper ${turbo-unwrapped}/bin/turbo $out/bin/turbo \
${lib.optionalString disableTelemetry "--set TURBO_TELEMETRY_DISABLED 1"} \
${lib.optionalString disableUpdateNotifier "--add-flags --no-update-notifier"}
''

View File

@ -14033,7 +14033,9 @@ with pkgs;
tuptime = callPackage ../tools/system/tuptime { };
turbo = callPackage ../tools/misc/turbo {
turbo = callPackage ../tools/misc/turbo/wrapper.nix { };
turbo-unwrapped = callPackage ../tools/misc/turbo {
inherit (darwin.apple_sdk_11_0.frameworks) IOKit CoreServices CoreFoundation;
};