milahu / nixpkgs

Nix Packages collection
MIT License
0 stars 0 forks source link

error: function 'computeWheelUrl' called with unexpected argument 'passthru' #43

Open milahu opened 2 months ago

milahu commented 2 months ago

this fails

{
  pip-whl = fetchPypi rec {
    pname = "pip";
    version = "24.0";
    hash = "sha256-ug0CGhZoZdImUkaWG+wBUv8STekQxcw58RVs4/p8adw=";
    format = "wheel";
    dist = "py3";
    python = "py3";
    platform = "any";
    # no. error: function 'computeWheelUrl' called with unexpected argument 'passthru'
    passthru = { inherit version; };
  };

  # by default, the version attribute is not exposed
  pip-whl-version = pip-whl.version;

expected: computeWheelUrl should ignore extra arguments

workaround

{
  pip-whl = let
    version = "24.0";
  in ((fetchPypi {
    pname = "pip";
    inherit version;
    hash = "sha256-ug0CGhZoZdImUkaWG+wBUv8STekQxcw58RVs4/p8adw=";
    format = "wheel";
    dist = "py3";
    python = "py3";
    platform = "any";
    # no. error: function 'computeWheelUrl' called with unexpected argument 'passthru'
    #passthru = { inherit version; };
  }) // { inherit version; });

  pip-whl-version = pip-whl.version;