fix: n8n build error
Some checks failed
Update Nix Packages with nix-update / nix-update (push) Failing after 3m13s
Some checks failed
Update Nix Packages with nix-update / nix-update (push) Failing after 3m13s
This commit is contained in:
@@ -1,22 +1,8 @@
|
|||||||
{
|
{ stdenv, lib, nixosTests, fetchFromGitHub, nodejs, pnpm_10, fetchPnpmDeps
|
||||||
stdenv,
|
, pnpmConfigHook, python3, node-gyp, cctools, xcbuild, libkrb5, libmongocrypt
|
||||||
lib,
|
, libpq, makeWrapper, }:
|
||||||
nixosTests,
|
let python = python3.withPackages (ps: with ps; [ websockets ]);
|
||||||
fetchFromGitHub,
|
in stdenv.mkDerivation (finalAttrs: {
|
||||||
nodejs,
|
|
||||||
pnpm_10,
|
|
||||||
fetchPnpmDeps,
|
|
||||||
pnpmConfigHook,
|
|
||||||
python3,
|
|
||||||
node-gyp,
|
|
||||||
cctools,
|
|
||||||
xcbuild,
|
|
||||||
libkrb5,
|
|
||||||
libmongocrypt,
|
|
||||||
libpq,
|
|
||||||
makeWrapper,
|
|
||||||
}:
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
|
||||||
pname = "n8n";
|
pname = "n8n";
|
||||||
version = "2.8.3";
|
version = "2.8.3";
|
||||||
|
|
||||||
@@ -34,17 +20,15 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
hash = "sha256-gX4pYiztKIRFbJNZhtQviWpp80teOzX1JaYKylGe4TY=";
|
hash = "sha256-gX4pYiztKIRFbJNZhtQviWpp80teOzX1JaYKylGe4TY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs = [
|
||||||
[
|
|
||||||
pnpmConfigHook
|
pnpmConfigHook
|
||||||
pnpm_10
|
pnpm_10
|
||||||
python3 # required to build sqlite3 bindings
|
python3 # required to build sqlite3 bindings
|
||||||
node-gyp # required to build sqlite3 bindings
|
node-gyp # required to build sqlite3 bindings
|
||||||
makeWrapper
|
makeWrapper
|
||||||
]
|
] ++ lib.optional stdenv.hostPlatform.isDarwin [ cctools xcbuild ];
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin [cctools xcbuild];
|
|
||||||
|
|
||||||
buildInputs = [nodejs libkrb5 libmongocrypt libpq];
|
buildInputs = [ nodejs libkrb5 libmongocrypt libpq ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
@@ -80,11 +64,22 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/{bin,lib/n8n}
|
mkdir -p $out/{bin,lib/n8n}
|
||||||
mv {packages,node_modules} $out/lib/n8n
|
cp -r {packages,node_modules} $out/lib/n8n
|
||||||
|
|
||||||
makeWrapper $out/lib/n8n/packages/cli/bin/n8n $out/bin/n8n \
|
makeWrapper $out/lib/n8n/packages/cli/bin/n8n $out/bin/n8n \
|
||||||
--set N8N_RELEASE_TYPE "stable"
|
--set N8N_RELEASE_TYPE "stable"
|
||||||
|
|
||||||
|
# JavaScript runner
|
||||||
|
makeWrapper ${nodejs}/bin/node $out/bin/n8n-task-runner \
|
||||||
|
--add-flags "$out/lib/n8n/packages/@n8n/task-runner/dist/start.js"
|
||||||
|
|
||||||
|
# Python runner
|
||||||
|
mkdir -p $out/lib/n8n-task-runner-python
|
||||||
|
cp -r packages/@n8n/task-runner-python/* $out/lib/n8n-task-runner-python/
|
||||||
|
makeWrapper ${python}/bin/python $out/bin/n8n-task-runner-python \
|
||||||
|
--add-flags "$out/lib/n8n-task-runner-python/src/main.py" \
|
||||||
|
--prefix PYTHONPATH : "$out/lib/n8n-task-runner-python"
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@@ -99,14 +94,16 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
dontRewriteSymlinks = true;
|
dontRewriteSymlinks = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Free and source-available fair-code licensed workflow automation tool";
|
description =
|
||||||
|
"Free and source-available fair-code licensed workflow automation tool";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Free and source-available fair-code licensed workflow automation tool.
|
Free and source-available fair-code licensed workflow automation tool.
|
||||||
Easily automate tasks across different services.
|
Easily automate tasks across different services.
|
||||||
'';
|
'';
|
||||||
homepage = "https://n8n.io";
|
homepage = "https://n8n.io";
|
||||||
changelog = "https://github.com/n8n-io/n8n/releases/tag/n8n@${finalAttrs.version}";
|
changelog =
|
||||||
maintainers = with lib.maintainers; [gepbird AdrienLemaire sweenu];
|
"https://github.com/n8n-io/n8n/releases/tag/n8n@${finalAttrs.version}";
|
||||||
|
maintainers = with lib.maintainers; [ gepbird AdrienLemaire sweenu ];
|
||||||
license = lib.licenses.sustainableUse;
|
license = lib.licenses.sustainableUse;
|
||||||
mainProgram = "n8n";
|
mainProgram = "n8n";
|
||||||
platforms = lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
|
|||||||
Reference in New Issue
Block a user