timbertson / opam2nix

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

Difficult to pin nixpkgs within .nix files #45

Closed Coda-Coda closed 3 years ago

Coda-Coda commented 3 years ago

I've tried to pin nixpkgs within the .nix files without success (on this fork), I think an issue is the use of:

<nixpkgs/pkgs/development/ocaml-modules/ocamlgraph/default.nix>

in nix/default.nix, line 54.

And possibly because the change made in https://github.com/timbertson/nix-wrangle/issues/3 has not been applied to default.nix.

There is a need to pin nixpkgs because of https://github.com/timbertson/opam2nix/issues/43

An adequate workaround is to do something like:

nix-shell -I nixpkgs=https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz

If I'm missing some trick please let me know :)

timbertson commented 3 years ago

Sorry I stalled on this for so long, it sounds like maybe all I need to to is run nix-wrangle default-nix? I can do that :grinning:

I don't know how to reproduce, but give 3273e6c84d5eaf1c23f88418d61a3ed954dc0018 a go, reopen if it's still not working.

One day flakes will make this all standard and then we'll all get confused by it :laughing: