From 0cc34b4b47b48e812e126dca3a421f95ad55b4b6 Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Mon, 24 Jun 2024 15:06:18 +0800 Subject: [PATCH] Add zadig to msys2 installation, that can be accessed from start menu Signed-off-by: Egor Savkin --- flake.nix | 7 +++++++ .../qt-ifw/packages/com.msys2.root/meta/installscript.js | 1 + 2 files changed, 8 insertions(+) diff --git a/flake.nix b/flake.nix index 9ca79cb..b4de705 100644 --- a/flake.nix +++ b/flake.nix @@ -535,6 +535,12 @@ sha256 = "sha256-RiXJqvmFDaItr6KgoWTekUPHue4i/LM4uBqfVx9HKpc="; }; + zadig-binary = pkgs.fetchurl { + url = "https://github.com/pbatard/libwdi/releases/download/v1.5.1/zadig-2.9.exe"; + name = "zadig"; + sha256 = "sha256-TsqpXfPaNiFIagQ674swULi6/nyQFAKHHoFiKe+CA5s="; + }; + src = ./.; buildInputs = [ pkgs.gnutar pkgs.zstd pkgs.pacman pkgs.fakeroot ]; phases = [ "installPhase" ]; @@ -549,6 +555,7 @@ fakeroot pacman -U --asdeps --noconfirm --cachedir tmp/cache --config tmp/pacman.conf --root $out ${pkgs.lib.concatStringsSep " " (map (p: "${p}") msys2-pkgs)} 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 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 2ab0388..0a2369b 100644 --- a/installer/qt-ifw/packages/com.msys2.root/meta/installscript.js +++ b/installer/qt-ifw/packages/com.msys2.root/meta/installscript.js @@ -35,6 +35,7 @@ function createShortcuts() } component.addOperation("CreateShortcut", "@TargetDir@/clang64.exe", "@StartMenuDir@/MSYS2 with ARTIQ.lnk", "iconPath=@TargetDir@/clang64.exe"); + component.addOperation("CreateShortcut", "@TargetDir@/zadig.exe", "@StartMenuDir@/Zadig Driver Installer.lnk", "iconPath=@TargetDir@/zadig.exe"); component.addOperation( "Execute", ["@TargetDir@\\usr\\bin\\bash.exe", "--login", "-c", "exit"]); -- 2.44.2