Subject: [PATCH 2/5] gnu: Add cxi-driver.

From: Ludovic Courtès <[email-masked]>
Date: Mon, 18 Nov 2024 15:59:17 +0100

From: Ludovic Courtès <[email-masked]>

* gnu/packages/linux.scm (cxi-driver): New variable.

Change-Id: Iac48010d3de7f46248afe8c71991da71b61ebe6f
---
 gnu/packages/linux.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 9d0970313a..17f743ef11 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -9016,6 +9016,36 @@ (define-public cassini-headers
 software uses @file{cxi_prov_hw.h} from this package.")
       (license (list license:gpl2 license:bsd-2))))) ;dual-licensed
 
+(define-public cxi-driver
+  (let ((commit "5f0ec0ead6ef3f98542a2ef5e76b89d14dd22150")
+        (revision "0"))
+    (package
+      (name "cxi-driver")
+      (version (git-version "1.0.0"               ;per .spec file
+                            revision commit))
+      (home-page "https://github.com/HewlettPackard/shs-cxi-driver")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference (url home-page) (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "19cly014ihgdidrc1aki2xsbfhpc0g73v0vxcky8r27xza7rz5bg"))))
+      ;; TODO: Actually build the Linux driver.
+      (build-system copy-build-system)
+      (arguments
+       (list #:install-plan #~'(("include" "include"))))
+      (propagated-inputs (list cassini-headers))
+      (synopsis "Linux driver for the Cassini/Slingshot interconnect")
+      (description
+       "This is the Linux driver for the Cray/HPE Cassini 1 and 2 high-speed
+network interconnect (aka. Slingshot), and its Ethernet driver.  It includes
+the @file{uapi/misc/cxi.h} C header file for use by user-land software.
+
+Currently the Linux driver itself is missing from this package.")
+      (license license:gpl2+))))
+
 (define-public libfabric
   (package
     (name "libfabric")
-- 
2.46.0