gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: fix guix git version


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: fix guix git version
Date: Fri, 17 Aug 2018 00:55:28 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new c68a88175 fix guix git version
c68a88175 is described below

commit c68a881754b126948381ee174048fceda9d2460f
Author: Florian Dold <address@hidden>
AuthorDate: Fri Aug 17 00:55:20 2018 +0200

    fix guix git version
---
 contrib/guix/gnu/packages/gnunet.scm | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/contrib/guix/gnu/packages/gnunet.scm 
b/contrib/guix/gnu/packages/gnunet.scm
index 4f006769d..b24b58282 100644
--- a/contrib/guix/gnu/packages/gnunet.scm
+++ b/contrib/guix/gnu/packages/gnunet.scm
@@ -24,6 +24,8 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages gnunet)
+  #:use-module (ice-9 popen)
+  #:use-module (ice-9 rdelim)
   #:use-module (gnu packages)
   #:use-module (gnu packages file)
   #:use-module (gnu packages base)
@@ -61,6 +63,7 @@
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages backup)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module ((guix build utils) #:prefix build-utils:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
@@ -244,12 +247,27 @@ supports HTTP, HTTPS and GnuTLS.")
 
 (define %source-dir (dirname (current-filename)))
 
+(define (git-output . args)
+  "Execute 'git ARGS ...' command and return its output without trailing
+newspace."
+  (build-utils:with-directory-excursion %source-dir
+    (let* ((port   (apply open-pipe* OPEN_READ "git" args))
+           (output (read-string port)))
+      (close-port port)
+      (string-trim-right output #\newline))))
+
+(define (current-git-version)
+  (git-output "describe" "--tags"))
+
+(define (git-sources)
+  (local-file (dirname (dirname (dirname (dirname %source-dir))))
+                                                 #:recursive? #t))
+
 (define-public gnunet
   (package
    (name "gnunet")
-   (version "0.10.1")
-   (source (local-file (dirname (dirname (dirname %source-dir)))
-                      #:recursive? #t))
+   (version (current-git-version))
+   (source (git-sources))
    (build-system gnu-build-system)
    (inputs
     `(("glpk" ,glpk)

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]