poscat0x04 / hls-nix

Nix derivations for hasekll-language-server
11 stars 3 forks source link

Make haskell.nix and nixpkgs configurable #7

Open sir4ur0n opened 4 years ago

sir4ur0n commented 4 years ago

AFAIU in https://github.com/poscat0x04/hls-nix/blob/master/default.nix the source argument is configurable by the call site, however this source is specific to this project: it's a set containing haskell-nix as well as the different HLS sources (0.1 and master).

Proposal: make at least haskell.nix and Nixpkgs arguments in default.nix, e.g.:

{ source ? import ./source
, haskellNix ? import source.haskell-nix { }
, pkgs ? import haskellNix.sources.nixpkgs-2003 haskellNix.nixpkgsArgs
, tag ? "master"
, version ? "8.8.3"
}:

# Implementation doesn't change

With such arguments:

Note: I am still fresh in the Nix world, so my proposal or code may be wrong/have flaws that I'm not aware of!

poscat0x04 commented 4 years ago

It seems that using a custom nixpkgs would require the user to bootstrap a GHC so I'm a bit hesitant to change this.