diff options
| author | Alex Kost <alezost@gmail.com> | 2018-07-18 23:04:02 +0300 |
|---|---|---|
| committer | Alex Kost <alezost@gmail.com> | 2018-07-27 12:14:24 +0300 |
| commit | b5a4de0b0bd8caaa3b5f5050296c2b9c73789cd5 (patch) | |
| tree | 60574b4b4f1515b0b1dcc1ba7ef62198c37ed543 /build-farm-url.el | |
| parent | Use per-buffer build farm URL (diff) | |
| download | emacs-build-farm-b5a4de0b0bd8caaa3b5f5050296c2b9c73789cd5.tar.gz | |
Factorize defining system types
* build-farm-url.el (build-farm-url-package-manager): New function.
* build-farm.el (build-farm-system-types): Use it.
Diffstat (limited to 'build-farm-url.el')
| -rw-r--r-- | build-farm-url.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/build-farm-url.el b/build-farm-url.el index 1c566df..6a5e62e 100644 --- a/build-farm-url.el +++ b/build-farm-url.el @@ -77,6 +77,18 @@ Arbitrarily choosing `%S' type for this URL." url type) type))) +(defun build-farm-url-package-manager (&optional url) + "Return a package manager for the build farm URL. +The returned value is either `nix' or `guix' symbols or nil, if +the package manager cannot be determined. +If URL is nil, use `build-farm-url'." + (or url (setq url build-farm-url)) + (cond ((or (string-match-p (regexp-opt '("gnu" "guix")) url) + (eq 'cuirass (build-farm-url-type url))) + 'guix) + ((string-match-p "nix" url) + 'nix))) + (defun build-farm-url (&optional root-url &rest url-parts) "Return build farm ROOT-URL with URL-PARTS concatenated to it. If ROOT-URL is nil, `build-farm-url' variable is used." |
