buildsupport/php: add passthru.updateScript

PHP packages where upstream provides a lock file can be automatically updated with the standard updateScript
This commit is contained in:
Patka 2024-05-09 14:42:27 +02:00
parent 0c9055e823
commit 8cd73735dc
No known key found for this signature in database

View File

@ -1,5 +1,6 @@
{
callPackage,
nix-update-script,
stdenvNoCC,
lib,
php,
@ -89,6 +90,13 @@ let
composerStrictValidation = previousAttrs.composerStrictValidation or true;
});
# Projects providing a lockfile from upstream can be automatically updated.
passthru = previousAttrs.passthru or { } // {
updateScript =
previousAttrs.passthru.updateScript
or (if finalAttrs.composerRepository.composerLock == null then nix-update-script { } else null);
};
env = {
COMPOSER_CACHE_DIR = "/dev/null";
COMPOSER_DISABLE_NETWORK = "1";