gnu: criu: Update to 4.0.

* gnu/packages/virtualization.scm (criu): Update to 4.0.
[#:phases]<hardcode-variables>: Add a few more substitutions.
<wrap>: Manually install python components. [native-inputs]:
Depend on python-setuptools.

Change-Id: I9fc3a8e554499edd339a89597d0e1438997a24c8
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Ashish SHUKLA 2025-03-23 01:20:36 +00:00 committed by Ludovic Courtès
parent 538f41d09e
commit 9810c4c818
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -2000,7 +2000,7 @@ client desktops.
(define-public criu (define-public criu
(package (package
(name "criu") (name "criu")
(version "3.17.1") (version "4.0")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
@ -2009,7 +2009,7 @@ client desktops.
(commit (string-append "v" version)))) (commit (string-append "v" version))))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "0ff3xfcf0wfz02fc0qbj56mci1a0xdl8jzaihaw6qyjvgrsiq7fh")))) (base32 "0p46z5iclyvvg1arvqhl3bdg1g2mny0pxyz6pr5n87cnj7maqphg"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:test-target "test" `(#:test-target "test"
@ -2040,7 +2040,14 @@ client desktops.
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
;; Hardcode arm version detection ;; Hardcode arm version detection
(substitute* "Makefile" (substitute* "Makefile"
(("ARMV.*:=.*") "ARMV := 7\n")) (("ARMV.*:=.*") "ARMV := 7\n")
(("^head-name :=.*")
(string-append "head-name := "
,(package-version this-package)
"\n")))
;; disable pip install
(substitute* "Makefile.install"
(("SKIP_PIP_INSTALL.*:=.*") "SKIP_PIP_INSTALL := 1\n"))
;; Hard-code the correct PLUGINDIR above. ;; Hard-code the correct PLUGINDIR above.
(substitute* "criu/include/plugin.h" (substitute* "criu/include/plugin.h"
(("/var") (string-append (assoc-ref outputs "out")))))) (("/var") (string-append (assoc-ref outputs "out"))))))
@ -2066,6 +2073,16 @@ client desktops.
(package-version python)) (package-version python))
"/site-packages")) "/site-packages"))
(path (getenv "GUIX_PYTHONPATH"))) (path (getenv "GUIX_PYTHONPATH")))
;; manually install stuff that was pip-installed
(for-each (lambda (dir)
(with-directory-excursion dir
(setenv "GUIX_PYTHONPATH"
(string-append site ":" path))
(invoke "python3" "setup.py" "install"
(string-append "--prefix=" out)
"--no-compile" "--root=/"
"--single-version-externally-managed")))
(list "lib" "crit"))
(wrap-program (string-append out "/bin/crit") (wrap-program (string-append out "/bin/crit")
`("GUIX_PYTHONPATH" ":" prefix (,site ,path)))))) `("GUIX_PYTHONPATH" ":" prefix (,site ,path))))))
(add-after 'install 'delete-static-libraries (add-after 'install 'delete-static-libraries
@ -2091,6 +2108,7 @@ client desktops.
xmlto xmlto
docbook-xml docbook-xml
docbook-xsl docbook-xsl
python-setuptools
python-toolchain)) python-toolchain))
(propagated-inputs (propagated-inputs
;; included by 'rpc.pb-c.h' ;; included by 'rpc.pb-c.h'