diff options
author | Sam A. Horvath-Hunt <hello@samhh.com> | 2024-05-01 15:54:59 +0100 |
---|---|---|
committer | Sam A. Horvath-Hunt <hello@samhh.com> | 2024-05-01 15:54:59 +0100 |
commit | a640f69949b59e4a4b4aeaebe10824f0228a7df5 (patch) | |
tree | 7b54714a15890ac76a8f30eed861b5b7105c59bf | |
parent | 2c0219bb232c267fda35765954d0ca5df5fa3b08 (diff) |
turbo: Rewrite wrapper from runCommand to symlinkJoin
-rw-r--r-- | pkgs/tools/misc/turbo/wrapper.nix | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/pkgs/tools/misc/turbo/wrapper.nix b/pkgs/tools/misc/turbo/wrapper.nix index 1bb5e10f34b67..89551f02da468 100644 --- a/pkgs/tools/misc/turbo/wrapper.nix +++ b/pkgs/tools/misc/turbo/wrapper.nix @@ -1,9 +1,16 @@ -{ lib, runCommand, makeWrapper, turbo-unwrapped +{ lib, symlinkJoin, 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"} -'' +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"} + ''; +} |