2023-05-24 13:37:59 +00:00
|
|
|
{ pkgs, stdenv, lib, nixosTests }:
|
2020-12-07 07:45:13 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
nodePackages = import ./node-composition.nix {
|
2022-01-25 03:21:06 +00:00
|
|
|
inherit pkgs;
|
2020-12-07 07:45:13 +00:00
|
|
|
inherit (stdenv.hostPlatform) system;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
nodePackages.n8n.override {
|
2022-10-21 18:38:19 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgs.nodePackages.node-pre-gyp
|
2023-08-10 07:59:29 +00:00
|
|
|
pkgs.which
|
2020-12-07 07:45:13 +00:00
|
|
|
];
|
2022-01-25 03:21:06 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildInputs = [
|
2023-08-10 07:59:29 +00:00
|
|
|
pkgs.libkrb5
|
2023-05-24 13:37:59 +00:00
|
|
|
pkgs.libmongocrypt
|
2023-08-10 07:59:29 +00:00
|
|
|
pkgs.postgresql
|
2022-10-21 18:38:19 +00:00
|
|
|
];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
# 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.
|
2023-02-16 17:41:37 +00:00
|
|
|
preRebuild = lib.optionalString stdenv.isAarch64 ''
|
2022-10-21 18:38:19 +00:00
|
|
|
rm -rf node_modules/oracledb
|
2022-05-18 14:49:53 +00:00
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# makes libmongocrypt bindings not look for static libraries in completely wrong places
|
|
|
|
BUILD_TYPE = "dynamic";
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
dontNpmInstall = true;
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = ./generate-dependencies.sh;
|
|
|
|
tests = nixosTests.n8n;
|
|
|
|
};
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2020-12-07 07:45:13 +00:00
|
|
|
meta = with lib; {
|
2023-01-11 07:51:40 +00:00
|
|
|
description = "Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.";
|
2022-01-25 03:21:06 +00:00
|
|
|
maintainers = with maintainers; [ freezeboy k900 ];
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.sustainableUse;
|
2020-12-07 07:45:13 +00:00
|
|
|
};
|
|
|
|
}
|