windows: use msys2 provided patch - fixes: #916 (#942)

This commit is contained in:
Michał Majcherski 2019-05-10 12:41:11 +02:00 committed by GitHub
parent 348e302370
commit f842ea9a1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 21 deletions

4
.dadew
View File

@ -4,8 +4,8 @@
"tools": [
"7zip",
"java-openjdk-8u201",
"patch-2.6.1",
"msys2-20180531",
"msys2",
"msys2-patch",
"curl-7.64.0",
"cacert",
"vcredist-14.0.23026",

View File

@ -113,7 +113,7 @@ dev_env_tool(
tool = "tar",
win_include = ["usr/bin/tar.exe"],
win_path = "usr/bin/tar.exe",
win_tool = "msys2-20180531",
win_tool = "msys2",
)
nixpkgs_package(
@ -133,7 +133,7 @@ dev_env_tool(
tool = "gzip",
win_include = ["usr/bin/gzip.exe"],
win_path = "usr/bin/gzip.exe",
win_tool = "msys2-20180531",
win_tool = "msys2",
)
nixpkgs_package(
@ -172,7 +172,7 @@ dev_env_tool(
tool = "zip",
win_include = ["usr/bin/zip.exe"],
win_path = "usr/bin/zip.exe",
win_tool = "msys2-20180531",
win_tool = "msys2",
)
load(

View File

@ -10,10 +10,10 @@
}
},
"depends": [
"msys2-20180531",
"msys2",
"vcredist-14.0.23026"
],
"env_set": {
"BAZEL_SH": "$(appdir msys2-20180531)\\current\\usr\\bin\\bash.exe"
"BAZEL_SH": "$(appdir msys2)\\current\\usr\\bin\\bash.exe"
}
}

View File

@ -0,0 +1,22 @@
{
"homepage": "http://msys2.github.io",
"version": "2.7.6-1",
"url": "http://repo.msys2.org/msys/x86_64/patch-2.7.6-1-x86_64.pkg.tar.xz#/patch.msys2",
"hash": "5c18ce8979e9019d24abd2aee7ddcdf8824e31c4c7e162a204d4dc39b3b73776",
"depends": "msys2",
"installer": {
"script": [
"$file = $(cygpath.exe $dir//patch.msys2)",
"bash.exe -lc \"pacman -U --noconfirm $file\""
]
},
"uninstaller": {
"script": "bash.exe -lc 'pacman -R --noconfirm patch'"
},
"bin": [
[
"../../msys2/current/usr/bin/patch.exe",
"patch"
]
]
}

View File

@ -11,6 +11,7 @@
],
"usr\\bin\\bash.exe",
"usr\\bin\\cat.exe",
"usr\\bin\\cygpath.exe",
"usr\\bin\\expr.exe",
"usr\\bin\\ln.exe",
"usr\\bin\\ls.exe",
@ -21,7 +22,7 @@
"env_add_path": ".",
"post_install": [
"try { bash.exe -lc 'pacman --version' } catch { }",
"bash.exe -lc 'pacman -S --noconfirm patch unzip zip mingw-w64-x86_64-gcc'",
"bash.exe -lc 'pacman -S --noconfirm unzip zip mingw-w64-x86_64-gcc'",
"try { bash.exe -lc 'pacman -S --noconfirm tar' } catch { }",
"mkdir $dir\\bin",
"cp $dir\\mingw64\\bin\\*.dll $dir\\bin"

View File

@ -1,13 +0,0 @@
{
"homepage": "http://www.mingw.org/wiki/MSYS",
"version": "2.6.1",
"url": [
"https://downloads.sourceforge.net/project/mingw/MSYS/Base/msys-core/msys-1.0.18-1/msysCORE-1.0.18-1-msys-1.0.18-bin.tar.lzma",
"https://downloads.sourceforge.net/project/mingw/MSYS/Extension/patch/patch-2.6.1-1/patch-2.6.1-1-msys-1.0.13-bin.tar.lzma"
],
"hash": [
"4e262a414f238773b311c8bb55a52e62743c06e0e55b319ca5b47e3e306464d5",
"c8b7771304fb5e9fc33d8fca9045402f2e1bca055bf0b28127f3c3e85a254f67"
],
"bin": "bin\\patch.exe"
}