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

Generated stack2nix output file doesn't contain tree-diff #131

Open
nh2 opened this issue Sep 13, 2018 · 3 comments
Open

Generated stack2nix output file doesn't contain tree-diff #131

nh2 opened this issue Sep 13, 2018 · 3 comments

Comments

@nh2
Copy link
Member

nh2 commented Sep 13, 2018

When running stack2nix 0.2 on a project using resolver: lts-9.1 (succeeds) and then trying to build the output package:

error: anonymous function at /nix/store/c79p3krp7li3rnc6mfjaar0n82kkxf3k-cabal2nix-Cabal/default.nix:1:1 called without required argument 'tree-diff', at /nix/store/5nj7vgd7spdcvxs47gpv58nqjs76vsla-source/pkgs/development/haskell-modules/make-package-set.nix:88:27
% cat /nix/store/c79p3krp7li3rnc6mfjaar0n82kkxf3k-cabal2nix-Cabal/default.nix
{ mkDerivation, array, base, base-compat, base-orphans, binary
, bytestring, containers, deepseq, Diff, directory, filepath
, integer-logarithms, mtl, optparse-applicative, parsec, pretty
, process, QuickCheck, stdenv, tagged, tar, tasty, tasty-golden
, tasty-hunit, tasty-quickcheck, text, time, transformers
, tree-diff, unix
}:
mkDerivation {
  pname = "Cabal";
  version = "2.2.0.1";
  src = /nix/store/z64nmjm5rlgdjk44qchkmia6mjhim8in-cabal-dedupe-src;
  setupHaskellDepends = [ mtl parsec ];
  libraryHaskellDepends = [
    array base binary bytestring containers deepseq directory filepath
    mtl parsec pretty process text time transformers unix
  ];
  testHaskellDepends = [
    array base base-compat base-orphans bytestring containers deepseq
    Diff directory filepath integer-logarithms optparse-applicative
    pretty process QuickCheck tagged tar tasty tasty-golden tasty-hunit
    tasty-quickcheck text tree-diff
  ];
  doCheck = false;
  homepage = "http://www.haskell.org/cabal/";
  description = "A framework for packaging Haskell software";
  license = stdenv.lib.licenses.bsd3;
}

In this case, Cabal's test suite depends on tree-diff but the generated stack2nix haskellPackages output file doesn't contain tree-diff.

@nh2
Copy link
Member Author

nh2 commented Sep 13, 2018

And that's especially silly because doCheck = false; so it doesn't need the dep in the first place.

@nh2
Copy link
Member Author

nh2 commented Sep 13, 2018

Looks like I can work around it by adding tree-diff = null to the generated stack2nix output file.

@domenkozar
Copy link
Contributor

I think this can only be solved with #111 - so that we use stack information to render packages.

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

2 participants