aboutsummaryrefslogtreecommitdiff
path: root/tests/elpa.scm
blob: 1efdf2457f29061a73df1fcd79c273fae47d5048 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (test-elpa)
  #:use-module (guix import elpa)
  #:use-module (guix tests)
  #:use-module (guix tests http)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-64)
  #:use-module (ice-9 match)
  #:use-module (web client))

(define elpa-mock-archive
  '(1
    (ace-window .
                [(0 9 0)
                 ((avy
                   (0 2 0)))
                 "Quickly switch windows." single
                 ((:url . "https://github.com/abo-abo/ace-window")
                  (:keywords "window" "location"))])
    (auctex .
            [(11 88 6)
             nil "Integrated environment for *TeX*" tar
             ((:url . "http://www.gnu.org/software/auctex/"))])))

(test-begin "elpa")

(define (eval-test-with-elpa pkg)
  ;; Set up an HTTP server and use it as a pseudo-proxy so that
  ;; 'elpa->guix-package' talks to it.
  (with-http-server `((200 ,(object->string elpa-mock-archive))
                      (200 "This is the description.")
                      (200 "fake tarball contents"))
    (parameterize ((current-http-proxy (%local-url)))
      (match (elpa->guix-package pkg #:repo 'gnu/http)
        (('package
           ('name "emacs-auctex")
           ('version "11.88.6")
           ('source
            ('origin
              ('method 'url-fetch)
              ('uri ('string-append
                     "http://elpa.gnu.org/packages/auctex-" 'version ".tar"))
              ('sha256 ('base32 (? string? hash)))))
           ('build-system 'emacs-build-system)
           ('home-page "http://www.gnu.org/software/auctex/")
           ('synopsis "Integrated environment for *TeX*")
           ('description "This is the description.")
           ('license 'license:gpl3+))
         #t)
        (x
         (pk 'fail x #f))))))

(test-assert "elpa->guix-package test 1"
  (eval-test-with-elpa "auctex"))

(test-equal "guix-package->elpa-name: without 'upstream-name' property"
  "auctex"
  (guix-package->elpa-name (dummy-package "emacs-auctex")))

(test-equal "guix-package->elpa-name: with 'upstream-name' property"
  "project"
  (guix-package->elpa-name
   (dummy-package "emacs-fake-name"
     (properties '((upstream-name . "project"))))))

(test-end "elpa")

;; Local Variables:
;; eval: (put 'with-http-server 'scheme-indent-function 1)
;; End:
-tooltip'>* gnu/packages/fonts (font-adobe-source-code-pro): Update to 2.032R-ro-1.052R-it-1.012R-VAR. [commit]: Adjust version rewriting regexp accordingly. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> phodina 2021-11-08gnu: packages: Remove last year's deprecations....* gnu/packages/admin.scm (guile3.0-shepherd): Remove variable. * gnu/packages/benchmark.scm (imb-openmpi): Likewise. * gnu/packages/boost.scm (boost-with-python3): Likewise. * gnu/packages/pep.scm (python-pep-adapter)[inputs]: Adjust accordingly. * gnu/packages/cpp.scm (nlohmann-json-cpp): Likewise. * gnu/packages/games.scm (openrct2)[inputs]: Adjust accordingly. * gnu/packages/cups.scm (escpr): Likewise. * gnu/packages/django.scm (python-django-jsonfield): Likewise. * gnu/packages/emacs-xyz.scm (emacs-modus-operandi-theme) (emacs-modus-vivendi-theme): Likewise. * gnu/packages/engineering.scm (kicad-i18l): Likewise. * gnu/packages/enlightenment.scm (enlightenment-wayland): Likewise. * gnu/packages/firmware.scm (opensbi-qemu-virt, opensbi-qemu-sifive-u): Likewise. * gnu/packages/fonts.scm (font-gnu-freefont-ttf, font-open-dyslexic): Likewise. * gnu/packages/game-development.scm (guile3.0-chickadee) (python-sge-pygame): Likewise. * gnu/packages/games.scm (retux)[inputs]: Adjust accordingly. * gnu/packages/gnome-xyz.scm (numix-theme): Likewise. * gnu/packages/gnupg.scm (guile3.0-gcrypt): Likewise. * gnu/packages/gstreamer.scm (gst-transcoder): Likewise. * gnu/packages/gtk.scm (guile3.0-cairo, guile3.0-present, guile3.0-rsvg): Likewise. * gnu/packages/guile-xyz.scm (guile3.0-colorized, guile3.0-commonmark) (guile3.0-config, guile3.0-email, guile3.0-fibers, guile3.0-gi) (guile3.0-hall, guile3.0-hashing, guile3.0-haunt, guile3.0-ics) (guile3.0-irregex, guile3.0-lib, guile3.0-mcron, guile3.0-minikanren) (guile3.0-ncurses, guile3.0-ncurses/gpm, guile3.0-newt, guile3.0-parted) (guile3.0-pfds, guile3.0-picture-language, guile3.0-semver) (guile3.0-simple-zmq, guile3.0-squee, guile3.0-syntax-highlight) (guile3.0-websocket, guile3.0-wisp, guile3.0-xapian): Likewise. * gnu/packages/guile.scm (define-deprecated-guile3.0-package) (guile3.0-json, guile3.0-gdbm-ffi, guile3.0-sqlite3) (guile3.0-bytestructures, guile3.0-git): Likewise. * gnu/packages/haskell-apps.scm (ghc-stylish-haskell): Likewise. * gnu/packages/linux.scm (linux-libre-arm-veyron): Likewise. * gnu/packages/mail.scm (guile3.0-mailutils): Likewise. * gnu/packages/monitoring.scm (python2-graphite-web): Likewise. * gnu/packages/package-management.scm (guile3.0-guix): Likewise. * gnu/packages/package-management.scm (python-conda): Likewise. * gnu/packages/phabricator.scm (libphutil): Likewise. * gnu/packages/plotutils.scm (guile3.0-charting): Likewise. * gnu/packages/python-xyz.scm (python2-smmap2, python-glances) (python-smmap2): Likewise. * gnu/packages/shells.scm (oil-shell): Likewise. * gnu/packages/sqlite.scm (sqlite-with-column-metadata): Likewise. * gnu/packages/ssh.scm (guile3.0-ssh): Likewise. * gnu/packages/terminals.scm (et): Likewise. * gnu/packages/tls.scm (guile3.0-gnutls): Likewise. * gnu/packages/vlang.scm (v): Likewise. * gnu/packages/vpn.scm (wireguard): Likewise. * gnu/packages/web-browsers.scm (next, sbcl-next): Likewise. * gnu/packages/xorg.scm (transset-df): Likewise. Tobias Geerinckx-Rice 2021-10-23gnu: font-juliamono: Update to 0.043....* gnu/packages/fonts.scm (font-juliamono): Update to 0.043. Signed-off-by: Leo Famulari <leo@famulari.name> Konrad Hinsen 2021-10-21gnu: font-gnu-unifont: Cross-compile binaries....* gnu/packages/fonts.scm (font-gnu-unifont)[arguments]: Set CC to CC-FOR-TARGET in #:make-flags, where it has an effect. Remove it from the environment, where it did not. Respect #:make-flags during installation. Tobias Geerinckx-Rice 2021-10-21gnu: font-gnu-unifont: Update to 14.0.01....* gnu/packages/fonts.scm (font-gnu-unifont): Update to 14.0.01. [arguments]: Don't explicitly return #t from phases. Tobias Geerinckx-Rice 2021-10-18gnu: font-borg-sans-mono: Update to 0.3.3....* gnu/packages/fonts.scm (font-borg-sans-mono): Update to 0.3.3. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> Charles 2021-10-17gnu: font-liberation: Update to 2.1.5....* gnu/packages/fonts.scm (font-liberation): Update to 2.1.5. Tobias Geerinckx-Rice 2021-10-16gnu: font-abattis-cantarell: Update to 0.303....This atones^Wfollows up on commit 44469ffd83f8dd48355954eee50002efbbe58503 which, as its changelog suggests, was not supposed to suck. * gnu/packages/fonts.scm (font-abattis-cantarell): Update to 0.303. [source]: Fetch a zipbomb from GNOME's GitLab. [build-system]: Use the font-build-system. We never actually built anything. [arguments]: Add custom 'unpack-source and 'unpack-variable-font phases. [native-inputs]: Fetch another zipbomb from GNOME's GitLab. Add unzip to unpack both of them. Remove gettext-minimal. Tobias Geerinckx-Rice 2021-10-16gnu: font-overpass: Update to 3.0.5....* gnu/packages/fonts.scm (font-overpass): Update to 3.0.5. Tobias Geerinckx-Rice 2021-10-15gnu: font-abattis-cantarell: Downgrade to 0.301....Reported by talos on #guix. This fixes the build; the 0.303 release archive is not available from https://download.gnome.org/sources/cantarell-fonts/. * gnu/packages/fonts.scm (font-abattis-cantarell): Downgrade to 0.301. Maxim Cournoyer 2021-10-15gnu: font-abattis-cantarell: Update variable name....* gnu/packages/fonts.scm (font-cantarell): Rename to… (font-abattis-cantarell): …this. * gnu/packages/gnome.scm (gnome)[propagated-inputs]: Adjust accordingly. * gnu/packages/mate.scm (mate)[inputs]: Likewise. * gnu/services/xorg.scm (<gdm-configuration>): Likewise. Tobias Geerinckx-Rice 2021-10-13gnu: Remove duplicate python-google-brotli package....* gnu/packages/python-compression.scm (python-brotli): Delete duplicate variable. * gnu/packages/compression.scm (python-google-brotli): Redefine as a deprecated-package, with… (python-brotli): …as the canonical variable. * gnu/packages/fonts.scm (font-meera-inimai)[native-inputs]: Adjust accordingly. Tobias Geerinckx-Rice 2021-10-07gnu: font-canada1500: Update hash of source file....The original source is nowhere to be found so it might have been modified upstream right after the package was added, or it might have been a mistake. * gnu/packages/fonts.scm (font-canada1500)[source]: Update hash. Ludovic Courtès 2021-09-26gnu: font-borg-sans-mono: Update to 0.3.2....* gnu/packages/fonts.scm (font-borg-sans-mono): Update to 0.3.2. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Charles