gnu: gemmlowp: Improve style.

* gnu/packages/machine-learning.scm (gemmlowp)
[source, arguments, home-page]: Improve style.

Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
Nicolas Graves 2025-09-01 16:35:21 +02:00 committed by Andreas Enge
parent 302f532b5c
commit c5fa4b1495
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -1840,43 +1840,46 @@ compatibility.")
(package (package
(name "gemmlowp") (name "gemmlowp")
(version (git-version version revision commit)) (version (git-version version revision commit))
(home-page "https://github.com/google/gemmlowp") (source
(source (origin (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (url home-page) (commit commit))) (uri (git-reference
(file-name (git-file-name name version)) (url "https://github.com/google/gemmlowp")
(sha256 (commit commit)))
(base32 (file-name (git-file-name name version))
"02xmrv921al94nihiqrvi8inlq6qc07j0zll3f9qi8322r31x83v")))) (sha256
(base32 "02xmrv921al94nihiqrvi8inlq6qc07j0zll3f9qi8322r31x83v"))))
(arguments (arguments
`(#:configure-flags (list
(list ,@(match (%current-system) #:configure-flags
((or "x86_64-linux" "i686-linux") #~(list #$@(match (%current-system)
'("-DCMAKE_CXX_FLAGS=-msse2")) ((or "x86_64-linux" "i686-linux")
(_ '())) '("-DCMAKE_CXX_FLAGS=-msse2"))
"-DBUILD_SHARED_LIBS=ON") (_ '()))
#:phases "-DBUILD_SHARED_LIBS=ON")
(modify-phases %standard-phases #:phases
;; This directory contains the CMakeLists.txt. #~(modify-phases %standard-phases
(add-after 'unpack 'chdir ;; This directory contains the CMakeLists.txt.
(lambda _ (chdir "contrib") #t)) (add-after 'unpack 'chdir
;; There is no install target (lambda _
(replace 'install (chdir "contrib")))
(lambda* (#:key outputs #:allow-other-keys) ;; There is no install target
(let* ((out (assoc-ref outputs "out")) (replace 'install
(lib (string-append out "/lib/")) (lambda _
(inc (string-append out "/include/"))) (let ((lib (string-append #$output "/lib/")))
(install-file "../build/libeight_bit_int_gemm.so" lib) (install-file "../build/libeight_bit_int_gemm.so" lib)
(for-each (lambda (dir) (for-each
(let ((target (lambda (dir)
(string-append inc "/gemmlowp/" dir))) (let ((target (string-append #$output
(for-each (lambda (h) "/include/gemmlowp/" dir)))
(install-file h target)) (for-each (lambda (h)
(find-files (string-append "../" dir) (install-file h target))
"\\.h$")))) (find-files (string-append "../" dir)
'("meta" "profiling" "public" "fixedpoint" "\\.h$"))))
"eight_bit_int_gemm" "internal")))))))) '("meta" "profiling" "public" "fixedpoint"
"eight_bit_int_gemm" "internal"))))))))
(build-system cmake-build-system) (build-system cmake-build-system)
(home-page "https://github.com/google/gemmlowp")
(synopsis "Small self-contained low-precision GEMM library") (synopsis "Small self-contained low-precision GEMM library")
(description (description
"This is a small self-contained low-precision @dfn{general matrix "This is a small self-contained low-precision @dfn{general matrix