loophp / nix-shell

Nix shells for PHP development
MIT License
151 stars 9 forks source link

PHP 5.6 seems broken when used in a flake #224

Closed buurro closed 6 months ago

buurro commented 7 months ago

I made an example flake: buurro/nix-php-example

Steps required to reproduce the problem

  1. nix build github:buurro/nix-php-example/2845332e938b1df94eb4e823b5b10a8399e2b55b#packages.x86_64-linux.php56

Expected Result

Actual Result

error: builder for '/nix/store/9ydf6ry2pnigbwws01fqpiazs33cg0y5-php-5.6.40.drv' failed with exit code 2;
       last 10 log lines:
       > checking for gawk... gawk
       > checking for bison... bison -y
       > checking for bison version... 3.8 (ok)
       > checking for re2c... re2c
       > checking for re2c version... 3.1 (ok)
       > checking whether to enable computed goto gcc extension with re2c... no
       > checking whether to force non-PIC code in shared modules... no
       > checking whether /dev/urandom exists... yes
       > ./configure: line 6851: syntax error near unexpected token `fi'
       > ./configure: line 6851: `fi'
       For full logs, run 'nix log /nix/store/9ydf6ry2pnigbwws01fqpiazs33cg0y5-php-5.6.40.drv'.
error: 1 dependencies of derivation '/nix/store/nb73ngk59ari4azcw6c4v5q1n43ilckk-php-with-extensions-5.6.40.drv' failed to build

Running nix build github:loophp/nix-shell#php56 works, so I don't understand where is the issue.

drupol commented 7 months ago

That issue was fixed already, did you update to the latest flake version?

buurro commented 7 months ago

I did. The package doesn't build when used as a nixpkgs overlay.

drupol commented 6 months ago

Running nix build github:loophp/nix-shell#php56 -L works well, so I guess it's because of an outdated flake.lock ?

buurro commented 6 months ago

I just tried recreating the lock file, so I don't think that's it.

Basically using pkgs.php56 returns the error mentioned above, while <nix-shell input name>.packages.${system}.php56 does work, so I'll just start using it 👍

drupol commented 6 months ago

I don't get how such a thing could be possible, but I'm glad you found out a solution.

Should we close the issue?

buurro commented 6 months ago

I think it's because the nixpkgs I'm using are more recent than the ones locked in this repo.

Sure, you can close it.

Thanks