From 52cec3c12f04fc6b0740e04fee9c967cc01ab956 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 14 Jan 2023 16:09:00 +0800 Subject: [PATCH] msys2: nix store doesn't like tildes --- nix/windows/make_msys2_packages.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nix/windows/make_msys2_packages.sh b/nix/windows/make_msys2_packages.sh index 62aa79f8b..55805e4cb 100755 --- a/nix/windows/make_msys2_packages.sh +++ b/nix/windows/make_msys2_packages.sh @@ -14,11 +14,14 @@ pacman --root $MSYS2DIR --config $MSYS2DIR/etc/pacman.conf --cachedir $MSYS2DIR/ echo "{ pkgs } : [" > msys2_packages.nix while read package; do - hash=$(nix-prefetch-url $package) + basename=${package##*/} + name=${basename//\~/} + hash=$(nix-prefetch-url $package --name $name) echo " (pkgs.fetchurl { url = \"$package\"; sha256 = \"$hash\"; + name = \"$name\"; })" >> msys2_packages.nix done < $MSYS2DIR/packages.txt echo "]" >> msys2_packages.nix