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

How do I bump my hackage snapshot while using flakes? #1986

Open
qwbarch opened this issue Jun 25, 2023 · 3 comments
Open

How do I bump my hackage snapshot while using flakes? #1986

qwbarch opened this issue Jun 25, 2023 · 3 comments
Labels

Comments

@qwbarch
Copy link

qwbarch commented Jun 25, 2023

Following these instructions, I've added/changed the following:

  inputs.hackageSrc = {
    url = "github:input-output-hk/hackage.nix";
    flake = false;
  };
  inputs.haskellSrc.url = "github:input-output-hk/haskell.nix";

And within the outputs, I have this defined somewhere:

      haskellNix = import haskellSrc {
        sourcesOverride = hackageSrc;
      };

This is on a default flake, created via nix flake init --template templates#haskell-nix --impure.

This results in the following error when running nix develop:

error: attribute 'currentSystem' missing

       at /nix/store/zhr7hs6bf3jy37nqxykl1wba9nssy40h-source/pkgs/top-level/impure.nix:17:43:

           16|   # (build, in GNU Autotools parlance) platform.
           17|   localSystem ? { system = args.system or builtins.currentSystem; }
             |                                           ^
           18|

I realized builtins.currentSystem doesn't work without --impure, but isn't that against the flakes philoosphy?
Also why is it even requiring me to run nix develop --impure in this case?

At the end, this allows nix develop to successfully resolve, but it's still using the snapshot provided by haskell.nix itself.

What is the proper way of bumping my hackage snapshot when using flakes? If needed, I can provide a reproducible example with an older haskell.nix pin to make it easier to see the issue I'm having

@stale
Copy link

stale bot commented Oct 23, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 23, 2023
@enobayram
Copy link

@qwbarch We do this often in our repositories using the native input override feature of flakes. You can see an example here:

    hackage = {
      url = "github:input-output-hk/hackage.nix";
      flake = false;
    };
    haskellNix = {
      url = "github:input-output-hk/haskell.nix";
      inputs.hackage.follows = "hackage";
    };

@stale stale bot removed the wontfix label Dec 12, 2023
Copy link

stale bot commented Apr 10, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants