Merge pull request #202328 from ncfavier/yarn-meta

This commit is contained in:
Naïm Favier 2022-11-27 14:15:27 +01:00 committed by GitHub
commit 12f4dc4940
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -303,7 +303,7 @@ in rec {
workspaceDependenciesTransitive;
in stdenv.mkDerivation (builtins.removeAttrs attrs ["yarnNix" "pkgConfig" "workspaceDependencies" "packageResolutions"] // {
inherit src pname;
inherit src version pname;
name = baseName;
@ -376,11 +376,10 @@ in rec {
meta = {
inherit (nodejs.meta) platforms;
description = packageJSON.description or "";
homepage = packageJSON.homepage or "";
version = packageJSON.version or "";
license = if packageJSON ? license then getLicenseFromSpdxId packageJSON.license else "";
} // (attrs.meta or {});
} // lib.optionalAttrs (package ? description) { inherit (package) description; }
// lib.optionalAttrs (package ? homepage) { inherit (package) homepage; }
// lib.optionalAttrs (package ? license) { license = getLicenseFromSpdxId package.license; }
// (attrs.meta or {});
});
yarn2nix = mkYarnPackage {