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,36 +1840,38 @@ 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
(url "https://github.com/google/gemmlowp")
(commit commit)))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32 "02xmrv921al94nihiqrvi8inlq6qc07j0zll3f9qi8322r31x83v"))))
"02xmrv921al94nihiqrvi8inlq6qc07j0zll3f9qi8322r31x83v"))))
(arguments (arguments
`(#:configure-flags (list
(list ,@(match (%current-system) #:configure-flags
#~(list #$@(match (%current-system)
((or "x86_64-linux" "i686-linux") ((or "x86_64-linux" "i686-linux")
'("-DCMAKE_CXX_FLAGS=-msse2")) '("-DCMAKE_CXX_FLAGS=-msse2"))
(_ '())) (_ '()))
"-DBUILD_SHARED_LIBS=ON") "-DBUILD_SHARED_LIBS=ON")
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
;; This directory contains the CMakeLists.txt. ;; This directory contains the CMakeLists.txt.
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
(lambda _ (chdir "contrib") #t)) (lambda _
(chdir "contrib")))
;; There is no install target ;; There is no install target
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let* ((out (assoc-ref outputs "out")) (let ((lib (string-append #$output "/lib/")))
(lib (string-append out "/lib/"))
(inc (string-append out "/include/")))
(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
"/include/gemmlowp/" dir)))
(for-each (lambda (h) (for-each (lambda (h)
(install-file h target)) (install-file h target))
(find-files (string-append "../" dir) (find-files (string-append "../" dir)
@ -1877,6 +1879,7 @@ compatibility.")
'("meta" "profiling" "public" "fixedpoint" '("meta" "profiling" "public" "fixedpoint"
"eight_bit_int_gemm" "internal")))))))) "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