buildNodePackage: by default use Node.js' platforms

This commit is contained in:
Mario Rodas 2021-01-21 04:20:00 +00:00
parent 66e44425c6
commit ad14668f2a

View File

@ -388,10 +388,11 @@ let
, dontStrip ? true , dontStrip ? true
, unpackPhase ? "true" , unpackPhase ? "true"
, buildPhase ? "true" , buildPhase ? "true"
, meta ? {}
, ... }@args: , ... }@args:
let let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" ]; extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" "meta" ];
in in
stdenv.mkDerivation ({ stdenv.mkDerivation ({
name = "node_${name}-${version}"; name = "node_${name}-${version}";
@ -443,6 +444,11 @@ let
# Run post install hook, if provided # Run post install hook, if provided
runHook postInstall runHook postInstall
''; '';
meta = {
# default to Node.js' platforms
platforms = nodejs.meta.platforms;
} // meta;
} // extraArgs); } // extraArgs);
# Builds a development shell # Builds a development shell