Merge pull request #110437 from marsam/node-platforms

buildNodePackage: by default use Node.js' platforms
This commit is contained in:
Mario Rodas 2021-01-22 06:49:13 -05:00 committed by GitHub
commit 2f74de9c8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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