diff --git a/pkgs/tools/misc/turbo/default.nix b/pkgs/tools/misc/turbo/default.nix index 6a2f7e9b033a..ca499d635360 100644 --- a/pkgs/tools/misc/turbo/default.nix +++ b/pkgs/tools/misc/turbo/default.nix @@ -17,7 +17,7 @@ , capnproto }: rustPlatform.buildRustPackage rec{ - pname = "turbo"; + pname = "turbo-unwrapped"; version = "1.13.2"; src = fetchFromGitHub { owner = "vercel"; diff --git a/pkgs/tools/misc/turbo/wrapper.nix b/pkgs/tools/misc/turbo/wrapper.nix new file mode 100644 index 000000000000..1bb5e10f34b6 --- /dev/null +++ b/pkgs/tools/misc/turbo/wrapper.nix @@ -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"} +'' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0381bfd5d00a..f0d860ab14dd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; };