haskell.nix/default.nix
Michael Peyton Jones 701c83fb43
Update nixpkgs pins to include 20.03 (#557)
* Update nixpkgs pins to include 20.03, wobble

- Add 20.03
- Remove 19.03 (and old 18.09 file)
- Update 19.09 to latest
- Update github pin to 20.03
- Remove workarounds for 19.03

* Mark openssl as allowedInsecure

* Force python3 for mkdocs
2020-04-29 02:49:36 +12:00

25 lines
887 B
Nix

let haskellNix = rec {
sources = {
inherit (import ./nixpkgs/default.nix) nixpkgs-1909 nixpkgs-2003 nixpkgs-default;
};
config = import ./config.nix;
overlays = import ./overlays;
nixpkgsArgs = { inherit overlays config; };
};
haskellNixV1 = haskellNix.nixpkgsArgs;
haskellNixV2 = haskellNix;
v1DeprecationMessage = "Version 1 is deprecated: use version 2 (nixpkgs arguments are available as the `nixpkgsArgs` attribute of version 2)";
# If no arguments, then you get V1
# I'd like to make importing directly issue a warning, but I couldn't figure out a way to make it happen
in haskellNixV1 // {
__functor = _: { version ? 2 }:
if version == 1
then builtins.trace v1DeprecationMessage haskellNixV1
else if version == 2
then haskellNixV2
else builtins.throw ("haskell.nix: unknown version: " + (builtins.toString version));
}