Skip to content

How do you use compiler variants with opam-nix? #69

Answered by balsoft
frekw asked this question in Q&A
Discussion options

You must be logged in to vote

Currently, an --impure is required due to this line: https://github.com/OCamlPro/wasocaml-opam/blob/main/packages/ocaml-variants/ocaml-variants.4.14.1%2Bwasocaml/opam#L22

It tells opam to fetch the latest version of wasocaml, which is obviously impure, and hence Nix requires you to pass --impure.

The proper fix would be to fetch the wasocaml repo yourself and get the package from there instead of using the wasocaml-opam repository, something like this:

        query = devPackagesQuery // {
          "ocaml-variants" = "4.14.1+trunk"; # This is the version in the .opam file of wasocaml repo: https://github.com/OCamlPro/wasocaml/blob/main/ocaml-variants.opam
        };
        wasocaml = pkgs.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@balsoft
Comment options

Answer selected by frekw
@zapashcanon
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants