nixpkgs/pkgs/by-name/tu/turbo/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
807 B
Nix
Raw Normal View History

2024-07-18 21:23:24 +00:00
{
lib,
symlinkJoin,
makeBinaryWrapper,
testers,
turbo,
2024-07-18 21:23:24 +00:00
turbo-unwrapped,
# https://turbo.build/repo/docs/telemetry
2024-07-18 21:23:24 +00:00
disableTelemetry ? true,
disableUpdateNotifier ? true,
}:
2024-09-26 12:54:35 +00:00
symlinkJoin {
pname = "turbo";
inherit (turbo-unwrapped) version;
nativeBuildInputs = [ makeBinaryWrapper ];
paths = [ turbo-unwrapped ];
postBuild = ''
wrapProgram $out/bin/turbo \
${lib.optionalString disableTelemetry "--set TURBO_TELEMETRY_DISABLED 1"} \
${lib.optionalString disableUpdateNotifier "--set TURBO_NO_UPDATE_NOTIFIER 1"}
'';
passthru = {
tests.version = testers.testVersion { package = turbo; };
};
meta = {
inherit (turbo-unwrapped.meta)
description
homepage
changelog
license
mainProgram
maintainers
;
};
}