diff options
author | Boey Maun Suang <boeyms@users.noreply.github.com> | 2023-02-18 17:04:51 +1100 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2023-02-18 14:07:28 -0600 |
commit | 4d85cedf5a312a7750aeb4fb1ce186067887edc1 (patch) | |
tree | 3245c27d893d3e3c240d10c8c95bd2c17108af42 | |
parent | f71f6c1c9462eff971d2380f5c6bc8ddbcc031d9 (diff) | |
download | nixpkgs-4d85cedf5a312a7750aeb4fb1ce186067887edc1.tar nixpkgs-4d85cedf5a312a7750aeb4fb1ce186067887edc1.tar.gz nixpkgs-4d85cedf5a312a7750aeb4fb1ce186067887edc1.tar.bz2 nixpkgs-4d85cedf5a312a7750aeb4fb1ce186067887edc1.tar.lz nixpkgs-4d85cedf5a312a7750aeb4fb1ce186067887edc1.tar.xz nixpkgs-4d85cedf5a312a7750aeb4fb1ce186067887edc1.tar.zst nixpkgs-4d85cedf5a312a7750aeb4fb1ce186067887edc1.zip |
cvc4: Fix build failure from new bash 5.2 feature
Per https://bodhi.fedoraproject.org/updates/FEDORA-2022-dc47174c36: This update fixes a failure to build with source with bash 5.2. Bash's `patsub_replacement` feature makes ampersand a special character when doing variable substitution, which was not previously the case. This update instructs bash to turn off the new behavior. We exclude the unrelated change in that Fedora update (i.e. using Python 3.11's `tomllib` instead of the PyPI `toml` package) since: - we package cvc4 with Python versions earlier than 3.11; and - since cvc4 is no longer being updated, sticking with the PyPI `toml` package causes no extra work in the future.
-rw-r--r-- | pkgs/applications/science/logic/cvc4/cvc4-bash-patsub-replacement.patch | 39 | ||||
-rw-r--r-- | pkgs/applications/science/logic/cvc4/default.nix | 4 |
2 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/applications/science/logic/cvc4/cvc4-bash-patsub-replacement.patch b/pkgs/applications/science/logic/cvc4/cvc4-bash-patsub-replacement.patch new file mode 100644 index 00000000000..a97665c2f86 --- /dev/null +++ b/pkgs/applications/science/logic/cvc4/cvc4-bash-patsub-replacement.patch @@ -0,0 +1,39 @@ +Per https://bodhi.fedoraproject.org/updates/FEDORA-2022-dc47174c36: + +This update fixes a failure to build with source with bash 5.2. Bash's +`patsub_replacement` feature makes ampersand a special character when doing +variable substitution, which was not previously the case. This update instructs +bash to turn off the new behavior. + +The patch itself is adapted from +https://src.fedoraproject.org/rpms/cvc4/blob/f7c24c6ad72a8812d244313f13032fa23d393315/f/cvc4-bash-patsub-replacement.patch. +--- a/src/expr/mkexpr 2020-06-19 10:59:27.000000000 -0600 ++++ b/src/expr/mkexpr 2022-10-11 14:28:31.120453409 -0600 +@@ -16,6 +16,7 @@ + # + + copyright=2010-2014 ++shopt -u patsub_replacement + + filename=`basename "$1" | sed 's,_template,,'` + +--- a/src/expr/mkkind 2020-06-19 10:59:27.000000000 -0600 ++++ b/src/expr/mkkind 2022-10-11 14:34:17.008996126 -0600 +@@ -15,6 +15,7 @@ + # + + copyright=2010-2014 ++shopt -u patsub_replacement + + filename=`basename "$1" | sed 's,_template,,'` + +--- a/src/expr/mkmetakind 2020-06-19 10:59:27.000000000 -0600 ++++ b/src/expr/mkmetakind 2022-10-11 14:34:32.248020036 -0600 +@@ -18,6 +18,7 @@ + # + + copyright=2010-2014 ++shopt -u patsub_replacement + + cat <<EOF + /********************* */ diff --git a/pkgs/applications/science/logic/cvc4/default.nix b/pkgs/applications/science/logic/cvc4/default.nix index 873c3ca57c0..e9f04d2044d 100644 --- a/pkgs/applications/science/logic/cvc4/default.nix +++ b/pkgs/applications/science/logic/cvc4/default.nix @@ -28,6 +28,10 @@ stdenv.mkDerivation rec { patch -p1 -i ${./minisat-fenv.patch} -d src/prop/bvminisat ''; + patches = [ + ./cvc4-bash-patsub-replacement.patch + ]; + preConfigure = '' patchShebangs ./src/ ''; |