diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-01-25 11:31:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-25 11:31:27 +0100 |
commit | 3cd31450a13501ebb2c6851a59e81a60fdc38cab (patch) | |
tree | 830d7d6fc019512207dd34e666123de3ee675a4e /pkgs/applications/networking/n8n/node-env.nix | |
parent | ce7b327a52d1b82f82ae061754545b1c54b06c66 (diff) | |
download | nixpkgs-3cd31450a13501ebb2c6851a59e81a60fdc38cab.tar nixpkgs-3cd31450a13501ebb2c6851a59e81a60fdc38cab.tar.gz nixpkgs-3cd31450a13501ebb2c6851a59e81a60fdc38cab.tar.bz2 nixpkgs-3cd31450a13501ebb2c6851a59e81a60fdc38cab.tar.lz nixpkgs-3cd31450a13501ebb2c6851a59e81a60fdc38cab.tar.xz nixpkgs-3cd31450a13501ebb2c6851a59e81a60fdc38cab.tar.zst nixpkgs-3cd31450a13501ebb2c6851a59e81a60fdc38cab.zip |
Revert "nodePackages: regenerate with node2nix 1.9.0"
Diffstat (limited to 'pkgs/applications/networking/n8n/node-env.nix')
-rw-r--r-- | pkgs/applications/networking/n8n/node-env.nix | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/pkgs/applications/networking/n8n/node-env.nix b/pkgs/applications/networking/n8n/node-env.nix index c2b723195b7..759fa71c5aa 100644 --- a/pkgs/applications/networking/n8n/node-env.nix +++ b/pkgs/applications/networking/n8n/node-env.nix @@ -1,11 +1,8 @@ # This file originates from node2nix -{lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile}: +{lib, stdenv, nodejs, python2, utillinux, libtool, runCommand, writeTextFile}: let - # Workaround to cope with utillinux in Nixpkgs 20.09 and util-linux in Nixpkgs master - utillinux = if pkgs ? utillinux then pkgs.utillinux else pkgs.util-linux; - python = if nodejs ? python then nodejs.python else python2; # Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise @@ -245,8 +242,8 @@ let if(fs.existsSync("./package-lock.json")) { var packageLock = JSON.parse(fs.readFileSync("./package-lock.json")); - if(![1, 2].includes(packageLock.lockfileVersion)) { - process.stderr.write("Sorry, I only understand lock file versions 1 and 2!\n"); + if(packageLock.lockfileVersion !== 1) { + process.stderr.write("Sorry, I only understand lock file version 1!\n"); process.exit(1); } @@ -448,8 +445,8 @@ let ''; } // extraArgs); - # Builds a node environment (a node_modules folder and a set of binaries) - buildNodeDependencies = + # Builds a development shell + buildNodeShell = { name , packageName , version @@ -468,8 +465,8 @@ let let extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ]; - in - stdenv.mkDerivation ({ + + nodeDependencies = stdenv.mkDerivation ({ name = "node-dependencies-${name}-${version}"; buildInputs = [ tarWrapper python nodejs ] @@ -515,27 +512,6 @@ let ln -s $out/lib/node_modules/.bin $out/bin ''; } // extraArgs); - - # Builds a development shell - buildNodeShell = - { name - , packageName - , version - , src - , dependencies ? [] - , buildInputs ? [] - , production ? true - , npmFlags ? "" - , dontNpmInstall ? false - , bypassCache ? false - , reconstructLock ? false - , dontStrip ? true - , unpackPhase ? "true" - , buildPhase ? "true" - , ... }@args: - - let - nodeDependencies = buildNodeDependencies args; in stdenv.mkDerivation { name = "node-shell-${name}-${version}"; @@ -562,6 +538,5 @@ in { buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist; buildNodePackage = lib.makeOverridable buildNodePackage; - buildNodeDependencies = lib.makeOverridable buildNodeDependencies; buildNodeShell = lib.makeOverridable buildNodeShell; } |