Skip to content

Commit e67dbba

Browse files
committed
Merge branch 'hkm/nixpkgs-update' into hkm/wasm
2 parents 8a33fbc + 62938f1 commit e67dbba

File tree

6 files changed

+40
-23
lines changed

6 files changed

+40
-23
lines changed

builder/ghc-for-component-wrapper.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ let
3737
${lndir}/bin/lndir -silent $unwrappedGhc $wrappedGhc
3838
rm -rf ${libDir}/*/
3939
''
40-
# ... but retain the lib/ghc/bin directory. This contains `unlit' and friends.
40+
# ... but retain the lib/ghc/bin directory. This may contain `unlit' and friends.
4141
+ ''
4242
if [ -d $unwrappedGhc/lib/${ghcCommand}-${ghc.version}/bin ]; then
4343
ln -s $unwrappedGhc/lib/${ghcCommand}-${ghc.version}/bin ${libDir}
44-
else
44+
elif [ -d $unwrappedGhc/lib/bin ]; then
4545
ln -s $unwrappedGhc/lib/bin ${libDir}
4646
fi
4747
''

flake.lock

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/check.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ in stdenv.mkDerivation ((
3939

4040
nativeBuildInputs = drv.nativeBuildInputs
4141
++ [buildPackages.xorg.lndir]
42-
++ lib.optional (stdenv.hostPlatform.isGhcjs) buildPackages.nodejs-18_x;
42+
++ lib.optional (stdenv.hostPlatform.isGhcjs) buildPackages.nodejs;
4343

4444
inherit (component) doCheck doCrossCheck;
4545

modules/install-plan/redirect.nix

+6-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let
1818
else existing.${(builtins.head available).id}.components.${collectionName}.${name};
1919
componentsWithPrefix = collectionName: prefix:
2020
lib.listToAttrs (lib.concatLists (lib.mapAttrsToList (n: available:
21-
lib.optional (lib.hasPrefix "${prefix}:" n && (builtins.length available != 1 || !builtins.elem (builtins.head available) ["TargetNotBuildable" "TargetNotLocal"])) (
21+
lib.optional (lib.hasPrefix "${prefix}:" n && (builtins.length available != 1 || !builtins.elem (builtins.head available) ["TargetNotLocal"])) (
2222
let
2323
name = lib.removePrefix "${prefix}:" n;
2424
value = lookupComponent collectionName name available;
@@ -45,6 +45,9 @@ let
4545
(_: d: pkgs.haskell-nix.haskellLib.check d)
4646
(lib.filterAttrs (_: d: d.config.doCheck) components.tests)));
4747
};
48+
buildableTargets = lib.filter (x: x.available != []) (
49+
lib.map (x: x // { available = lib.filter (n: n != "TargetNotBuildable") x.available; })
50+
config.plan-json.targets);
4851
in {
4952
options.hsPkgs = lib.mkOption {
5053
type = lib.types.unspecified;
@@ -63,10 +66,10 @@ in {
6366
components = err;
6467
checks = err;
6568
}
66-
else redirect existing packageName packageTargets) (builtins.groupBy (x: x.pkg-name) config.plan-json.targets)) config.preExistingPkgs
69+
else redirect existing packageName packageTargets) (builtins.groupBy (x: x.pkg-name) buildableTargets)) config.preExistingPkgs
6770

6871
# Redirect for `${name}-${version}`
6972
// builtins.mapAttrs (packageNameAndVersion: packageTargets: redirect existing packageNameAndVersion packageTargets)
70-
(builtins.groupBy (x: "${x.pkg-name}-${x.pkg-version}") config.plan-json.targets);
73+
(builtins.groupBy (x: "${x.pkg-name}-${x.pkg-version}") buildableTargets);
7174
};
7275
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
2+
index 85eb2976807..36d92b32d1c 100644
3+
--- a/dlls/ntdll/loader.c
4+
+++ b/dlls/ntdll/loader.c
5+
@@ -4620,7 +4620,7 @@ NTSTATUS WINAPI LdrAddDllDirectory( const UNICODE_STRING *dir, void **cookie )
6+
struct dll_dir_entry *ptr;
7+
DOS_PATHNAME_TYPE type = RtlDetermineDosPathNameType_U( dir->Buffer );
8+
9+
- if (type != ABSOLUTE_PATH && type != ABSOLUTE_DRIVE_PATH && type != UNC_PATH)
10+
+ if (type != ABSOLUTE_PATH && type != ABSOLUTE_DRIVE_PATH && type != UNC_PATH && type != DEVICE_PATH)
11+
return STATUS_INVALID_PARAMETER;
12+
13+
status = RtlDosPathNameToNtPathName_U_WithStatus( dir->Buffer, &nt_name, NULL, NULL );

overlays/wine.nix

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# fix wine at 5.4; later versions build with ucrt and this can break TH code (for instance accessing
2-
# files from TH code) for GHC built with msvcrt (ghc<9.6).
3-
# This will inevitably replace *any* wine version. Thus this might not really be what we ultimately want.
4-
# Wine 5.4 does not build on macOS so that is not pinned and TH code will probably break.
51
_final: prev: {
62
winePackages = prev.winePackages // {
73
minimal = prev.winePackages.minimal.overrideAttrs (oldAttrs: {
8-
patches = oldAttrs.patches or [] ++ [ ./patches/wine-add-dll-directory.patch ];
4+
# Fix issue with UNC device file paths
5+
patches = oldAttrs.patches or []
6+
++ [(if builtins.compareVersions prev.winePackages.minimal.version "10.0" < 0
7+
then ./patches/wine-add-dll-directory.patch
8+
else ./patches/wine-add-dll-directory-10.patch)];
9+
# Avoid dependency on X11
910
configureFlags = oldAttrs.configureFlags or [] ++ [ "--without-x" ];
1011
});
1112
};

0 commit comments

Comments
 (0)