Commit 32abce05 authored by Stanisław Pitucha's avatar Stanisław Pitucha
Browse files

wrangler: fix darwin builds

Remove unnecessary deps, update platforms.
parent bc685706
Loading
Loading
Loading
Loading
+23 −17
Original line number Diff line number Diff line
@@ -27,18 +27,24 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-8EItfBV2n2rnXPCTYjDZlr/tdlEn8YOdIzOsj35w5gQ=";
  };

  buildInputs = [
  buildInputs =
    [
      llvmPackages.libcxx
      llvmPackages.libunwind
    musl
    xorg.libX11
    ]
    ++ lib.optionals (stdenv.isLinux) [
      musl # not used, but requires extra work to remove
      xorg.libX11 # for the clipboardy package
    ];

  nativeBuildInputs = [
    autoPatchelfHook
  nativeBuildInputs =
    [
      makeWrapper
      nodejs
      pnpm_9.configHook
    ]
    ++ lib.optionals (stdenv.isLinux) [
      autoPatchelfHook
    ];

  # @cloudflare/vitest-pool-workers wanted to run a server as part of the build process
@@ -91,10 +97,10 @@ stdenv.mkDerivation (finalAttrs: {
      ryand56
    ];
    mainProgram = "wrangler";
    # cpp is required for building workerd.
    # workerd is used for some wrangler subcommands.
    # non-linux platforms may experience errors
    # on certain subcommands due to this issue.
    platforms = [ "x86_64-linux" ];
    # Tunneling and other parts of wrangler, which require workerd won't run on
    # other systems where precompiled binaries are not provided, but most
    # commands are will still work everywhere.
    # Potential improvements: build workerd from source instead.
    inherit (nodejs.meta) platforms;
  };
})