Skip to content

Commit 8a38317

Browse files
committed
Merge remote-tracking branch 'origin/master' into hkm/wasm
2 parents 1b9f476 + 154bc3a commit 8a38317

13 files changed

+377
-92
lines changed

.github/workflows/update-docs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Updload Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
env:
9+
GH_TOKEN: ${{ github.token }}
10+
11+
jobs:
12+
upload-docs:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Install Nix with good defaults
20+
uses: input-output-hk/install-nix-action@v20
21+
with:
22+
extra_nix_config: |
23+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
24+
substituters = https://cache.nixos.org/ https://cache.iog.io/ https://cache.zw3rk.com
25+
nix_path: nixpkgs=channel:nixos-unstable
26+
27+
- name: Update docs
28+
run: |
29+
nix-build build.nix -A maintainer-scripts.update-docs -o update-docs.sh
30+
./update-docs.sh
31+
32+
- name: Upload docs
33+
run: |
34+
git config --global user.name 'Auto Update Bot'
35+
git config --global user.email '[email protected]'
36+
git push origin gh-pages

builder/comp-builder.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,6 @@ let
594594
(''
595595
if id=$(${target-pkg-and-db} field "z-${package.identifier.name}-z-*" id --simple-output); then
596596
name=$(${target-pkg-and-db} field "z-${package.identifier.name}-z-*" name --simple-output)
597-
echo "--dependency=''${name#z-${package.identifier.name}-z-}=$id" >> $out/exactDep/configure-flags
598597
echo "package-id $id" >> $out/envDep
599598
''
600599
# Allow `package-name:sublib-name` to work in `build-depends`

builder/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ let
7979

8080
# Same as haskellPackages.shellFor in nixpkgs.
8181
shellFor = haskellLib.weakCallPackage pkgs ./shell-for.nix {
82-
inherit hsPkgs ghcForComponent makeConfigFiles hoogleLocal haskellLib pkgsBuildBuild evalPackages compiler;
82+
inherit hsPkgs ghcForComponent makeConfigFiles hoogleLocal haskellLib pkgsBuildBuild evalPackages compiler ghc;
8383
inherit (buildPackages) glibcLocales;
8484
};
8585

builder/shell-for.nix

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ lib, stdenv, mkShell, glibcLocales, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, pkgsBuildBuild, evalPackages, compiler }:
1+
{ lib, stdenv, mkShell, glibcLocales, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, pkgsBuildBuild, evalPackages, compiler, haskell-nix, ghc }:
22

