Skip to content

Use hpack to generate cabal files when required #80

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

Closed
wants to merge 1 commit into from

Conversation

qrilka
Copy link
Contributor

@qrilka qrilka commented Mar 4, 2019

Corresponding PR in nix-tools is input-output-hk/nix-tools#40

@angerman
Copy link
Collaborator

angerman commented Mar 5, 2019

As mentioned in input-output-hk/nix-tools#40, I'd rather see this done in haskell.nix.

If we add

  inherit (config) hsPkgs;

to

new-builder = haskellLib.weakCallPackage pkgs ../builder {
inherit haskellLib;
ghc = config.ghc.package;
buildGHC = buildModules.config.ghc.package;
inherit (config) nonReinstallablePkgs;
inherit withPackage;
};

Threading it through:

{ pkgs, buildPackages, stdenv, lib, haskellLib, ghc, buildGHC, fetchurl, writeText, runCommand, pkgconfig, nonReinstallablePkgs, withPackage }:

and
comp-builder = haskellLib.weakCallPackage pkgs ./comp-builder.nix { inherit ghc haskellLib nonReinstallablePkgs withPackage; };

I would hope that adding hsPkgs in

{ stdenv, buildPackages, ghc, lib, pkgconfig, writeText, runCommand, haskellLib, nonReinstallablePkgs, withPackage }:

would then allow using it hsPkgs.buildPackages.hpack in the builder?

@ElvishJerricco
Copy link
Contributor

Agreed. nix-tools should not be making assumptions about where to get the cabal-generator from. This task should be 100% haskell.nix

@angerman angerman closed this in #82 Mar 6, 2019
@qrilka qrilka deleted the hpack-support branch March 7, 2019 07:24
andreabedini pushed a commit to andreabedini/haskell.nix that referenced this pull request Sep 14, 2022
andreabedini pushed a commit to andreabedini/haskell.nix that referenced this pull request Sep 14, 2022
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.

3 participants