Skip to content

Commit 24f98d6

Browse files
committed
Merge remote-tracking branch 'origin/master' into hkm/hls-ghc92
2 parents 8b23323 + 1662092 commit 24f98d6

File tree

6 files changed

+26
-21
lines changed

6 files changed

+26
-21
lines changed

builder/make-config-files.nix

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ let
1111

1212
flagsAndConfig = field: xs: lib.optionalString (xs != []) ''
1313
echo ${lib.concatStringsSep " " (map (x: "--${field}=${x}") xs)} >> $out/configure-flags
14-
echo "${field}: ${lib.concatStringsSep " " xs}" >> $out/cabal.config
14+
${lib.concatStrings (map (x: ''
15+
echo "${field}: ${x}" >> $out/cabal.config
16+
'') xs)}
1517
'';
1618

1719
target-pkg = "${ghc.targetPrefix}ghc-pkg";
@@ -127,8 +129,11 @@ let
127129
done
128130
129131
${ # Note: we pass `clear` first to ensure that we never consult the implicit global package db.
130-
flagsAndConfig "package-db" ["clear" "$out/${packageCfgDir}"]
132+
# However in `cabal.config` `cabal` requires `global` to be first.
133+
flagsAndConfig "package-db" ["clear"]
131134
}
135+
echo "package-db: global" >> $out/cabal.config
136+
${ flagsAndConfig "package-db" ["$out/${packageCfgDir}"] }
132137
133138
echo ${lib.concatStringsSep " " (lib.mapAttrsToList (fname: val: "--flags=${lib.optionalString (!val) "-" + fname}") flags)} >> $out/configure-flags
134139

docs/tutorials/development.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Emacs to use it. The way I do it is:
175175

176176
## Using `nix repl`
177177

178-
It's sometimes useful to load [Haskell.nix][] in the REPL to explore
178+
It's sometimes useful to load [Haskell.nix][] in the [REPL](https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-repl.html) to explore
179179
attrsets and try examples.
180180

181181
```
@@ -190,19 +190,19 @@ rec {
190190
Load the example file:
191191

192192
```
193-
$ nix repl '<nixpkgs>' example.nix
194-
Welcome to Nix version 2.3pre6631_e58a7144. Type :? for help.
193+
$ nix repl
194+
Welcome to Nix 2.10.3. Type :? for help.
195195
196-
Loading '<nixpkgs>'...
197-
Added 10403 variables.
196+
nix-repl> :l <nixpkgs>
197+
Added 16938 variables.
198198
199-
Loading 'example.nix'...
199+
nix-repl> :l example.nix
200200
Added 2 variables.
201201
202202
nix-repl> lib.take 5 pkgNames
203-
[ "ALUT" "ANum" "Allure" "Boolean" "BoundedChan" ]
203+
[ "AC-Angle" "ALUT" "ANum" "Agda" "Allure" ]
204204
205-
nix-repl>
205+
nix-repl> :q
206206
```
207207

208208
Now that you have `nix-tools` and are able to import [Haskell.nix][],

docs/tutorials/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ IMPORTANT: you *must* do this or you *will* build several copies of GHC!
1414

1515
You can configure Nix to use our binary cache, which is pushed to by CI, so should contain the artifacts that you need.
1616

17-
You need to add the following sections to `/etc/nix/nix.conf` or, if you are a trusted user, `~/.config/nix/nix.conf` (if you don't know what a "trusted user" is, you probably want to do the former).
17+
You need to add the following sections to `/etc/nix/nix.conf` or, if you are a trusted user, `~/.config/nix/nix.conf` (if you don't know what a "trusted user" is, you probably want to do the former). `[...]` denote any existing entries.
1818

1919
```
2020
trusted-public-keys = [...] hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= [...]

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/cabal-simple/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ in recurseIntoAttrs {
3030
};
3131

3232
# Used for testing externally with nix-shell (../tests.sh).
33-
test-shell = project.shellFor { tools = { cabal = "3.6.2.0"; }; withHoogle = !__elem compiler-nix-name ["ghc901" "ghc902" "ghc921" "ghc922" "ghc923" "ghc924"]; };
33+
test-shell = project.shellFor { tools = { cabal = "latest"; }; withHoogle = !__elem compiler-nix-name ["ghc901" "ghc902" "ghc921" "ghc922" "ghc923" "ghc924"]; };
3434

3535
run = stdenv.mkDerivation {
3636
name = "cabal-simple-test";

test/shell-for/default.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ let
2323
packages = ps: with ps; [ pkga pkgb ];
2424
# This adds cabal-install to the shell, which helps tests because
2525
# they use a nix-shell --pure. Normally you would BYO cabal-install.
26-
tools = { cabal = "3.2.0.0"; };
26+
tools = { cabal = "latest"; };
2727
exactDeps = true;
2828
# Avoid duplicate package issues when runghc looks for packages
2929
packageSetupDeps = false;
@@ -34,7 +34,7 @@ let
3434
packages = ps: with ps; [ pkga ];
3535
# This adds cabal-install to the shell, which helps tests because
3636
# they use a nix-shell --pure. Normally you would BYO cabal-install.
37-
tools = { cabal = "3.2.0.0"; };
37+
tools = { cabal = "latest"; };
3838
exactDeps = true;
3939
# Avoid duplicate package issues when runghc looks for packages
4040
packageSetupDeps = false;
@@ -46,7 +46,7 @@ let
4646
# packages = ps: with ps; [ pkga pkgb ];
4747
# This adds cabal-install to the shell, which helps tests because
4848
# they use a nix-shell --pure. Normally you would BYO cabal-install.
49-
tools = { cabal = "3.2.0.0"; };
49+
tools = { cabal = "latest"; };
5050
# Avoid duplicate package issues when runghc looks for packages
5151
packageSetupDeps = false;
5252
};

0 commit comments

Comments
 (0)