timbertson / opam2nix

Generate nix expressions from opam packages
MIT License
93 stars 28 forks source link

syntax error in opam-selection.nix #51

Closed joprice closed 3 years ago

joprice commented 3 years ago

When resolving dependencies, I'm seeing an extra right bracket ] inserted after the first let in the opam-selection.nix file, causing a syntax error:

  ### This file is generated by opam2nix.

  self:
  let
    lib = self.lib;
    pkgs = self.pkgs;
    repoPath = self.repoPath;
    repos =
    {
      opam-repository =
      rec {
        fetch =
        {
          owner = "ocaml";
          repo = "opam-repository";
          rev = "a6637a7fd4f79a46cd97bd77dfa3b37d358ecc72";
          sha256 = "1iard8qng5pffmbdvncp99n41j8r48dfd9adaz4ic6hv895vn25h";
        };
        src = (pkgs.fetchFromGitHub) fetch;
      };
    };
>>  selection = self.selection;]
    in
timbertson commented 3 years ago

I can't reproduce examples/simple in this repo, or see any obvious reason for this. Can you give some more reproduction details?

joprice commented 3 years ago

Nevermind, I was on an old version. It works with master. Thanks for looking into it!