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

v1.tar.gz not working, but version-1.1.0.tar.gz works #38

Open
Coda-Coda opened this issue Sep 10, 2020 · 4 comments
Open

v1.tar.gz not working, but version-1.1.0.tar.gz works #38

Coda-Coda opened this issue Sep 10, 2020 · 4 comments

Comments

@Coda-Coda
Copy link

Using the following in opam2nix.nix (as per the README).

import (builtins.fetchTarball "https://github.com/timbertson/opam2nix/archive/v1.tar.gz")

Fails with:

$ "$(nix-build --no-out-link ./opam2nix.nix)/bin/opam2nix" resolve --ocaml-version 4.08.1 ./archetype.opam
trace: [wrangle] Providing source self (git-local) from /nix/store/rxhd0f2vqcd2i7pp6mjg6bs7xlmw43sl-v5yn6fwxjx0xjdwvx84hdkp48mlm3173-source
trace: [wrangle] Providing source cudf (url) from /nix/store/xdlhvc9bwxlz6qncm254yc5ka0cgqkij-cudf-0.9-1.tar.gz
error: anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/development/ocaml-modules/ocamlgraph/default.nix:1:1 called with unexpected argument 'gtkSupport', at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/customisation.nix:69:16
(use '--show-trace' to show detailed location information)

But

import (builtins.fetchTarball "https://github.com/timbertson/opam2nix/archive/version-1.1.0.tar.gz")

Seems to work fine.

@joprice
Copy link
Contributor

joprice commented Sep 10, 2020

I added this flag due to a recent change in nixpkgs that requires it to disable gtk. It seems like we have to detect nixpkgs version or whether the calling function requires this flag. Unfortunately, I'm not familiar enough with nix to come up with a solution in this case.

@Coda-Coda
Copy link
Author

Thanks for the response, so would you suggest using version-1.1.0 in the meantime?

@joprice
Copy link
Contributor

joprice commented Sep 11, 2020

Yea or the commit just before it.

I assume the change that caused this should get pulled into some future stable branch of nixpkgs, and then you'd want to switch to this newer commit. I'm using it now because I'm pinned to a commit of nixpkgs newer than stable.

@timbertson
Copy link
Owner

we have to detect nixpkgs version or whether the calling function requires this flag.

You can introspect a function's accepted arguments, but it's probably just easier to wait, it'll eventually work in stable.

For convenience I've tagged the commit just prior as v1.1.1. The main difference over 1.1.0 is a nice build speedup from #32

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

No branches or pull requests

3 participants