diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-08-17 00:55:20 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-08-17 00:55:20 +0200 |
commit | c68a881754b126948381ee174048fceda9d2460f (patch) | |
tree | be720c1e97ebc95d75417b87b91cb98bc74aa974 /contrib/guix | |
parent | 671997ed586173d92a4776bc1dc92541e90ecb52 (diff) | |
download | gnunet-c68a881754b126948381ee174048fceda9d2460f.tar.gz gnunet-c68a881754b126948381ee174048fceda9d2460f.zip |
fix guix git version
Diffstat (limited to 'contrib/guix')
-rw-r--r-- | contrib/guix/gnu/packages/gnunet.scm | 24 |
1 files 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 @@ | |||
24 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | 24 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
25 | 25 | ||
26 | (define-module (gnu packages gnunet) | 26 | (define-module (gnu packages gnunet) |
27 | #:use-module (ice-9 popen) | ||
28 | #:use-module (ice-9 rdelim) | ||
27 | #:use-module (gnu packages) | 29 | #:use-module (gnu packages) |
28 | #:use-module (gnu packages file) | 30 | #:use-module (gnu packages file) |
29 | #:use-module (gnu packages base) | 31 | #:use-module (gnu packages base) |
@@ -61,6 +63,7 @@ | |||
61 | #:use-module (gnu packages xiph) | 63 | #:use-module (gnu packages xiph) |
62 | #:use-module (gnu packages backup) | 64 | #:use-module (gnu packages backup) |
63 | #:use-module ((guix licenses) #:prefix license:) | 65 | #:use-module ((guix licenses) #:prefix license:) |
66 | #:use-module ((guix build utils) #:prefix build-utils:) | ||
64 | #:use-module (guix packages) | 67 | #:use-module (guix packages) |
65 | #:use-module (guix download) | 68 | #:use-module (guix download) |
66 | #:use-module (guix utils) | 69 | #:use-module (guix utils) |
@@ -244,12 +247,27 @@ supports HTTP, HTTPS and GnuTLS.") | |||
244 | 247 | ||
245 | (define %source-dir (dirname (current-filename))) | 248 | (define %source-dir (dirname (current-filename))) |
246 | 249 | ||
250 | (define (git-output . args) | ||
251 | "Execute 'git ARGS ...' command and return its output without trailing | ||
252 | newspace." | ||
253 | (build-utils:with-directory-excursion %source-dir | ||
254 | (let* ((port (apply open-pipe* OPEN_READ "git" args)) | ||
255 | (output (read-string port))) | ||
256 | (close-port port) | ||
257 | (string-trim-right output #\newline)))) | ||
258 | |||
259 | (define (current-git-version) | ||
260 | (git-output "describe" "--tags")) | ||
261 | |||
262 | (define (git-sources) | ||
263 | (local-file (dirname (dirname (dirname (dirname %source-dir)))) | ||
264 | #:recursive? #t)) | ||
265 | |||
247 | (define-public gnunet | 266 | (define-public gnunet |
248 | (package | 267 | (package |
249 | (name "gnunet") | 268 | (name "gnunet") |
250 | (version "0.10.1") | 269 | (version (current-git-version)) |
251 | (source (local-file (dirname (dirname (dirname %source-dir))) | 270 | (source (git-sources)) |
252 | #:recursive? #t)) | ||
253 | (build-system gnu-build-system) | 271 | (build-system gnu-build-system) |
254 | (inputs | 272 | (inputs |
255 | `(("glpk" ,glpk) | 273 | `(("glpk" ,glpk) |