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 }:
|
||||
|
||||
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"}
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue