nodePackages: fix back compatibility
This commit is contained in:
parent
5ff19db127
commit
fffc0c793c
@ -3,6 +3,9 @@
|
||||
{
|
||||
name, src,
|
||||
|
||||
# Node package name
|
||||
pkgName ? (builtins.parseDrvName name).name,
|
||||
|
||||
# List or attribute set of dependencies
|
||||
deps ? {},
|
||||
|
||||
@ -38,9 +41,6 @@ let
|
||||
mv *node* $out
|
||||
'';
|
||||
|
||||
# Package name without version
|
||||
pkgName = (builtins.parseDrvName name).name;
|
||||
|
||||
# Convert deps to attribute set
|
||||
attrDeps = if isAttrs deps then deps else
|
||||
(listToAttrs (map (dep: nameValuePair dep.name dep) deps));
|
||||
|
@ -37,11 +37,12 @@ rec {
|
||||
pkgs.callPackage ../development/web/nodejs/build-node-package.nix {
|
||||
inherit nodejs neededNatives;
|
||||
}
|
||||
) (args // {
|
||||
) (args // (optionalAttrs (isList args.src) {
|
||||
# Backwards compatibility
|
||||
src = if isList args.src then head args.src else args.src;
|
||||
pkgName = (builtins.parseDrvName args.name).name;
|
||||
});
|
||||
src = head args.src;
|
||||
}) // (optionalAttrs (attrByPath ["passthru" "names"] null args != null) {
|
||||
pkgName = head args.passthru.names;
|
||||
}));
|
||||
|
||||
override = overrides.${args.name} or overrides.${pkg.pkgName} or {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user