mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-09 16:18:34 +01:00
prettier: make plugin bundling actually work
This commit is contained in:
parent
c9869223b8
commit
2597cbe7af
|
|
@ -98,12 +98,12 @@ let
|
|||
# Arguments
|
||||
|
||||
plugin
|
||||
: Attribute set with `.packageName` and `.outPath` defined
|
||||
: Attribute set with `.pname` and `.outPath` defined
|
||||
*/
|
||||
nodeEntryPointOf =
|
||||
plugin:
|
||||
let
|
||||
pluginDir = "${plugin.outPath}/lib/node_modules/${plugin.packageName}";
|
||||
pluginDir = "${plugin.outPath}/lib/node_modules/${plugin.pname}";
|
||||
|
||||
packageJsonAttrs = builtins.fromJSON (builtins.readFile "${pluginDir}/package.json");
|
||||
|
||||
|
|
@ -118,10 +118,10 @@ let
|
|||
pathAbsoluteFallback
|
||||
else
|
||||
lib.warn ''
|
||||
${plugin.packageName}: error context, tried finding entry point under;
|
||||
${plugin.pname}: error context, tried finding entry point under;
|
||||
pathAbsoluteNaive -> ${pathAbsoluteNaive}
|
||||
pathAbsoluteFallback -> ${pathAbsoluteFallback}
|
||||
'' throw ''${plugin.packageName}: does not provide parse-able entry point'';
|
||||
'' throw ''${plugin.pname}: does not provide parse-able entry point'';
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "prettier";
|
||||
|
|
|
|||
Loading…
Reference in a new issue