aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2016-12-22 20:05:46 +0100
committerDavid Craven <david@craven.ch>2017-01-04 16:03:56 +0100
commit56f73eadc018bef27d895d6f3fd21d6b16a5ce50 (patch)
tree6f73e2eee33f8b8d49f0fa37ff6fdd9d712be052
parente6876cb9dc2c90c731abd8fef2c01c1a4ba8f59f (diff)
downloadgnu-guix-56f73eadc018bef27d895d6f3fd21d6b16a5ce50.tar
gnu-guix-56f73eadc018bef27d895d6f3fd21d6b16a5ce50.tar.gz
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>
-rw-r--r--gnu/packages/ocaml.scm21
1 files changed, 13 insertions, 8 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 88e95a8483..dd43741637 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -50,6 +50,13 @@
#:use-module (guix svn-download)
#: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
(package
(name "ocaml")
@@ -509,14 +516,12 @@ Knuth’s LR(1) parser construction technique.")
(package
(name "lablgtk")
(version "2.18.5")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "https://forge.ocamlcore.org/frs/download.php/"
- "1627/lablgtk-2.18.5.tar.gz"))
- (sha256
- (base32
- "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
+ (source (origin
+ (method url-fetch)
+ (uri (ocaml-forge-uri name version 1627))
+ (sha256
+ (base32
+ "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
(build-system gnu-build-system)
(native-inputs
`(("camlp4" ,camlp4)