Unverified Commit ea32606e authored by Maximilian Bosch's avatar Maximilian Bosch Committed by GitHub
Browse files

treewide: fix composer hashes that were broken by composer update (#452933)

parents 218821d5 48bc243a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -214,6 +214,12 @@ code, while others choose not to.

In Nix, there are multiple approaches to building a Composer-based project.

::: {.warning}
`buildComposerProject2` has a [known bug](https://github.com/NixOS/nixpkgs/issues/451395)
where the `vendorHash` changes every time a Composer release happens that changes the
`autoload.php` or vendored composer code.
:::

One such method is the `php.buildComposerProject2` helper function, which serves
as a wrapper around `mkDerivation`.

+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ php82.buildComposerProject2 (finalAttrs: {
    runHook postInstall
  '';

  vendorHash = "sha256-tBB3Zl/N1XqPTD84at5WoGrD0G5rJbobk4E8BFOSm+M=";
  vendorHash = "sha256-cg9OIBvWX69yU6U6Ag/T3jScG2OUdpTqc+KwP6VyUHo=";
  composerStrictValidation = false;

  passthru.updateScript = nix-update-script { };
+2 −0
Original line number Diff line number Diff line
@@ -21,5 +21,7 @@ php.buildComposerProject2 (finalAttrs: {
    homepage = "https://sabre.io/baikal/";
    license = lib.licenses.gpl3Only;
    maintainers = with lib.maintainers; [ wrvsrx ];
    # vendorHash non-reproducible
    broken = true;
  };
})
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ php.buildComposerProject2 (finalAttrs: {
    hash = "sha256-UAofdc8mqSnJXhCTABSf9JZERqur86lzNDI66EHgEQE=";
  };

  vendorHash = "sha256-bNeQEfwXly3LFuEKeSK6J6pRfQF6TNwUqu3SdTswmFI=";
  vendorHash = "sha256-TlBrL4KyMVHaxqlfvnTkj3TkmU8h5/0BRC5e8yWrhCI=";

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ php.buildComposerProject2 (finalAttrs: {
    hash = "sha256-wtkixHexsJNKsLnnlHssh0IzxwWYMPKDcaf/D0zUNKk=";
  };

  vendorHash = "sha256-0uBI30n31W0eDVA9/W366O0Qo2jWZBqEL+YbJx4J7P0=";
  vendorHash = "sha256-/bf1rvoG1N6GNqisBwMqY05qhTsy7gMeWXarXgElU/M=";

  meta = {
    changelog = "https://github.com/deployphp/deployer/releases/tag/v${finalAttrs.version}";
Loading