mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
gnu: sqlite: Compute source URL from version number.
* gnu/packages/sqlite.scm (sqlite): Compute the numeric-version from the traditional version string, and use it to compute the source URL.
This commit is contained in:
parent
fb9c3acc6c
commit
835281829a
1 changed files with 16 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
|
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
|
||||||
|
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -21,7 +22,9 @@ (define-module (gnu packages sqlite)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (gnu packages))
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
|
#:use-module (ice-9 match))
|
||||||
|
|
||||||
(define-public sqlite
|
(define-public sqlite
|
||||||
(package
|
(package
|
||||||
|
@ -32,9 +35,18 @@ (define-public sqlite
|
||||||
;; TODO: Download from sqlite.org once this bug :
|
;; TODO: Download from sqlite.org once this bug :
|
||||||
;; http://lists.gnu.org/archive/html/bug-guile/2013-01/msg00027.html
|
;; http://lists.gnu.org/archive/html/bug-guile/2013-01/msg00027.html
|
||||||
;; has been fixed.
|
;; has been fixed.
|
||||||
(uri (string-append
|
(uri (let ((numeric-version
|
||||||
"mirror://sourceforge/sqlite.mirror/SQLite%20"
|
(match (string-split version #\.)
|
||||||
version "/sqlite-autoconf-3080200.tar.gz"))
|
((first-digit other-digits ...)
|
||||||
|
(string-append first-digit
|
||||||
|
(string-pad-right
|
||||||
|
(string-concatenate
|
||||||
|
(map (cut string-pad <> 2 #\0)
|
||||||
|
other-digits))
|
||||||
|
6 #\0))))))
|
||||||
|
(string-append
|
||||||
|
"mirror://sourceforge/sqlite.mirror/SQLite%20" version
|
||||||
|
"/sqlite-autoconf-" numeric-version ".tar.gz")))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"14pg9zlwbwsj5w7f3qr25d3nniyv82gmczwlvpj0i0ic1431v1d0"))))
|
"14pg9zlwbwsj5w7f3qr25d3nniyv82gmczwlvpj0i0ic1431v1d0"))))
|
||||||
|
|
Loading…
Reference in a new issue