>From 4622ca4c1ba0ef42c1b0db1070727c072365fbf6 Mon Sep 17 00:00:00 2001
From: Adonay Felipe Nogueira
Date: Sat, 24 Jun 2017 11:53:49 -0300
Subject: [PATCH] gnu: Add kashmir.
* gnu/packages/cpp.scm (kashmir): New variable.
---
gnu/packages/cpp.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 51 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index da19255..228be99 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Ethan R. Jones
+;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,9 +21,58 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix build utils)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system trivial)
#:use-module (gnu packages)
- #:use-module (gnu packages autotools))
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages compression))
+
+(define-public kashmir
+ (let ((release "0")
+ (commit "2f3913f49c4ac7f9bff9224db5178f6f8f0ff3ee")
+ (revision 1))
+ (package
+ (name "kashmir")
+ (version (if (zero? revision)
+ release
+ (string-append release "-"
+ (number->string revision)
+ "." (string-take commit 7))))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/Corvusoft/" name
+ "-dependency/archive/" commit ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "11hbh3d7w74gng9qgz3hdrzvxjgil1pymk2bzxv1ajh9vp60xxs9"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((gzip (assoc-ref %build-inputs "gzip"))
+ (source (assoc-ref %build-inputs "source"))
+ (tar (assoc-ref %build-inputs "tar")))
+ (setenv "PATH" (string-append gzip "/bin:"
+ tar "/bin"))
+ (mkdir-p %output)
+ (system* "tar" "-xvf" source "-C" %output)
+ (chdir %output)
+ (for-each (lambda (file)
+ (rename-file file "kashmir-dependency"))
+ (find-files "." "kashmir-dependency-" #:directories? #t))))))
+ (native-inputs
+ `(("source" ,source)
+ ("tar" ,tar)
+ ("gzip" ,gzip)))
+ (synopsis "C++ library providing I/O, MD5, SHA-1, random number string, and UUID operations")
+ (description "The Kashmir Library provides features allowing usage of I/O formatting and state saving; MD5 and SHA-1 hashing; random number streams, and UUID generation.")
+ (home-page "https://github.com/corvusoft/kashmir-dependency")
+ (license license:boost1.0))))
(define-public libzen
(package
--
1.9.1