about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2024-02-07 10:23:01 +0100
committerGitHub <noreply@github.com>2024-02-07 10:23:01 +0100
commit8a07e4df2a365aabd9a36372a6f580b5e25e1a6d (patch)
tree34eba159d3dc590a79cc54c910bea042bf73cf0a /pkgs/tools
parentd1238f3546b55cda310d74eeacb239c8c7c8b78e (diff)
parent28077c7e24732423d9951e438927b67b56c98cab (diff)
downloadnixlib-8a07e4df2a365aabd9a36372a6f580b5e25e1a6d.tar
nixlib-8a07e4df2a365aabd9a36372a6f580b5e25e1a6d.tar.gz
nixlib-8a07e4df2a365aabd9a36372a6f580b5e25e1a6d.tar.bz2
nixlib-8a07e4df2a365aabd9a36372a6f580b5e25e1a6d.tar.lz
nixlib-8a07e4df2a365aabd9a36372a6f580b5e25e1a6d.tar.xz
nixlib-8a07e4df2a365aabd9a36372a6f580b5e25e1a6d.tar.zst
nixlib-8a07e4df2a365aabd9a36372a6f580b5e25e1a6d.zip
Merge pull request #284636 from dlip/turbo-update-1_11_3
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/turbo/default.nix104
1 files changed, 3 insertions, 101 deletions
diff --git a/pkgs/tools/misc/turbo/default.nix b/pkgs/tools/misc/turbo/default.nix
index 904e89da76ce..c891ad5d0da2 100644
--- a/pkgs/tools/misc/turbo/default.nix
+++ b/pkgs/tools/misc/turbo/default.nix
@@ -1,13 +1,7 @@
 { stdenv
 , lib
 , fetchFromGitHub
-, buildGo120Module
-, git
-, nodejs
-, capnproto
 , protobuf
-, protoc-gen-go
-, protoc-gen-go-grpc
 , rustPlatform
 , pkg-config
 , openssl
@@ -17,15 +11,13 @@
 , testers
 , turbo
 , nix-update-script
-, go
-, zlib
-, libiconv
-, Security
 , IOKit
 , CoreServices
 , CoreFoundation
+, capnproto
 }:
-let
+rustPlatform.buildRustPackage rec{
+  pname = "turbo";
   version = "1.11.3";
   src = fetchFromGitHub {
     owner = "vercel";
@@ -33,92 +25,6 @@ let
     rev = "v${version}";
     hash = "sha256-hjJXbGct9ZmriKdVjB7gwfmFsV1Tv57V7DfUMFZ8Xv0=";
   };
-
-  ffi = rustPlatform.buildRustPackage {
-    pname = "turbo-ffi";
-    inherit src version;
-    cargoBuildFlags = [ "--package" "turborepo-ffi" ];
-
-    cargoHash = "sha256-3eN8/nBARuaezlzPjAL0YPEPvNqm6jNQAREth8PgcSQ=";
-
-    RUSTC_BOOTSTRAP = 1;
-    nativeBuildInputs = [
-      pkg-config
-      extra-cmake-modules
-      protobuf
-    ];
-    buildInputs = [
-      openssl
-      fontconfig
-    ];
-
-    doCheck = false;
-
-    postInstall = ''
-      cp target/release-tmp/libturborepo_ffi.a $out/lib
-    '';
-  };
-
-
-  go-turbo = buildGo120Module {
-    inherit src version;
-    pname = "go-turbo";
-    modRoot = "cli";
-
-    proxyVendor = true;
-    vendorHash = "sha256-JHTg9Gcc0DVdltTGCUaOPSVxL0XVkwPJQm/LoKffU/o=";
-
-    nativeBuildInputs = [
-      git
-      nodejs
-      protobuf
-      protoc-gen-go
-      protoc-gen-go-grpc
-    ];
-
-    buildInputs = [zlib ] ++ lib.optionals stdenv.isDarwin [
-      Security
-      libiconv
-    ];
-
-    ldflags = [
-      "-s -w"
-      "-X main.version=${version}"
-      "-X main.commit=${src.rev}"
-      "-X main.date=1970-01-01-00:00:01"
-      "-X main.builtBy=goreleaser"
-    ];
-
-    preBuild = ''
-      make compile-protos
-      cp ${ffi}/lib/libturborepo_ffi.a ./internal/ffi/libturborepo_ffi_${go.GOOS}_${go.GOARCH}.a
-    '';
-
-    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
-
-      # package_deps_hash_test.go:492: hash of child-dir/libA/pkgignorethisdir/file, got 67aed78ea231bdee3de45b6d47d8f32a0a792f6d want go-turbo>     package_deps_hash_test.go:499: found extra hashes in map[.gitignore:3237694bc3312ded18386964 a855074af7b066af some-dir/another-one:7e59c6a6ea9098c6d3beb00e753e2c54ea502311 some-dir/excluded-file:7e59 c6a6ea9098c6d3beb00e753e2c54ea502311 some-dir/other-file:7e59c6a6ea9098c6d3beb00e753e2c54ea502311 some-fil e:7e59c6a6ea9098c6d3beb00e753e2c54ea502311]
-      rm ./internal/hashing/package_deps_hash_test.go
-      rm ./internal/hashing/package_deps_hash_go_test.go
-      #  Error:          Not equal:
-      # expected: env.DetailedMap{All:env.EnvironmentVariableMap(nil), BySource:env.BySource{Explicit:env.EnvironmentVariableMap{}, Matching:env.EnvironmentVariableMap{}}}
-      #  actual  : env.DetailedMap{All:env.EnvironmentVariableMap{}, BySource:env.BySource{Explicit:env.EnvironmentVariableMap{}, Matching:env.EnvironmentVariableMap{}}}
-      rm ./internal/run/global_hash_test.go
-    '';
-
-  };
-in
-rustPlatform.buildRustPackage {
-  pname = "turbo";
-  inherit src version;
   cargoBuildFlags = [
     "--package"
     "turbo"
@@ -144,10 +50,6 @@ rustPlatform.buildRustPackage {
       CoreFoundation
   ];
 
-  postInstall = ''
-    ln -s ${go-turbo}/bin/turbo $out/bin/go-turbo
-  '';
-
   # Browser tests time out with chromium and google-chrome
   doCheck = false;