Skip to content

Switch from mkYarnPackage to yarn{Config,Build}Hook. #324246

@doronbehar

Description

@doronbehar

After #318015 will be Now that #318015 is merged, we should start deprecate the usage of mkYarnPackage, because it is too complex, and hard to maintain. It also requires to vendor into Nixpkgs a package.json file for each such package (to avoid IFD, see #296856 ).

I'm opening this issue before #318015 is ready / merged to refer to this issue in a small documentation I will perform there.

The following list was generated with:

env NIXPKGS_ALLOW_INSECURE=1 nix eval --json -L --impure --expr '
  let
    pkgs = (builtins.getFlake "github:nixos/nixpkgs").legacyPackages.${builtins.currentSystem}; 
  in builtins.map (pPath: let
      p = builtins.baseNameOf (builtins.dirOf pPath);
    in if builtins.hasAttr p pkgs then
      if builtins.hasAttr "maintainers" pkgs.${p}.meta then 
        "- [ ] `${p}`: ${builtins.concatStringsSep " " (builtins.map (m: "@${m.github}") pkgs.${p}.meta.maintainers)}"
      else 
        "- [ ] `${p}`: no maintainers found"
    else
      "- [ ] `${p}`: did not found attribute automatically, file is `${pPath}`"
  ) [
    '"$(git grep -l mkYarnPackage pkgs | while read p; do echo \"$p\"; done)"'
  ]' | jq --raw-output '.[]'

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.skill: sprintableA larger issue which is split into distinct actionable tasks5.scope: trackingLong-lived issue tracking long-term fixes or multiple sub-problems6.topic: nodejsNode.js is a free, open-source, cross-platform JavaScript runtime environment
    No fields configured for issues without a type.

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions