mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 09:43:14 +00:00
ea48e15618
Functionally this: - Reduces occurrences of https://github.com/NixOS/nixpkgs/issues/208242 - Improve meta-attributes - Fixes the meta-attributes of the wrapper - Uses the preferred binary wrapper - Runs the version test against the wrapper to ensure flags & dlopen calls work
43 lines
843 B
Nix
43 lines
843 B
Nix
{
|
|
lib,
|
|
symlinkJoin,
|
|
makeBinaryWrapper,
|
|
testers,
|
|
turbo,
|
|
turbo-unwrapped,
|
|
# https://turbo.build/repo/docs/telemetry
|
|
disableTelemetry ? true,
|
|
disableUpdateNotifier ? true,
|
|
}:
|
|
|
|
symlinkJoin rec {
|
|
pname = "turbo";
|
|
inherit (turbo-unwrapped) version;
|
|
name = "${pname}-${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
|
|
;
|
|
};
|
|
}
|