diff mbox

[v2] gnu: Add mtd-utils.

Message ID 20160901123357.3233-1-dannym@scratchpost.org
State New
Headers show

Commit Message

Danny Milosavljevic Sept. 1, 2016, 12:33 p.m. UTC
gnu: Add mtd-utils.

* gnu/packages/linux.scm (mtd-utils): New variable.
---
 gnu/packages/linux.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
diff mbox

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index aac2cd1..4c690a6 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2924,3 +2924,39 @@  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"))
+              (sha256
+               (base32
+                "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
+    (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)))
+               #t)))
+         (delete 'configure))))
+    (synopsis "MTD Flash Storage Utilities")
+    (description
+     "This package provides utilities for testing, partitioning
+etc of flash storage.")
+    (home-page "http://www.linux-mtd.infradead.org/")
+    ;; mkfs.ubifs/crc16.h is GPLv2
+    (license (list license:gpl2 license:mpl1.1 license:bsd-3))))