on iko/ghcjs-patch-master help sign in
initial sdist supprot
commitbef2a7ac886a1be08590b6f531d43d1404dfb664 authorMoritz Angermann <moritz.angermann@gmail.com> dateSun 21 Jun 2020, 16:48 (6 years ago) parente364ac1
5 files changed+28−7
default.nix+1−1 nix/sources.json+15−1 nix/sources.nix+3−3 overlays/bootstrap.nix+7 overlays/haskell.nix+2−2
default.nix+1−1
@@ -4,7 +4,7 @@ let haskellNix = {
44 system ? builtins.currentSystem,
55 sourcesOverride ? {},
66 ... }@args: rec {
7− sources = (import ./nix/sources.nix) // sourcesOverride;
7+ sources = { nixpkgs-default = sources.nixpkgs; } // (import ./nix/sources.nix) // sourcesOverride;
88
99 config = import ./config.nix;
1010 overlays = [ allOverlays.combined ] ++ (
nix/sources.json+15−1
@@ -1,4 +1,18 @@
11{
2+ "ghc-8.6.5-iohk": {
3+ "branch": "release/8.6.5-iohk",
4+ "description": "IOHK's ghc fork. See release/X.Y.Z-iohk branches.",
5+ "homepage": "",
6+ "owner": "input-output-hk",
7+ "repo": "https://github.com/input-output-hk/ghc.git",
8+ "rev": "25bc4648ac80939950c527cc39c806dec7c8cd89",
9+ "ref": "release/8.6.5-iohk",
10+ "deepClone": true,
11+ "sha256": "0mm3xc9f4nw4iw08jf84br88kspbay43hxgsazwbbb5mrxvbyq5a",
12+ "type": "git",
13+ "url": "https://github.com/input-output-hk/ghc.git",
14+ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
15+ },
216 "niv": {
317 "branch": "master",
418 "description": "Easy dependency management for Nix projects",
@@ -47,7 +61,7 @@
4761 "url": "https://github.com/NixOS/nixpkgs/archive/db31e48c5c8d99dcaf4e5883a96181f6ac4ad6f6.tar.gz",
4862 "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
4963 },
50− "nixpkgs-default": {
64+ "nixpkgs": {
5165 "branch": "nixpkgs-20.03-darwin",
5266 "description": "Nix Packages collection",
5367 "homepage": null,
nix/sources.nix+3−3
@@ -18,8 +18,8 @@ let
1818 else
1919 pkgs.fetchzip { inherit (spec) url sha256; };
2020
21− fetch_git = spec:
22− builtins.fetchGit { url = spec.repo; inherit (spec) rev ref; };
21+ fetch_git = pkgs: spec:
22+ pkgs.fetchgit { url = spec.repo; inherit (spec) rev deepClone sha256; };
2323
2424 fetch_builtin-tarball = spec:
2525 builtins.trace
@@ -73,7 +73,7 @@ let
7373 abort "ERROR: niv spec ${name} does not have a 'type' attribute"
7474 else if spec.type == "file" then fetch_file pkgs spec
7575 else if spec.type == "tarball" then fetch_tarball pkgs spec
76− else if spec.type == "git" then fetch_git spec
76+ else if spec.type == "git" then fetch_git pkgs spec
7777 else if spec.type == "builtin-tarball" then fetch_builtin-tarball spec
7878 else if spec.type == "builtin-url" then fetch_builtin-url spec
7979 else
overlays/bootstrap.nix+7
@@ -43,6 +43,13 @@ let
4343 };
4444in {
4545 haskell-nix = prev.haskell-nix // {
46+ ghc-865-iohk = import ../compiler/ghc/source-dist.nix {
47+ inherit (final) stdenv;
48+ pkgs = final;
49+ inherit (final.haskell-nix.compiler.ghc865.bootPkgs) alex happy hscolour ghc;
50+ src = final.haskell-nix.sources."ghc-8.6.5-iohk";
51+ version = "8.6.5-iohk";
52+ };
4653 # Use this to disable the existing haskell infra structure for testing purposes
4754 compiler =
4855 let bootPkgs = with final.buildPackages; {
overlays/haskell.nix+2−2
@@ -30,7 +30,7 @@ final: prev: {
3030 specJSON = stackageSourceJSON;
3131 override = "stackage";
3232 };
33− } // (import ../nix/sources.nix) // sourcesOverride;
33+ } // { nixpkgs-default = sources.nixpkgs; } // (import ../nix/sources.nix) // sourcesOverride;
3434
3535 # We provide a `callPackage` function to consumers for
3636 # convenience. We will however refrain from using it
@@ -550,7 +550,7 @@ final: prev: {
550550 # selected file ends in a `.yaml` it is assumed to be for `stackProject`.
551551 # If niether `stack.yaml` nor `cabal.project` exist `cabalProject` is
552552 # used (as it will use a default `cabal.project`).
553− project' = { src, projectFileName ? null, ... }@args:
553+ project' = { src, projectFileName ? null, ... }@args:
554554 let
555555 dir = __readDir (src.origSrcSubDir or src);
556556 exists = fileName: builtins.elem (dir.${fileName} or "") ["regular" "symlink"];