New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced support for Gerbil, Gambit #86843
Conversation
@@ -1,34 +1,51 @@ | |||
{ stdenv, makeStaticLibraries, | |||
{ gccStdenv, lib, makeStaticLibraries, callPackage, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is callPackage
needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not anymore. I realize that makeStaticLibraries neither.
PTAL. And please comment on the questions at top of PR. |
Mostly. I doubt it makes sense to give a top-level name to
i think it doesn't matter at that size. With more packages new considerations might arise.
In principle, the first sounds like «unstable library code» and the second like «stable library code running on unstable Gerbil». Not sure which is a closer description of the situation. Is there a plan for stable-Gerbil-using library packages in the foreseeable future?
Hmmm. I have a feeling that we generally claim that installing libraries into profiles does not work and it is not expected to work, one uses nix-shell (that runs As someone who has stopped using NixOS mainline (and never used
I think updating + creating the infrastructure in one commit, then adding the utils package in the next one is the closest to what people consider best practices here. In this specific case I don't care enough to actually enforce that it should be more than one commit. |
Thanks a lot for the guidance.
In the near future, all gerbil library packages will be unstable libraries running on top of unstable gerbil. In some further future, there might be stable libraries on stable gerbil vs unstable libraries on unstable gerbil, and in a further further future, stable on unstable and unstable on stable. But that's all speculation. |
4d23898
to
0fbfc3d
Compare
Is it a good idea to |
The point of |
I understand that, but on one hand they are purely unstable and on the other hand |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
8ae78df
to
4a79b02
Compare
Refactor the build rule: - Put files in $out/gambit instead of $out. - Make the optimization setting easy to override. - Make use of gccStdenv more explicit at this level. - Support new-style runtime options for forcing UTF-8 I/O. - Override the PACKAGE_VERSION and PACKAGE_STRING with git version. - Note that the license is lgpl21, not lpgl2 (Note: also dual asl20). - Try and fail to meaningfully add missing runtimeDeps. - Build using NIX_BUILD_CORES.
- Use the new Gambit support. - Move files from $out to $out/gerbil. - Use new Gerbil configuration and installation scripts. - Move some fixups from preBuild to postPatch. - Give up on previous failed attempts at using static libraries. - Add support for compiling libraries written in Gerbil. - Build using NIX_BUILD_CORES. - Register all those things in all-packages.
Now that v0.16 was released at last, make the configurePhase and instalPhase the same again for default and unstable.
PTAL. Gerbil v0.16 was released, everything is now ready for final review and merge. |
Motivation for this change
As Gerbil releases its v0.16, I have not only tweaked and cleaned up Gerbil support in Nix, but also added support for Gerbil libraries that may depend on each other, including one seed example,
gerbil-utils
.Questions to reviewers:
gerbilPackages
be defined in their own file rather than in gerbil-support.nix ?gerbilPackages.gerbil-utils-unstable
, should it begerbilPackage_unstable.gerbil-utils
or something?GERBIL_LOADPATH
and/orNIX_GERBIL_LOADPATH
for all configured libraries, how do I do that? What about registering libraries for those in~/.nix-profile
vs/nix/var/nix/profiles
vs/run/current-system/sw
? Justexport GERBIL_LOADPATH=~/.nix-profile/gerbil/lib:/nix/var/nix/profiles/gerbil/lib:/run/current-system/sw/gerbil/lib
? Should I create an option to enable this environment variable?gerbil-utils
creation? Since thegerbil-utils
creation is linked to all the nix code changes, is it OK if I put that one with them, and otherwise put the v0.16 update in its own earlier PR?Notes:
Things done
gambit-unstable
,gerbil-unstable
. Creategerbil-utils
.$out/
to$out/gambit/
which makes the profile much cleaner$out/
to$out/gambit/
which makes the profile much cleanergerbil-support.nix
for that.-O1
by default, but make that easily overridable.sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)