From 8bc78d47f39dea2141d4d15560b5735a2c45ef14 Mon Sep 17 00:00:00 2001 From: Dylan Thinnes Date: Tue, 24 Oct 2023 12:09:17 +0100 Subject: [PATCH] Add diffutils to windows tools run-full-compat: true --- .dadew | 1 + compatibility/BUILD | 4 +-- compatibility/WORKSPACE | 11 ++++++++ dev-env/windows/manifests/diffutils-3.6.json | 28 ++++++++++++++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 dev-env/windows/manifests/diffutils-3.6.json diff --git a/.dadew b/.dadew index 5f9c2e251a14..fedfaa866c87 100644 --- a/.dadew +++ b/.dadew @@ -5,6 +5,7 @@ "bazel", "cacert", "curl", + "diffutils-3.6", "gcloud", "ojdkbuild11", "maven-3.6.1", diff --git a/compatibility/BUILD b/compatibility/BUILD index af8bac19d946..032f33b244e3 100644 --- a/compatibility/BUILD +++ b/compatibility/BUILD @@ -56,13 +56,13 @@ last_non_canton_in_ledger_api_tests = "2.7.0-snapshot.20230427.11728.0.1f3c22cf" args = [sdk_version], data = [ "@daml-sdk-{}//:daml".format(sdk_version), - "@diffutils_nix//:bin/diff", + "@diffutils_dev_env//:bin/diff" if not is_windows else "@diffutils_dev_env//:bin/diff.exe", ], deps = ["@bazel_tools//tools/bash/runfiles"], ) for sdk_version in sdk_versions if versions.is_at_least("2.7.5", sdk_version) -] if not is_windows else None +] [ [ diff --git a/compatibility/WORKSPACE b/compatibility/WORKSPACE index cc19bf35aa0e..bf1bf825c3a1 100644 --- a/compatibility/WORKSPACE +++ b/compatibility/WORKSPACE @@ -119,6 +119,17 @@ nixpkgs_package( repositories = dev_env_nix_repos, ) +dev_env_tool( + name = "diffutils_dev_env", + nix_include = ["bin/diff"], + nix_label = "@diffutils_nix", + nix_paths = ["bin/diff"], + tools = ["diff"], + win_include = ["bin/diff.exe"], + win_paths = ["bin/diff.exe"], + win_tool = "diffutils-3.6", +) + haskell_register_ghc_bindists( compiler_flags = [], version = "9.0.2", diff --git a/dev-env/windows/manifests/diffutils-3.6.json b/dev-env/windows/manifests/diffutils-3.6.json new file mode 100644 index 000000000000..6c39e235e209 --- /dev/null +++ b/dev-env/windows/manifests/diffutils-3.6.json @@ -0,0 +1,28 @@ +{ + "version": "3.6", + "description": "A package of several programs related to finding differences between files", + "homepage": "https://www.gnu.org/software/diffutils/", + "license": "GPL-3.0-or-later", + "url": [ + "https://steffen.gulpe.de/gnu-tools-for-windows/i686-w64-mingw32/cmp.exe", + "https://steffen.gulpe.de/gnu-tools-for-windows/i686-w64-mingw32/diff.exe", + "https://steffen.gulpe.de/gnu-tools-for-windows/i686-w64-mingw32/diff3.exe", + "https://steffen.gulpe.de/gnu-tools-for-windows/i686-w64-mingw32/sdiff.exe" + ], + "hash": [ + "d61bc5653d4f9a462413fdf2c19dfb464924e44db8547ec41257293f34e91513", + "39e70ccf42ba7235fa0d156f894b7fb757fcd4a9ce848f768a9fabe3d87b7196", + "d09fe558f9c9655eeee01d36221fad4ef8934b254d06812d45397c255dadfcdf", + "81648ccd7cca6f9af283dbf9da5e80965637ab2c095d0b323dc8895be01b68c1" + ], + "bin": [ + "cmp.exe", + "diff.exe", + "diff3.exe", + "sdiff.exe" + ], + "checkver": { + "url": "https://steffen.gulpe.de/gnu-tools-for-windows", + "regex": "diffutils-([\\d.]+)-winbuild" + } +}