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

Failed to build with nixpkgs-unstable #10

Open
ckoparkar opened this issue Jul 24, 2020 · 0 comments
Open

Failed to build with nixpkgs-unstable #10

ckoparkar opened this issue Jul 24, 2020 · 0 comments

Comments

@ckoparkar
Copy link

I'm using the derivation from this repository in another Nix shell derivation as:

{
   pkgs ? import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-20.03.tar.gz) {}
,  ghcHeadOl ? import (fetchTarball https://github.com/mpickering/ghc-artefact-nix/archive/master.tar.gz) {}
,  ghc ? ghcHeadOl.ghcHEAD
}:

with pkgs;

stdenv.mkDerivation {
  name = "ghcenv";

  buildInputs = [ ghc cabal-install ghcid ];
}

If I point my <nixpkgs> to nixpkgs-unstable or change np = import <nixpkgs> {}; to np = import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz) {}; in ghc-artefact-nix/default.nix, the above Nix shell derivation fails with:

error: anonymous function at ghc-artefact-nix/artifact.nix:1:1
called without required argument 'llvm_39', 
at /nix/store/dyca73pcc7d9zmmdnrcf35ycjg1gl4x6-source/lib/customisation.nix:69:16

I've fixed it by applying this patch to ghc-artefact-nix/default.nix:

   np = import <nixpkgs> {};
-  ghc = self: ref: self.callPackage ./artifact.nix { } ref; 
+  ghc = self: ref: self.callPackage ./artifact.nix { inherit (np.llvm_39) llvm_39; } ref; 

I'm not making a pull request because this was a result of lot Googling and I don't fully understand what's going on here. It's working for me now but do you think ghc-artefact-nix/default.nix needs to be patched?

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

No branches or pull requests

1 participant