svanderburg / composer2nix

Generate Nix expressions to build PHP composer packages
MIT License
88 stars 25 forks source link

Add support for `symfony.lock` (Symfony Flex) #36

Open soupglasses opened 1 year ago

soupglasses commented 1 year ago

Currently packages that are based on symfony/flex are not properly downloaded fully with composer2nix. As part of the dependencies are spread between symfony.lock and composer.lock.

https://github.com/symfony/flex

Here's some example output of the error as an example:

kbin-core> '/nix/store/9xygbpw3slc00dd4y0q090813jq4hfsi-willdurand-negotiation-68e9ea0553ef6e2ee8db5c1d98829f111e623ec2/tests/Negotiation/Tests/NegotiatorTest.php' -> 'willdurand/negotiation/tests/Negotiation/Tests/NegotiatorTest.php'
kbin-core> '/nix/store/9xygbpw3slc00dd4y0q090813jq4hfsi-willdurand-negotiation-68e9ea0553ef6e2ee8db5c1d98829f111e623ec2/tests/Negotiation/Tests/TestCase.php' -> 'willdurand/negotiation/tests/Negotiation/Tests/TestCase.php'
kbin-core> '/nix/store/9xygbpw3slc00dd4y0q090813jq4hfsi-willdurand-negotiation-68e9ea0553ef6e2ee8db5c1d98829f111e623ec2/tests/bootstrap.php' -> 'willdurand/negotiation/tests/bootstrap.php'
kbin-core> Generating optimized autoload files
kbin-core> Generated optimized autoload files containing 10706 classes
kbin-core> Installing dependencies from lock file
kbin-core> Verifying lock file contents can be installed on current platform.
kbin-core> The following exception probably indicates you are offline or have misconfigured DNS resolver(s)
kbin-core> In CurlDownloader.php line 365:
kbin-core>                                                                                
kbin-core>   curl error 6 while downloading https://raw.githubusercontent.com/symfony/re  
kbin-core>   cipes/flex/main/index.json: Could not resolve host: raw.githubusercontent.c  
kbin-core>   om                                                                           
kbin-core>                                                                                
kbin-core> install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
error: builder for '/nix/store/ych8av23caiia9kzxnd6vmkx4lxrcp22-kbin-core.drv' failed with exit code 1;

Have a hunch these lines may be at least what is creating this spessific error: https://github.com/symfony/flex/blob/3c9c3424efdafe33e0e3cfb5e87e50b34711fedf/src/Downloader.php#L31-L34