Skip to content

Conversation

@Abdillah
Copy link
Contributor

Upon overriding phpactor with custom php such as below,

  phpactor = pkgs.callPackage "${pkgs.path}/pkgs/by-name/ph/phpactor/package.nix" {
    php = pkgs.php83.withExtensions ({ all, enabled }: enabled ++ with all; [ simplexml ]);
  };

The resulting phpactor binary doesn't use the passed php with customized extension.
Moreover, phpactor support running psalm and php-cs-fixer which needs some PHP extensions enabled. Consequently, with current derivation, neither psalm nor php-cs-fixer can be activated.

This change allow customized php to be used as the runtime for phpactor.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jul 23, 2025
@Abdillah Abdillah force-pushed the feat/phpactor-custom-php branch from 0d28b14 to eae129c Compare July 23, 2025 07:50
@nixpkgs-ci nixpkgs-ci bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 23, 2025
phpRuntime ? php.withExtensions (
{ all, ... }:
with all;
[
Copy link
Contributor Author

@Abdillah Abdillah Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my POV, it is more user friendly to append the extensions instead of hard-specify them:

{ all, enabled, ... }:
with all;
enabled ++ [
# ...

If the above actually works (the passed PHP's extensions getting appended with hard-coded extensions), we may not need another phpRuntime parameter. Then just use php all together.

What do you all think?

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/5697

@nixpkgs-ci nixpkgs-ci bot added 2.status: merge conflict This PR has merge conflicts with the target branch and removed 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Jul 23, 2025
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jul 28, 2025
@Abdillah
Copy link
Contributor Author

Abdillah commented Jul 28, 2025

@drupol has fixed on 82d0cc6 by removing the php = ...; derivation parameter.

@Abdillah Abdillah closed this Jul 28, 2025
@Abdillah Abdillah changed the title phpactor: add custom php package for runtime phpactor: use supplied php package for runtime (do not rebuild with extension) Jul 28, 2025
@Abdillah Abdillah changed the title phpactor: use supplied php package for runtime (do not rebuild with extension) phpactor: use supplied php package for runtime (add enabled extension) Jul 28, 2025
@Abdillah Abdillah changed the title phpactor: use supplied php package for runtime (add enabled extension) phpactor: use supplied php package for runtime basis (add enabled extension) Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants