nix-phps icon indicating copy to clipboard operation
nix-phps copied to clipboard

Question - Building php master branch from source?

Open drupol opened this issue 2 years ago • 12 comments

Hello,

Do you think it would be possible to have a php version like: php-master that would build from source the master branch of PHP ?

Thanks.

drupol avatar Jul 11 '21 07:07 drupol

That is a cool idea. I would accept PRs for that.

On Sun, 11 Jul 2021, 09:29 Pol Dellaiera, @.***> wrote:

Hello,

Do you think it would be possible to have a php version like: php-master that would build from source the master branch of PHP ?

Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fossar/nix-phps/issues/35, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFMEYYDCM7VTI33L4DW5T3TXFB6RANCNFSM5AFAWNLA .

jtojnar avatar Jul 11 '21 11:07 jtojnar

I'm ok to contribute, but I would require a bit of help on this :)

drupol avatar Sep 26 '21 19:09 drupol

I didn't see an obvious spot to grab nightlies. Where do you grab the source from? Currently in nixpkgs we grab from the php website:

https://github.com/NixOS/nixpkgs/blob/3329b3430739ed71a64c3931315367cf2c7f45e4/pkgs/development/interpreters/php/generic.nix#L274

aanderse avatar Sep 26 '21 22:09 aanderse

How about grabbing from the official git repo?

drupol avatar Sep 26 '21 22:09 drupol

See this PR for discussion. As @etu mentioned we weren't supposed to grab releases from github... but I'm not sure if that is still the case.

aanderse avatar Sep 26 '21 22:09 aanderse

I think that is for released versions, it should not be a problem to use Git snapshots for testing purposes. And it should not be that hard to make the expression support both source types – just go through the official PHP docs on building (I assume there are some; would expect it to be similar to other autofoo set ups).

jtojnar avatar Sep 26 '21 22:09 jtojnar

Since the developments where they have changed their official developments to be hosted on GitHub I think this might have changed things as well.

It would be nice to be able to easily provide development builds, so if we switched all the builds to grab from GitHub tags, we could do that easily. But then it's not the "official release tarball".

The question is how much that matters?

etu avatar Sep 27 '21 06:09 etu

What's the battle plan then ? :)

drupol avatar Oct 03 '21 10:10 drupol

Someone needs to write it, should not be that hard.

jtojnar avatar Oct 03 '21 14:10 jtojnar

If you give me some directions, I might give it a try :)

drupol avatar Oct 03 '21 14:10 drupol

It should be just duplicating the php73 code in pkgs/phps.nix. Only for base, you would have something like

  baseMaster = (prev.callPackage generic (_mkArgs {
    version = "fooo";
    sha256 = "0000000000000000000000000000000000000000000000000000000000000000";
  })).overrideAttrs (attrs: {
    src = /* … */;
  });

And if that does not work, make php builder accept a src ? null attribute, and use that when not null. (For development, you can point the flake to your local Nixpkgs checkout using nix flake update --override-input nixpkgs ~/Projects/nixpkgs, will need to run it each time you modify Nixpkgs code.)

jtojnar avatar Oct 03 '21 14:10 jtojnar

#104 is an attempt at this.

jtojnar avatar May 15 '22 20:05 jtojnar