From: Alex Kost <alezost@gmail.com>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add mtd-utils.
Date: Tue, 30 Aug 2016 11:08:17 +0300 [thread overview]
Message-ID: <87eg56r85q.fsf@gmail.com> (raw)
In-Reply-To: <20160829232414.2538-1-dannym@scratchpost.org> (Danny Milosavljevic's message of "Tue, 30 Aug 2016 01:24:14 +0200")
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
next prev parent reply other threads:[~2016-08-30 8:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-29 23:24 [PATCH] gnu: Add mtd-utils Danny Milosavljevic
2016-08-30 8:08 ` Alex Kost [this message]
2016-08-30 8:39 ` Danny Milosavljevic
2016-08-31 7:24 ` Alex Kost
2016-08-31 20:59 ` Ludovic Courtès
2016-08-31 21:39 ` Danny Milosavljevic
2016-09-01 12:13 ` Ludovic Courtès
2016-09-02 7:53 ` Alex Kost
2016-09-02 8:07 ` Alex Vong
2016-09-02 12:49 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eg56r85q.fsf@gmail.com \
--to=alezost@gmail.com \
--cc=dannym@scratchpost.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.