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

OCaml build support: add oasis build system #65715

Merged
merged 6 commits into from Aug 7, 2019

Conversation

mgttlinger
Copy link
Member

Motivation for this change

Some OCaml packages are built using oasis leading to a lot of repetition in the derivation code.

(I will create PRs for pgsolver and its dependencies once this change is merged)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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.

@vbgl
Copy link
Contributor

vbgl commented Aug 3, 2019

May you please show a use-case for this buildOasisPackage function? Either as a separate commit in this PR or in a different (draft) PR based on this one.

build for tcslib as contribution as well as usage example for the new buildOasisPackage
@mgttlinger
Copy link
Member Author

@vbgl as you can see in the commit this build helper effectively simplifies writing derivations for packages using oasis to specifying the source and dependencies without having to touch the build itself if the package doesn't do anything non standard.

pkgs/build-support/ocaml/oasis.nix Outdated Show resolved Hide resolved
pkgs/build-support/ocaml/oasis.nix Outdated Show resolved Hide resolved
pkgs/development/ocaml-modules/tcslib/default.nix Outdated Show resolved Hide resolved
pkgs/development/ocaml-modules/tcslib/default.nix Outdated Show resolved Hide resolved
pkgs/development/ocaml-modules/tcslib/default.nix Outdated Show resolved Hide resolved
@mgttlinger
Copy link
Member Author

@vbgl Thank you for all the improvements and sorry that it takes so many iterations to get things right.

@vbgl
Copy link
Contributor

vbgl commented Aug 7, 2019

@GrahamcOfBorg build ocamlPackages.tcslib

@vbgl vbgl merged commit b1d3735 into NixOS:master Aug 7, 2019
@vbgl
Copy link
Contributor

vbgl commented Aug 7, 2019

Many thanks for your contribution. Good luck for pgsolver!

@mgttlinger mgttlinger deleted the build-oasis-package branch August 7, 2019 10:18
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