Skip to content
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

ocamlPackages.elpi: 1.11.2 -> 1.11.4 #96463

Merged
merged 1 commit into from Aug 28, 2020
Merged

ocamlPackages.elpi: 1.11.2 -> 1.11.4 #96463

merged 1 commit into from Aug 28, 2020

Conversation

CohenCyril
Copy link
Contributor

@CohenCyril CohenCyril commented Aug 27, 2020

and fixing dependencies

Motivation for this change

Upgrading elpi and coq-elpi

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@CohenCyril
Copy link
Contributor Author

@GrahamcOfBorg build ocamlPackages.elpi coqPackages_8_11.coq-elpi coqPackages_8_12.coq-elpi coqPackages_8_11.hierarchy-builder coqPackages_8_12.hierarchy-builder


propagatedBuildInputs = [ camlp5 ppx_deriving re ];
propagatedBuildInputs = [ ncurses camlp5 ppx_deriving re ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to @gares if I understood well elpi may need tput at runtime to display outputs in some context, and ncurses was the most sensible derivation exposing it... would some other changes make more sense?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

propagatedBuildInputs is not for runtime dependencies. You may either wrap the elpi binaries to set the PATH environment variable or hardcode the path to tput in the source code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vbgl thanks! I do not know how to implement either of these solutions, can you give me some doc and/or examples?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For instance, the opam binary is wrapped: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/ocaml/opam/default.nix#L104

Coq hardcodes the path to csdp: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/science/logic/coq/default.nix#L44

A third possibility is just to leave a comment: “elpi will assume your terminal is 80 positions wide, unless tput is found in PATH”.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vbgl, thanks a lot for you advice, I took the option to hardcode the path and it works well, thank you!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You’re welcome. Thanks for your contributions.

@CohenCyril
Copy link
Contributor Author

@GrahamcOfBorg build ocamlPackages.elpi coqPackages_8_11.coq-elpi coqPackages_8_12.coq-elpi coqPackages_8_11.hierarchy-builder coqPackages_8_12.hierarchy-builder

and fixing dependencies
@vbgl
Copy link
Contributor

vbgl commented Aug 28, 2020

@GrahamcOfBorg build coqPackages_8_11.hierarchy-builder coqPackages_8_12.hierarchy-builder

@vbgl vbgl merged commit 0a29f8c into NixOS:master Aug 28, 2020
@CohenCyril CohenCyril deleted the elpi branch August 28, 2020 08:26
@CohenCyril
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants