Skip to content

Allow caller to specify hpack version #969

Open
@hamishmack

Description

@hamishmack

It would be nice if you the caller could specify the version of hpack used for a project. This would avoid the wrong version being used and make it easier for the correct one to be materialized or pinned.

The new args for stackProject and cabalProject would be something like:

{ ...
, hpack ? null
, hpackTool ? if hpack == null then nulll else evalPackages.haskell-nix.tool compiler-nix-name "hpack" hpack
}:
let
  ...
  nativeBuildInputs = [ nix-tools hpackTool ]; # For anything planning to run `hpack`
  ...
in {
  roots = { inherit hpackTool; ... };
}

Then we could remove the hpack exe from nix-tools and the calling code would need something like:

let
  project = haskell-nix.cabalProject {
    hpack = "latest";
  }

we could add materialization with something like:

let
  project = haskell-nix.cabalProject {
    hpack = { version = "1.2.3.4"; matialized = ./materialized/hpack; };
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions