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

Fix #824 (#824) #832

Merged
merged 1 commit into from Aug 31, 2020
Merged

Fix #824 (#824) #832

merged 1 commit into from Aug 31, 2020

Conversation

ju1m
Copy link
Contributor

@ju1m ju1m commented Aug 29, 2020

This is an attempt to fix #824 by reusing self.sources in overlays/haskell.nix instead of nix/sources.nix.
I'm not sure at all if this is a correct fix, but it works for me.

@skykanin
Copy link

I am having the same issue references in #824 and tried using your PR branch as the flake input to test if this fix works for me, but I'm still getting the same error. I'm not 100% sure if I did it correctly, here is my flake if you want to take a look. The relevant code is under inputs.haskellNix.url and defaultPackage.x86_64-linux.

@ju1m
Copy link
Contributor Author

ju1m commented Aug 30, 2020

@skykanin By using import haskellNix you're bypassing the outputs of haskell.nix's flake.nix whose legacyPackages output provides the necessary localSystem:

(self.nixpkgsArgs // { localSystem = { inherit system; }; }));

My guess is that if you really need to import sources.nixpkgs-2003 yourself, you should do it as done in haskell.nix flake.nix. Something like:

      let nixpkgsArgs = haskellNix.nixpkgsArgs // { localSystem = { system = "x86_64-linux"; }; };
          nixpkgsSrc = haskellNix.sources.nixpkgs-2003;
          pkgs = import nixpkgsSrc nixpkgsArgs;
      in

But AFAICS the intended use is to just let pkgs = haskellNix.legacyPackages."x86_64-linux"; which currently uses a nixpkgs equal to nixpkgs-2003.
More generally, to see what flake outputs you can use, you can either read the flake.nix or list them with: nix flake show.

@skykanin
Copy link

Thanks for the help. Should I be using the master branch for the inputs.haskellNix.url? Because I'm now getting other errors and I'm wondering if maybe master isn't stable.

@ju1m
Copy link
Contributor Author

ju1m commented Aug 30, 2020

@skykanin The master branch with the fix in the present PR work for me AFAICS. Here I'd say that your error message is likely due to your using of src = self instead of something more usual like src = ./..

@hamishmack hamishmack merged commit a8f5fed into input-output-hk:master Aug 31, 2020
@ju1m ju1m deleted the fix-flake branch September 4, 2020 01:48
booniepepper pushed a commit to booniepepper/haskell.nix that referenced this pull request Feb 4, 2022
Co-authored-by: Julien Moutinho <julm+haskell.nix@sourcephile.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flake not working
3 participants