mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-13 23:57:38 +00:00
turbo: init at 1.7.0
This commit is contained in:
parent
545c7a31e5
commit
d76127f9fe
91
pkgs/tools/misc/turbo/default.nix
Normal file
91
pkgs/tools/misc/turbo/default.nix
Normal file
@ -0,0 +1,91 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildGoModule
|
||||
, git
|
||||
, nodejs
|
||||
, protobuf
|
||||
, protoc-gen-go
|
||||
, protoc-gen-go-grpc
|
||||
, rustPlatform
|
||||
, pkg-config
|
||||
, openssl
|
||||
, extra-cmake-modules
|
||||
, fontconfig
|
||||
, go
|
||||
}:
|
||||
let
|
||||
version = "1.7.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vercel";
|
||||
repo = "turbo";
|
||||
rev = "v${version}";
|
||||
sha256 = "YTuEv2S3jNV2o7HJML+P6OMazgwgRhUPnd/zaTWfDWs=";
|
||||
};
|
||||
|
||||
go-turbo = buildGoModule rec {
|
||||
inherit src version;
|
||||
pname = "go-turbo";
|
||||
modRoot = "cli";
|
||||
|
||||
vendorSha256 = "Kx/CLFv23h2TmGe8Jwu+S3QcONfqeHk2fCW1na75c0s=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
git
|
||||
nodejs
|
||||
protobuf
|
||||
protoc-gen-go
|
||||
protoc-gen-go-grpc
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
make compile-protos
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
# Some tests try to run mkdir $HOME
|
||||
HOME=$TMP
|
||||
|
||||
# Test_getTraversePath requires that source is a git repo
|
||||
# pwd: /build/source/cli
|
||||
pushd ..
|
||||
git config --global init.defaultBranch main
|
||||
git init
|
||||
popd
|
||||
'';
|
||||
|
||||
};
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "turbo";
|
||||
inherit src version;
|
||||
cargoBuildFlags = [
|
||||
"--package"
|
||||
"turbo"
|
||||
];
|
||||
RELEASE_TURBO_CLI = "true";
|
||||
|
||||
cargoSha256 = "ENw6NU3Fedd+OJEEWgL8A54aowNqjn3iv7rxlr+/4ZE=";
|
||||
RUSTC_BOOTSTRAP = 1;
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
extra-cmake-modules
|
||||
];
|
||||
buildInputs = [
|
||||
openssl
|
||||
fontconfig
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
ln -s ${go-turbo}/bin/turbo $out/bin/go-turbo
|
||||
'';
|
||||
|
||||
# Browser tests time out with chromium and google-chrome
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "High-performance build system for JavaScript and TypeScript codebases";
|
||||
homepage = "https://turbo.build/";
|
||||
maintainers = with maintainers; [ dlip ];
|
||||
license = licenses.mpl20;
|
||||
};
|
||||
}
|
@ -12783,6 +12783,8 @@ with pkgs;
|
||||
|
||||
tuptime = callPackage ../tools/system/tuptime { };
|
||||
|
||||
turbo = callPackage ../tools/misc/turbo { };
|
||||
|
||||
turses = callPackage ../applications/networking/instant-messengers/turses { };
|
||||
|
||||
tutanota-desktop = callPackage ../applications/networking/mailreaders/tutanota-desktop { };
|
||||
|
Loading…
Reference in New Issue
Block a user