packageurl-python icon indicating copy to clipboard operation
packageurl-python copied to clipboard

suggestion purl2url.py: allow mirrors

Open armijnhemel opened this issue 3 years ago • 0 comments

In NixOS a special syntax is used in the package configurations that allow downloading from mirrors, which are then locally configured and can be changed or searched automatically, and allow a user to pick a mirror closest, or do some very basic failover.

An example is this package: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/graphics/barcode/default.nix

    url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";

This then tells the download script to substitute the package and use the configured mirror. It might be useful for purl2url.py to either use something similar or to return something similar to what NixOS does, so the actual fetcher can then replace it with the correct mirror.

armijnhemel avatar May 16 '22 13:05 armijnhemel