diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2025-07-25 12:30:17 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2025-08-01 11:47:41 +0900 |
| commit | 4741115db413a7bbf74139b3e627bc968aeef794 (patch) | |
| tree | 3f1855f086276d8c02b87fb7ee748c7849745692 /gnu/packages/compression.scm | |
| parent | 7f20f528eef19118444aa9c985715efedb92d712 (diff) | |
gnu: minizip-ng: Sanitize CMake config file.
* gnu/packages/compression.scm (minizip-ng)
[#:phases]: New argument.
Change-Id: Ibc4c0999ba9fe04a5357c5928e91a542d4e57e9a
Diffstat (limited to 'gnu/packages/compression.scm')
| -rw-r--r-- | gnu/packages/compression.scm | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 442ebe41cd0..5d129e223ad 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm | |||
| @@ -874,10 +874,31 @@ with the sfArk algorithm.") | |||
| 874 | "1y6yvswzl1gzrv1am3yhr6r2zpsh50d1l7g381ccccn9sz19jw13")))) | 874 | "1y6yvswzl1gzrv1am3yhr6r2zpsh50d1l7g381ccccn9sz19jw13")))) |
| 875 | (build-system cmake-build-system) | 875 | (build-system cmake-build-system) |
| 876 | (arguments | 876 | (arguments |
| 877 | (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON" | 877 | (list |
| 878 | "-DMZ_BUILD_TESTS=ON" | 878 | #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON" |
| 879 | "-DMZ_BUILD_UNIT_TESTS=ON" | 879 | "-DMZ_BUILD_TESTS=ON" |
| 880 | "-DMZ_COMPAT=OFF"))) | 880 | "-DMZ_BUILD_UNIT_TESTS=ON" |
| 881 | "-DMZ_COMPAT=OFF") | ||
| 882 | #:phases | ||
| 883 | #~(modify-phases %standard-phases | ||
| 884 | (add-after 'install 'sanitize-config-file | ||
| 885 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 886 | (let ((minizip-config | ||
| 887 | (or (false-if-exception | ||
| 888 | (search-input-file | ||
| 889 | outputs | ||
| 890 | "lib/cmake/minizip-ng/minizip-ng-config.cmake")) | ||
| 891 | (search-input-file ;for the minizip variant | ||
| 892 | outputs | ||
| 893 | "lib/cmake/minizip/minizip-config.cmake")))) | ||
| 894 | (substitute* minizip-config | ||
| 895 | ;; The find_dependency calls appear useful only in a | ||
| 896 | ;; static library context, to ensure the transitive | ||
| 897 | ;; dependencies are available for linking. Remove these to | ||
| 898 | ;; avoid having to propagate all optional inputs (see: | ||
| 899 | ;; <https://github.com/zlib-ng/minizip-ng/issues/898>). | ||
| 900 | ((".*CMakeFindDependencyMacro.*") "") | ||
| 901 | ((".*find_dependency.*") "")))))))) | ||
| 881 | (native-inputs (list googletest pkg-config)) | 902 | (native-inputs (list googletest pkg-config)) |
| 882 | (inputs (list openssl zlib `(,zstd "lib"))) | 903 | (inputs (list openssl zlib `(,zstd "lib"))) |
| 883 | (home-page "https://github.com/zlib-ng/minizip-ng") | 904 | (home-page "https://github.com/zlib-ng/minizip-ng") |
