gnu: ocaml: Use a helper function to download from ocaml-forge.
* gnu/packages/ocaml.scm (ocaml-forge-origin): New procedure. (lablgtk)[origin]: Use it. Signed-off-by: David Craven <david@craven.ch>
This commit is contained in:
parent
e6876cb9dc
commit
56f73eadc0
1 changed files with 13 additions and 8 deletions
|
@ -50,6 +50,13 @@ (define-module (gnu packages ocaml)
|
||||||
#:use-module (guix svn-download)
|
#:use-module (guix svn-download)
|
||||||
#:use-module (guix utils))
|
#:use-module (guix utils))
|
||||||
|
|
||||||
|
;; A shortcut for files from ocaml forge. Downloaded files are computed from
|
||||||
|
;; their number, not their name.
|
||||||
|
(define (ocaml-forge-uri name version file-number)
|
||||||
|
(string-append "https://forge.ocamlcore.org/frs/download.php/"
|
||||||
|
(number->string file-number) "/" name "-" version
|
||||||
|
".tar.gz"))
|
||||||
|
|
||||||
(define-public ocaml
|
(define-public ocaml
|
||||||
(package
|
(package
|
||||||
(name "ocaml")
|
(name "ocaml")
|
||||||
|
@ -509,14 +516,12 @@ (define-public lablgtk
|
||||||
(package
|
(package
|
||||||
(name "lablgtk")
|
(name "lablgtk")
|
||||||
(version "2.18.5")
|
(version "2.18.5")
|
||||||
(source
|
(source (origin
|
||||||
(origin
|
(method url-fetch)
|
||||||
(method url-fetch)
|
(uri (ocaml-forge-uri name version 1627))
|
||||||
(uri (string-append "https://forge.ocamlcore.org/frs/download.php/"
|
(sha256
|
||||||
"1627/lablgtk-2.18.5.tar.gz"))
|
(base32
|
||||||
(sha256
|
"0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
|
||||||
(base32
|
|
||||||
"0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("camlp4" ,camlp4)
|
`(("camlp4" ,camlp4)
|
||||||
|
|
Loading…
Reference in a new issue