Unverified Commit 7e639934 authored by K900's avatar K900 Committed by GitHub
Browse files

Merge pull request #313617 from gepbird/n8n-fix-aarch64

n8n: fix aarch64 build
parents a2ab4d5a abbb4a7e
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -19,13 +19,17 @@ nodePackages.n8n.override {
    pkgs.postgresql
  ];

  preRebuild = lib.optionalString stdenv.isAarch64 ''
    # Oracle's official package on npm is binary only (WHY?!) and doesn't provide binaries for aarch64.
    # This can supposedly be fixed by building a custom copy of the module from source, but that's way
    # too much complexity for a setup no one would ever actually run.
    #
    # NB: If you _are_ actually running n8n on Oracle on aarch64, feel free to submit a patch.
  preRebuild = lib.optionalString stdenv.isAarch64 ''
    rm -rf node_modules/oracledb

    # This package tries to load a prebuilt binary for a different arch, and it doesn't provide the binary for aarch64.
    # It is marked as an optional dependency in pnpm-lock.yaml and there are no other references to it n8n.
    rm -rf node_modules/@sap/hana-client
  '';

  # makes libmongocrypt bindings not look for static libraries in completely wrong places