Skip to content

Make compiler easier to configure #68

@jcpetruzza

Description

@jcpetruzza

The output of haskell-packages/default.nix at the moment looks something like this:

{ nixpkgs ? import <nixpkgs> {} }:

with nixpkgs;
let  ...
in callPackage (nixpkgs.path + "/pkgs/development/haskell-modules") {
  ghc = pkgs.haskell.compiler.ghc843;
  buildHaskellPackages = buildPackages.haskell.packages.ghc843;
  ...
}

It would be probably nicer if the compiler were another parameter. e.g.:

{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc843" }:

with nixpkgs;
let  ...
in callPackage (nixpkgs.path + "/pkgs/development/haskell-modules") {
  ghc = pkgs.haskell.compiler.${compiler};
  buildHaskellPackages = buildPackages.haskell.packages.${compiler};
  ...
}

That way one could more easily reuse the same expression with newer versions of nixpkgs, in particular one where only ghc844 is available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions