diff options
author | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2022-03-04 19:32:32 +0100 |
---|---|---|
committer | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2022-06-15 10:18:34 +0200 |
commit | 0d9f1f15cb0ce1e71943bff9a68e6839d0eae497 (patch) | |
tree | 448fb02a1b01282e1118e4115ff528a13687f656 /guix/build-system | |
parent | 97586ca1cb25aed9da13c9cc7de152346be0a093 (diff) |
import: Add hex.pm importer.
hex.pm is a package repository for Erlang and Elixir.
* guix/scripts/import.scm (importers): Add "hexpm".
* guix/scripts/import/hexpm.scm, guix/import/hexpm.scm,
guix/hexpm-download.scm: New files.
* guix/import/utils.scm (source-spec->object): Add "hexpm-fetch" to list of
fetch methods.
* guix/upstream.scm (package-update/hexpm-fetch): New function.
(%method-updates) Add it.
* Makefile.am: Add them.
Diffstat (limited to 'guix/build-system')
-rw-r--r-- | guix/build-system/rebar.scm | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/guix/build-system/rebar.scm b/guix/build-system/rebar.scm index 8a8fb7708c..6ca5abe4d6 100644 --- a/guix/build-system/rebar.scm +++ b/guix/build-system/rebar.scm @@ -26,20 +26,35 @@ #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) - #:use-module ((guix hexpm-download) #:select (hexpm-uri) #:prefix dl:) #:use-module (ice-9 match) #:use-module (srfi srfi-26) #:export (hexpm-uri + hexpm-package-url %rebar-build-system-modules rebar-build rebar-build-system)) +;;; +;;; Definitions for the hex.pm repository, +;;; + +;; URL and paths from +;; https://github.com/hexpm/specifications/blob/master/endpoints.md +(define %hexpm-repo-url + (make-parameter "https://repo.hex.pm")) + +(define hexpm-package-url + (string-append (%hexpm-repo-url) "/tarballs/")) + +(define (hexpm-uri name version) + "Return a URI string for the package hosted at hex.pm corresponding to NAME +and VERSION." + (string-append hexpm-package-url name "-" version ".tar")) + ;; ;; Standard build procedure for Erlang packages using Rebar. ;; -(define hexpm-uri dl:hexpm-uri) - (define %rebar-build-system-modules ;; Build-side modules imported by default. `((guix build rebar-build-system) |