about summary refs log tree commit diff
path: root/pkgs/tools/misc/turbo/wrapper.nix
blob: 89551f02da468872b776eee3c69fdabe3361a4b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{ lib, symlinkJoin, makeWrapper, turbo-unwrapped
, disableTelemetry ? true, disableUpdateNotifier ? true }:

symlinkJoin {
  pname = "turbo";
  name = "turbo-${turbo-unwrapped.version}";
  inherit (turbo-unwrapped) version meta;
  nativeBuildInputs = [ makeWrapper ];
  paths = [ turbo-unwrapped ];
  postBuild = ''
    rm $out/bin/turbo
    makeWrapper ${turbo-unwrapped}/bin/turbo $out/bin/turbo \
      ${lib.optionalString disableTelemetry "--set TURBO_TELEMETRY_DISABLED 1"} \
      ${lib.optionalString disableUpdateNotifier "--add-flags --no-update-notifier"}
  '';
}