diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-31 09:48:51 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-31 09:58:38 -0400 |
commit | b8152d668d16faa464d2819af6f8ed4b2637538b (patch) | |
tree | 31091c434f6f751a4cca556662d96c3f393e2fb2 | |
parent | 11956155e54a26f5e3f6aa54c7fa045c442529c2 (diff) | |
download | guix-b8152d668d16faa464d2819af6f8ed4b2637538b.tar guix-b8152d668d16faa464d2819af6f8ed4b2637538b.tar.gz |
gnu: conan: Do not hard-code package versions.
* gnu/packages/package-management.scm (conan) [arguments]: Add #:modules
argument. Avoid hard-coding package versions in configure-tests phase.
-rw-r--r-- | gnu/packages/package-management.scm | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 85f1ee0741..43b6af1d15 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -1151,6 +1151,9 @@ written entirely in Python.") (build-system python-build-system) (arguments (list + #:modules '((guix build python-build-system) + (guix build utils) + (ice-9 format)) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-paths @@ -1175,22 +1178,26 @@ written entirely in Python.") "@pytest.mark.tool(\"cmake\")")))) (add-before 'check 'configure-tests (lambda _ - (call-with-output-file "conans/test/conftest_user.py" - (lambda (port) - (format port "\ + (let* ((cmake-version #$(version-major+minor + (package-version cmake))) + (pkg-config-version #$(version-major+minor + (package-version pkg-config)))) + (call-with-output-file "conans/test/conftest_user.py" + (lambda (port) + (format port "\ tools_locations = { 'apt_get': {'disabled': True}, 'bazel': {'disabled': True}, - 'cmake': {'default': '3.25', + 'cmake': {'default': '~a', '3.15': {'disabled': True}, '3.16': {'disabled': True}, '3.17': {'disabled': True}, '3.19': {'disabled': True}, - '3.25': {}}, + '~:*~a': {}}, 'pkg_config': {'exe': 'pkg-config', - 'default': '0.29', - '0.29': {}}, - 'svn': {'disabled': True}}~%"))))) + 'default': '~a', + '~:*~a': {}}, + 'svn': {'disabled': True}}~%" cmake-version pkg-config-version)))))) (add-before 'check 'set-home (lambda _ (setenv "HOME" "/tmp"))) |