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
coq: also install ocaml and findlib #101058
Conversation
Does this change the closure size? |
propagatedBuildInputs = [ ocamlPackages.ocaml ocamlPackages.findlib ] | ||
++ stdenv.lib.optional (versionAtLeast "8.12") ocamlPackages.num; | ||
|
||
propagatedUserEnvPkgs = [ ocamlPackages.ocaml ocamlPackages.findlib ]; |
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.
Where is this attribute documented? What’s the relation to propagatedBuildInputs
? Why is its value different?
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.
I didn't know about this attribute, it is a suggestion from @dtzWill in #34657. I also needed to extend propagatedBuildInput
to resolve the issue inside a nix-shell -p coq
and not just when people install Coq. I don't know if there will be limitations due to num
not being installed but it is well known that Nix-installed libraries do not work outside a nix-shell
anyway, so there is really no reason to include num
in propagatedUserEnvPkgs
.
Closure-size after:
Before:
|
@GrahamcOfBorg build framac satallax |
As this is a fix, should it be ported to 20.09? (I can do it). |
It is a fix, yes, but it introduces a slight incompatibility, so I would say no. (It is easy to workaround the problem anyway.) |
OK, thanks! |
This allows native_compute to work and is the same fix that was applied to the nixpkgs repo in NixOS/nixpkgs#101058.
I would like to revert this. Use case: develop a program in OCaml with some modules extracted from a Coq development. You cannot have in the same (nix) environment the tools to develop both Coq & OCaml parts due to conflicting versions of OCaml: the one propagated from Coq (that you don’t want to change because of the binary cache) and the one for your local development (that you want to change, e.g., to test compatibility with different versions, to enable flamdba or other goodies). |
Motivation for this change
Fix #34657.
native_compute
does not work without OCaml and findlib being installed in the user environment.By installing more packages, this may create installation conflicts, but I argued (in #34657) that these conflicts are fine because if a user has an incompatible OCaml version in scope, they may face even more surprising issues when trying to use
native_compute
or to build a plugin.Things done
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)