turbo: Rewrite wrapper from runCommand to symlinkJoin
This commit is contained in:
parent
2c0219bb23
commit
a640f69949
1 changed files with 14 additions and 7 deletions
|
@ -1,9 +1,16 @@
|
||||||
{ lib, runCommand, makeWrapper, turbo-unwrapped
|
{ lib, symlinkJoin, makeWrapper, turbo-unwrapped
|
||||||
, disableTelemetry ? true, disableUpdateNotifier ? true }:
|
, disableTelemetry ? true, disableUpdateNotifier ? true }:
|
||||||
|
|
||||||
runCommand "turbo" { nativeBuildInputs = [ makeWrapper ]; } ''
|
symlinkJoin {
|
||||||
mkdir -p $out/bin
|
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 \
|
makeWrapper ${turbo-unwrapped}/bin/turbo $out/bin/turbo \
|
||||||
${lib.optionalString disableTelemetry "--set TURBO_TELEMETRY_DISABLED 1"} \
|
${lib.optionalString disableTelemetry "--set TURBO_TELEMETRY_DISABLED 1"} \
|
||||||
${lib.optionalString disableUpdateNotifier "--add-flags --no-update-notifier"}
|
${lib.optionalString disableUpdateNotifier "--add-flags --no-update-notifier"}
|
||||||
''
|
'';
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue