From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] gnu: Add mtd-utils. Date: Tue, 30 Aug 2016 11:08:17 +0300 Message-ID: <87eg56r85q.fsf@gmail.com> References: <20160829232414.2538-1-dannym@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bee5n-0006Oo-Ll for guix-devel@gnu.org; Tue, 30 Aug 2016 04:08:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bee5j-0001v7-D4 for guix-devel@gnu.org; Tue, 30 Aug 2016 04:08:22 -0400 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:33984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bee5j-0001v3-4h for guix-devel@gnu.org; Tue, 30 Aug 2016 04:08:19 -0400 Received: by mail-lf0-x244.google.com with SMTP id k135so575715lfb.1 for ; Tue, 30 Aug 2016 01:08:19 -0700 (PDT) In-Reply-To: <20160829232414.2538-1-dannym@scratchpost.org> (Danny Milosavljevic's message of "Tue, 30 Aug 2016 01:24:14 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel@gnu.org 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