Subject: bug#40032: closed (Re: [bug#40032] [PATCH] gnu: Add nvme-cli)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 15 Mar 2020 17:58:02 +0000

Your bug report

#40032: [PATCH] gnu: Add nvme-cli

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
40032: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40032
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#40032] [PATCH] gnu: Add nvme-cli
From: Leo Famulari <[email-masked]>
To: Vincent Legoll <[email-masked]>
Cc: [email-masked]
Date: Sun, 15 Mar 2020 13:57:22 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

On Sun, Mar 15, 2020 at 06:36:54PM +0100, Vincent Legoll wrote:
> From 4f794f64ca5438773fc9980bbf0cf5739144dc87 Mon Sep 17 00:00:00 2001
> From: Vincent Legoll <[email-masked]>
> Date: Thu, 12 Mar 2020 01:51:12 +0100
> Subject: [PATCH] gnu: Add nvme-cli
> 
> * gnu/packages/linux.scm (nvme-cli): New variable.

Thanks! Pushed as 323841bda4e5b8f9b30626ab768aaf711ee6aabf with the
following changes that I somehow forgot to mention. There was no need to
make you revise the patch again...

> +       #:phases (modify-phases %standard-phases
> +                  (delete 'configure)

I added a comment about why the phase is deleted.

> +                  (replace 'install
> +                    (lambda _
> +                      (zero? (system* "make" "install-spec" "PREFIX="
> +                                      (string-append "DESTDIR=" %output))))))

I replaced (zero? (system* ...)) with (invoke ...), which raises
exceptions on failure rather than returning a boolean #f. This is "the
Guix way" for a while now:

https://lists.gnu.org/archive/html/guix-devel/2017-12/msg00278.html

> +    (description "Utility to provide standards compliant tooling for NVM-Express
> +drives.  It was made specifically for Linux as it relies on the IOCTLs defined

And I made this first sentence into a complete sentence.

Subject: [PATCH] gnu: Add nvme-cli
From: Vincent Legoll <[email-masked]>
To: [email-masked]
Date: Thu, 12 Mar 2020 02:13:06 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Lightly tested (list & list-subsys commands)
on real hardware.

Guix pack'ed the binary and copied out of the
VM to run (in debian)

-- 
Vincent Legoll
From 9c836b206d65c0e80706c0a3730e77f508b10f43 Mon Sep 17 00:00:00 2001
From: Vincent Legoll <[email-masked]>
Date: Thu, 12 Mar 2020 01:51:12 +0100
Subject: [PATCH] gnu: Add nvme-cli

* gnu/packages/linux.scm (nvme-cli): New variable.
---
 gnu/packages/linux.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index b6048a8cfb..d7b31103c8 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -3544,6 +3544,35 @@ IDE driver subsystem.  Many external USB drive enclosures with SCSI-ATA Command
 Translation (@dfn{SAT}) are also supported.")
     (license (license:non-copyleft "file://LICENSE.TXT"))))
 
+(define-public nvme-cli
+  (package
+    (name "nvme-cli")
+    (version "1.10.1")
+    (home-page "https://github.com/linux-nvme/nvme-cli")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit (string-append "v" version))))
+              (sha256
+               (base32 "12wp2wxmsw2v8m9bhvwvdbhdgx1md8iilhbl19sfzz2araiwi2x8"))
+              (file-name (git-file-name name version))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags (list "CC=gcc")
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (replace 'install
+                    (lambda _
+                      (zero? (system* "make" "install-spec" "PREFIX="
+                                      (string-append "DESTDIR=" %output))))))
+       #:tests? #f))
+    (synopsis "NVM-Express user space tooling for Linux")
+    (description "Utility to provide standards compliant tooling for NVM-Express
+drives.  It was made specifically for Linux as it relies on the IOCTLs defined
+by the mainline kernel driver.")
+    (license license:gpl2+)))
+
 (define-public rfkill
   (package
     (name "rfkill")
-- 
2.25.1