Subject: [bug#31999] [PATCH 2/7] gnu: Add ndctl.

From: Marius Bakke <[email-masked]>
Date: Thu, 12 Jul 2018 22:12:36 +0200

Pierre Neidhardt <[email-masked]> writes:

> * gnu/package/disk.scm (ndctl): New variable.

[...]

> +    (native-inputs
> +     `(("asciidoc" ,asciidoc)
> +       ("automake" ,automake)
> +       ("autocont" ,autoconf)
> +       ("libtool" ,libtool)
> +       ("xmlto" ,xmlto)
> +       ("which" ,which)
> +       ("pkg-config" ,pkg-config)
> +       ("docbook-xsl" ,docbook-xsl)
> +       ("libxml2" ,libxml2)             ; Required for offline docbook generation.
> +       ("bash-completion" ,bash-completion)))
> +    (inputs
> +     `(("json-c" ,json-c)
> +       ("eudev" ,eudev)
> +       ("util-linux" ,util-linux)
> +       ("kmod" ,kmod)))

Nit-pick: please try to keep inputs sorted.  In addition to cosmetics,
it makes it easier to find out whether a particular input is present.

> +     (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'autogen
> +           (lambda _
> +             (substitute* "autogen.sh"
> +               (("/bin/sh") (which "sh")))
> +             (substitute* "git-version-gen"
> +               (("/bin/sh") (which "sh")))
> +             (substitute* "git-version"
> +               (("/bin/bash") (which "bash")))
> +             (invoke "sh" "autogen.sh"))))
> +       #:make-flags
> +       (let ((out (assoc-ref %outputs "out")))
> +         (list (string-append "BASH_COMPLETION_DIR=" out
> +                              "/share/bash-completion/completions")))))
> +    (home-page "https://github.com/pmem/ndctl")
> +    (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
> +    (description
> +     "Utility library for managing the libnvdimm (non-volatile memory device)
> +sub-system in the Linux kernel.")
> +    (license license:lgpl2.1+)))

Most of the source files say GPL version 2 (only), except for the
library files which are LGPL2.1 only.  So I think we need to list both.