Skip to content

Commit a515895

Browse files
committed
Expose native-modules.zip for Windows development & debugging
1 parent 247787d commit a515895

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

flake.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
targetSystem: inputs.self.internal.${targetSystem}.unsignedInstaller
3939
);
4040
devshell = lib.genAttrs supportedSystems (system: inputs.self.devShells.${system}.default);
41+
# Exposing these DLLs for easier development/debugging on Windows:
42+
nativeModules.x86_64-windows = inputs.self.internal.x86_64-windows.nativeModulesZip;
4143
required = inputs.nixpkgs.legacyPackages.x86_64-linux.releaseTools.aggregate {
4244
name = "github-required";
4345
meta.description = "All jobs required to pass CI";

nix/internal/x86_64-windows.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,21 @@ in rec {
403403
'';
404404
};
405405

406+
nativeModulesZip = pkgs.runCommand "win64-native-modules" {
407+
buildInputs = with pkgs; [ zip ];
408+
} ''
409+
mkdir -p $out
410+
411+
(
412+
cd ${nativeModules}
413+
zip -ry $out/native-modules-${sourceLib.buildRevShort}-${targetSystem}.zip .
414+
)
415+
416+
# Make it downloadable from Hydra:
417+
mkdir -p $out/nix-support
418+
echo "file binary-dist \"$(echo $out/*.zip)\"" >$out/nix-support/hydra-build-products
419+
'';
420+
406421
native = rec {
407422
nodejs = pkgs.fetchzip {
408423
url = "https://nodejs.org/dist/v${common.nodejs.version}/node-v${common.nodejs.version}-win-x64.zip";

0 commit comments

Comments
 (0)