33
{ # `packages` function selects packages that will be worked on in the shell itself.
44
# These packages will not be built by `shellFor`, but their
@@ -93,6 +93,11 @@ let
9393
(removeSelectedInputs (haskellLib.uniqueWithName (lib.concatMap (cfg: cfg.depends) selectedConfigs))
9494
++ additionalPackages);
9595

96+
# For non haskell dependencies (and `pre-existing` haskell packages)
97+
# we want to search all the configs.
98+
allConfigs = selectedConfigs ++
99+
builtins.map (x: (haskellLib.dependToLib x).config) additionalPackages;
100+
96101
# Add the system libraries and build tools of the selected haskell packages to the shell.
97102
# We need to remove any inputs which are selected components (see above).
98103
# `buildInputs`, `propagatedBuildInputs`, and `executableToolDepends` contain component
@@ -115,10 +120,13 @@ let
115120
# Set up a "dummy" component to use with ghcForComponent.
116121
component = {
117122
depends = packageInputs;
118-
pre-existing = lib.concatMap (x: (haskellLib.dependToLib x).config.pre-existing or []) packageInputs;
119-
libs = lib.concatMap (x: (haskellLib.dependToLib x).config.libs or []) packageInputs;
120-
pkgconfig = lib.concatMap (x: (haskellLib.dependToLib x).config.pkgconfig or []) packageInputs;
121-
frameworks = lib.concatMap (x: (haskellLib.dependToLib x).config.frameworks or []) packageInputs;
123+
pre-existing =
124+
if exactDeps
125+
then lib.unique (lib.concatMap (x: (haskellLib.dependToLib x).pre-existing or []) allConfigs)
126+
else haskell-nix.ghc-pre-existing ghc;
127+
libs = haskellLib.uniqueWithName (lib.concatMap (x: (haskellLib.dependToLib x).libs or []) allConfigs);
128+
pkgconfig = haskellLib.uniqueWithName (lib.concatMap (x: (haskellLib.dependToLib x).pkgconfig or []) allConfigs);
129+
frameworks = haskellLib.uniqueWithName (lib.concatMap (x: (haskellLib.dependToLib x).frameworks or []) allConfigs);
122130
doExactConfig = false;
123131
};
124132
configFiles = makeConfigFiles {

changelog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
This file contains a summary of changes to Haskell.nix and `nix-tools`
22
that will impact users.
33

4-
## Jan 29, 2024
4+
## Jan 29, 2025
55

66
Removed GHC <9.6 from CI.
77

8-
The latest `nixpkgs-unstable` cause problems with
8+
The latest `nixpkgs-unstable` caused problems with
99
* GHC 8.10.7
1010
* GHC 9.6.6 mingwW64 (ucrt64 works still as does mingwW64
1111
with newer GHC versions)

flake.lock

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

hix/default.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ let
8686
HIX_FLAKE="$(mktemp -d)/flake.nix"
8787
sed 's|EVAL_SYSTEM|${pkgs.stdenv.hostPlatform.system}|' < ${hixProject}/flake.nix > $HIX_FLAKE
8888
if ! cmp $HIX_FLAKE $FLAKE/flake.nix &>/dev/null; then
89-
if [ -e $FLAKE/flake.lock ]; then
90-
echo "Updating $FLAKE/flake.nix and deleting old $FLAKE/flake.lock"
89+
if [ -e $FLAKE/flake.lock ]; then
90+
>&2 echo "Updating $FLAKE/flake.nix and deleting old $FLAKE/flake.lock"
9191
rm $FLAKE/flake.lock
9292
else
93-
echo "Updating $FLAKE/flake.nix"
93+
>&2 echo "Updating $FLAKE/flake.nix"
9494
fi
9595
cp $HIX_FLAKE $FLAKE/flake.nix
9696
chmod +w $FLAKE/flake.nix

lib/call-cabal-project-to-nix.nix

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -370,57 +370,6 @@ let
370370
'';
371371
};
372372

373-
ghc-pkgs = [
374-
"Cabal"
375-
"array"
376-
"base"
377-
"binary"
378-
"bytestring"
379-
"containers"
380-
"deepseq"
381-
"directory"
382-
"filepath"
383-
"ghc-boot"
384-
"ghc-boot-th"
385-
"ghc-compact"
386-
"ghc-heap"
387-
"ghc-prim"
388-
"ghci"
389-
"integer-gmp"
390-
"mtl"
391-
"parsec"
392-
"pretty"
393-
"process"
394-
"rts"
395-
"template-haskell"
396-
"text"
397-
"time"
398-
"transformers"
399-
] ++ pkgs.lib.optionals (!pkgs.stdenv.targetPlatform.isGhcjs || builtins.compareVersions ghc.version "9.0" > 0) [
400-
# GHCJS 8.10 does not have these
401-
"Cabal-syntax"
402-
"exceptions"
403-
"file-io"
404-
"ghc"
405-
"ghc-bignum"
406-
"ghc-experimental"
407-
"ghc-internal"
408-
"ghc-platform"
409-
"ghc-toolchain"
410-
"haskeline"
411-
"hpc"
412-
"libiserv"
413-
"os-string"
414-
"semaphore-compat"
415-
"stm"
416-
"xhtml"
417-
] ++ pkgs.lib.optionals (!pkgs.stdenv.targetPlatform.isGhcjs) [
418-
"terminfo"
419-
] ++ (if pkgs.stdenv.targetPlatform.isWindows
420-
then [ "Win32" ]
421-
else [ "unix" ]
422-
);
423-
424373
dummy-ghc-pkg-dump = evalPackages.runCommand "dummy-ghc-pkg-dump" {
425374
nativeBuildInputs = [
426375
evalPackages.haskell-nix.nix-tools-unchecked.exes.cabal2json
@@ -561,7 +510,7 @@ let
561510
PKGS+=" ${name}"
562511
LAST_PKG="${name}"
563512
fi
564-
'') ghc-pkgs)
513+
'') (pkgs.haskell-nix.ghc-pre-existing ghc))
565514
}
566515
${ # There is no .cabal file for system-cxx-std-lib
567516
pkgs.lib.optionalString (builtins.compareVersions ghc.version "9.2" >= 0) (

0 commit comments

Comments
 (0)