[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: Add mtd-utils.
From: |
Alex Kost |
Subject: |
Re: [PATCH] gnu: Add mtd-utils. |
Date: |
Tue, 30 Aug 2016 11:08:17 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Danny Milosavljevic (2016-08-30 02:24 +0300) wrote:
> * gnu/packages/linux.scm (mtd-utils): New variable.
> ---
> gnu/packages/linux.scm | 35 +++++++++++++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
>
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index 07fd6e5..7ab9b3c 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -32,6 +32,7 @@
>
> (define-module (gnu packages linux)
> #:use-module (gnu packages)
> + #:use-module (gnu packages acl)
> #:use-module (gnu packages admin)
> #:use-module (gnu packages algebra)
> #:use-module (gnu packages attr)
> @@ -2898,3 +2899,37 @@ native Linux file system, and has been part of the
> Linux kernel since version
> ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
> ;; grant additional permission to link with OpenSSL.
> (license license:gpl2+)))
> +
> +(define-public mtd-utils
> + (package
> + (name "mtd-utils")
> + (version "1.5.2")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append
> + "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-" version
> ".tar.bz2"))
bad indentation ^^^ I would write it like this:
(uri (string-append
"ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-"
version ".tar.bz2"))
> + (sha256
> + (base32
> + "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))
> + (file-name (string-append "mtd-utils-" version))))
'file-name' is not needed as the name of the source tarball is already
good enough. It is needed, for example, when the source name does not
have a package name, like "v0.1.tar.gz" (the case of github tag
snapshots).
Also note that if 'file-name' would be required here, it should be ended
with ".tar.bz2": you rename it to "mtd-utils-1.5.2" and this is a bad
name for a "tar.bz2" file.
> + (inputs
> + `(("acl" ,acl)
> + ("libuuid" ,util-linux)
> + ("lzo", lzo)
> + ("zlib" ,zlib)))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:test-target "tests"
> + #:phases (modify-phases %standard-phases
> + (add-before 'build 'patch-installation-prefix
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((out (assoc-ref outputs "out")))
> + (substitute* '("common.mk")
> + (("PREFIX=/usr") (string-append "PREFIX=" out))))))
Please add #t in the end of this phase: a phase should return non-false
value if it succeeds.
> + (delete 'configure))))
> + (synopsis "MTD Flash Storage Utilities")
> + (description
> + "@code{mtd-utils} provides utilities for testing, partitioning
> +etc of flash storage.")
> + (home-page "http://www.linux-mtd.infradead.org/")
> + (license (list license:gpl2 license:mpl1.1 license:bsd-3))))
It would be good if you write a comment before licenses, like what files
have what licenses. Also is it really 'gpl2'? If the license says "or
any later version", it should be 'gpl2+'.
--
Alex