From 88bcb7874aaaa3d4a33f7c02c99b1ee798c8d9ed Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Tue, 13 Aug 2024 16:48:23 +0800 Subject: [PATCH] Fix certs issue Signed-off-by: Egor Savkin --- flake.nix | 3 +++ .../qt-ifw/packages/com.msys2.root/meta/installscript.js | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/flake.nix b/flake.nix index e3bf448..ff4d9fc 100644 --- a/flake.nix +++ b/flake.nix @@ -521,6 +521,8 @@ buildInputs = [ pkgs.gnutar pkgs.zstd pkgs.pacman pkgs.fakeroot ]; phases = [ "installPhase" ]; + cacerts = builtins.head (builtins.filter (entry: (builtins.match "^mingw-w64-clang-x86_64-ca-certificates$" entry.name) != null) artiq-deps-pkgs); + installPhase = '' mkdir $out mkdir -p tmp/cache @@ -532,6 +534,7 @@ fakeroot pacman -U --asdeps --noconfirm --cachedir tmp/cache --config tmp/pacman.conf --root $out ${pkgs.lib.concatStringsSep " " (map (p: "${p}") artiq-deps-pkgs)} fakeroot pacman -U --noconfirm --cachedir tmp/cache --config tmp/pacman.conf --root $out ${msys2-artiq}/*.pkg.tar.zst ${msys2-artiq-comtools}/*.pkg.tar.zst ${msys2-pythonparser}/*.pkg.tar.zst ${msys2-sipyco}/*.pkg.tar.zst cp ${zadig-binary} $out/zadig.exe + cp ${cacerts} "$out/mingw-w64-clang-x86_64-ca-certificates.pkg.tar.zst" rm -rf $out/mingw64* $out/clang32* $out/clangarm64* $out/mingw32* $out/ucrt64* \ $out/var/lib/pacman/sync/mingw64* $out/var/lib/pacman/sync/clang32* $out/var/lib/pacman/sync/clangarm64* \ $out/var/lib/pacman/sync/mingw32* $out/var/lib/pacman/sync/ucrt64* \ diff --git a/installer/qt-ifw/packages/com.msys2.root/meta/installscript.js b/installer/qt-ifw/packages/com.msys2.root/meta/installscript.js index 0a2369b..2152f22 100644 --- a/installer/qt-ifw/packages/com.msys2.root/meta/installscript.js +++ b/installer/qt-ifw/packages/com.msys2.root/meta/installscript.js @@ -41,6 +41,12 @@ function createShortcuts() ["@TargetDir@\\usr\\bin\\bash.exe", "--login", "-c", "exit"]); } +function postInstall() { + component.addOperation( "Execute", + ["@TargetDir@\\usr\\bin\\bash.exe", "--login", "-c", "pacman -Udd --noconfirm /mingw-w64-clang-x86_64-ca-certificates.pkg.tar.zst && rm /mingw-w64-clang-x86_64-ca-certificates.pkg.tar.zst"]); + +} + function Component() { if (!isSupported()) { @@ -61,5 +67,6 @@ function Component() { Component.prototype.createOperations = function() { component.createOperations(); + postInstall(); createShortcuts(); }