on iko/ghcjs-patch-master help sign in
Expose `config.nix` for flakes to use (#1238)
19052d8Hamish Mackenzie
docs/tutorials/getting-started-flakes.md+1−1
@@ -62,7 +62,7 @@ Add `flake.nix`:
62 };
62 };
63 })
63 })
64 ];
64 ];
65− pkgs = import nixpkgs { inherit system overlays; };
65+ pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };
66 flake = pkgs.helloProject.flake {
66 flake = pkgs.helloProject.flake {
67 # This adds support for `nix build .#js-unknown-ghcjs-cabal:hello:exe:hello`
67 # This adds support for `nix build .#js-unknown-ghcjs-cabal:hello:exe:hello`
68 crossPlatforms = p: [p.ghcjs];
68 crossPlatforms = p: [p.ghcjs];
docs/tutorials/getting-started-hix.md+1−1
@@ -188,7 +188,7 @@ Example `flake.nix` file:
188 };
188 };
189 })
189 })
190 ];
190 ];
191− pkgs = import nixpkgs { inherit system overlays; };
191+ pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };
192 flake = pkgs.helloProject.flake {
192 flake = pkgs.helloProject.flake {
193 # This adds support for `nix build .#js-unknown-ghcjs:hello:exe:hello`
193 # This adds support for `nix build .#js-unknown-ghcjs:hello:exe:hello`
194 crossPlatforms = p: [p.ghcjs];
194 crossPlatforms = p: [p.ghcjs];
flake.nix+2−1
@@ -55,11 +55,12 @@
55
55
56 outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, ... }@inputs:
56 outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, ... }@inputs:
57 let compiler = "ghc884";
57 let compiler = "ghc884";
58+ config = import ./config.nix;
58 in {
59 in {
60+ inherit config;
59 overlay = self.overlays.combined;
61 overlay = self.overlays.combined;
60 overlays = import ./overlays { sources = inputs; };
62 overlays = import ./overlays { sources = inputs; };
61 internal = rec {
63 internal = rec {
62− config = import ./config.nix;
63 nixpkgsArgs = {
64 nixpkgsArgs = {
64 inherit config;
65 inherit config;
65 overlays = [ self.overlay ];
66 overlays = [ self.overlay ];