fossar / nix-phps

Repository of Nix expressions for old PHP versions
MIT License
66 stars 19 forks source link

Question - Building php master branch from source? #35

Open drupol opened 3 years ago

drupol commented 3 years ago

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.

jtojnar commented 3 years ago

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 .

drupol commented 3 years ago

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

aanderse commented 3 years ago

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

drupol commented 3 years ago

How about grabbing from the official git repo?

aanderse commented 3 years ago

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.

jtojnar commented 3 years ago

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).

etu commented 3 years ago

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?

drupol commented 3 years ago

What's the battle plan then ? :)

jtojnar commented 3 years ago

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

drupol commented 3 years ago

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

jtojnar commented 3 years ago

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 commented 2 years ago

104 is an attempt at this.