msys2: nix store doesn't like tildes

This commit is contained in:
Sebastien Bourdeauducq 2023-01-14 16:09:00 +08:00
parent 2927f2a1d0
commit 52cec3c12f
1 changed files with 4 additions and 1 deletions

View File

@ -14,11 +14,14 @@ pacman --root $MSYS2DIR --config $MSYS2DIR/etc/pacman.conf --cachedir $MSYS2DIR/
echo "{ pkgs } : [" > msys2_packages.nix echo "{ pkgs } : [" > msys2_packages.nix
while read package; do while read package; do
hash=$(nix-prefetch-url $package) basename=${package##*/}
name=${basename//\~/}
hash=$(nix-prefetch-url $package --name $name)
echo " echo "
(pkgs.fetchurl { (pkgs.fetchurl {
url = \"$package\"; url = \"$package\";
sha256 = \"$hash\"; sha256 = \"$hash\";
name = \"$name\";
})" >> msys2_packages.nix })" >> msys2_packages.nix
done < $MSYS2DIR/packages.txt done < $MSYS2DIR/packages.txt
echo "]" >> msys2_packages.nix echo "]" >> msys2_packages.nix