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

haskellPackages.callCabal2nix: provide fallback name #22427

Merged
merged 1 commit into from Feb 5, 2017

Conversation

3noch
Copy link
Contributor

@3noch 3noch commented Feb 4, 2017

@peti I realized just after my last patch that callCabal2nix did not accept paths (e.g. callCabal2nix ./. {} is an error). This is too limiting. Sorry I didn't catch it earlier.

Do you have any other recommendations while I'm revisiting this?

@mention-bot
Copy link

@3noch, thanks for your PR! By analyzing the history of the files in this pull request, we identified @peti, @oxij and @aske to be potential reviewers.

@k0001
Copy link
Contributor

k0001 commented Feb 5, 2017

I just came across this issue myself. I agree with @3noch's proposed patch here.

@peti peti merged commit 956c1fe into NixOS:master Feb 5, 2017
@k0001
Copy link
Contributor

k0001 commented Feb 5, 2017

Hmm.. this doesn't quite work for me. When src a /nix/store/ path (like when calling callCabal2nix on "pkgs.fetchFromGitHub {...} + "/tools", then this fails with an error like:

while evaluating the derivation attribute ‘name’ at /home/k/q/nixpkgs.git/pkgs/development/haskell-modules/default.nix:64:13:
the string ‘cabal2nix-tools’ is not allowed to refer to a store path (such as ‘!out!/nix/store/8ddkgk5wfxycarz4aqliyn2glrhmmnjd-gtk2hs-eee61d84edf1dd44f8d380d7d7cae2405de50124-src.drv’), at /nix/store/jj3kq2dmllvkqwwbhnmzbk9hfgncdbvl-nix-1.11.6/share/nix/corepkgs/derivation.nix:8:12

@k0001
Copy link
Contributor

k0001 commented Feb 5, 2017

You can reproduce the error with this:

let
pkgs = import <nixpkgs> {};
src = pkgs.fetchFromGitHub {
  owner = "gtk2hs";
  repo = "gtk2hs";
  rev = "eee61d84edf1dd44f8d380d7d7cae2405de50124";
  sha256 = "12i53grimni0dyjqjydl120z5amcn668w4pfhl8dxscjh4a0l5nb";
};
in pkgs.haskellPackages.callCabal2nix "${src}/tools" {}

@peti
Copy link
Member

peti commented Feb 5, 2017

How do you folks like #22469? That is gonna work for sure.

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.

None yet

4 participants