aboutsummaryrefslogtreecommitdiff
path: root/tests/snix.scm
blob: 4c31e3389d9cdf9ed6aad9cbf6ccef4cee6491dc (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
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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-snix)
  #:use-module (guix import snix)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-64)
  #:use-module (ice-9 match))

(define %nixpkgs-directory
  (getenv "NIXPKGS"))

(define factorize-uri
  (@@ (guix import snix) factorize-uri))

(define-syntax-rule (every? proc lists ...)
  (not (not (every proc lists ...))))

(test-begin "snix")

(test-assert "factorize-uri"
  (every? (match-lambda
           ((uri version '-> expected)
            (equal? (factorize-uri uri version)
                    expected)))
          '(("http://example.com/foo.tgz" "1.0"
             -> "http://example.com/foo.tgz")
            ("http://example.com/foo-2.8.tgz" "2.8"
             -> ("http://example.com/foo-" version ".tgz"))
            ("http://example.com/2.8/foo-2.8.tgz" "2.8"
             -> ("http://example.com/" version "/foo-" version ".tgz")))))

(test-skip (if (and %nixpkgs-directory
                    (file-exists? (string-append %nixpkgs-directory
                                                 "/default.nix")))
               0
               1))

(test-assert "nixpkgs->guix-package"
  (match (nixpkgs->guix-package %nixpkgs-directory "guile")
    (('package
       ('name "guile")
       ('version (? string?))
       ('source ('origin _ ...))
       ('build-system _)
       ('inputs ('quasiquote (inputs ...)))
       ('propagated-inputs ('quasiquote (pinputs ...)))
       ('home-page (? string?))
       ('synopsis (? string?))
       ('description (? string?))
       ('license (? symbol?)))
     (and (member '("libffi" ,libffi) inputs)
          (member '("gmp" ,gmp) pinputs)
          #t))
    (x
     (pk 'fail x #f))))

(test-end "snix")
es/erlang.scm (erlang)[arguments]: Likewise. * gnu/packages/ftp.scm (weex)[arguments]: Likewise. * gnu/packages/gnome.scm (dia)[arguments]: Likewise. * gnu/packages/gnunet.scm (gnurl, guile-gnunet)[arguments]: Likewise. * gnu/packages/gtk.scm (guile-rsvg, graphene)[arguments]: Likewise. * gnu/packages/guile.scm (guildhall, guile-ics, guile-sqlite3)[arguments]: Likewise. * gnu/packages/ibus.scm (ibus-libpinyin)[arguments]: Likewise. * gnu/packages/irc.scm (weechat)[arguments]: Likewise. * gnu/packages/java.scm (classpath-devel)[arguments]: Likewise. * gnu/packages/libreoffice.scm (libetonyek)[arguments]: Likewise. * gnu/packages/libusb.scm (hidapi)[arguments]: Likewise. * gnu/packages/linux.scm (gpm)[arguments]: Likewise. * gnu/packages/logging.scm (glog)[arguments]: Likewise. * gnu/packages/machine-learning.scm (ghmm)[arguments]: Likewise. * gnu/packages/mail.scm (dovecot-trees, dovecot-libsodium-plugin, esmtp) [arguments]: Likewise. * gnu/packages/messaging.scm (freetalk, libmesode, libstrophe)[arguments]: Likewise. * gnu/packages/microcom.scm (microcom)[arguments]: Likewise. * gnu/packages/ocaml.scm (ocaml-ssl)[arguments]: Likewise. * gnu/packages/parallel.scm (slurm)[arguments]: Likewise. * gnu/packages/pdf.scm (libharu)[arguments]: Likewise. * gnu/packages/samba.scm (cifs-utils)[arguments]: Likewise. * gnu/packages/serialization.scm (msgpack)[arguments]: Likewise. * gnu/packages/shells.scm (scsh)[arguments]: Likewise. * gnu/packages/telephony.scm (libiax2)[arguments]: Likewise. * gnu/packages/textutils.scm (dotconf)[arguments]: Likewise. * gnu/packages/version-control.scm (findnewest)[arguments]: Likewise. * gnu/packages/video.scm (libmediainfo, mediainfo)[arguments]: Likewise. 2017-08-15gnu: signify: Update to 22.Leo Famulari * gnu/packages/crypto.scm (signify): Update to 22. 2017-08-14gnu: Add perl-math-random-secure.Ricardo Wurmus * gnu/packages/crypto.scm (perl-math-random-secure): New variable. 2017-08-14gnu: Add perl-crypt-random-source.Ricardo Wurmus * gnu/packages/crypto.scm (perl-crypt-random-source): New variable. 2017-08-14gnu: Add perl-math-random-isaac.Ricardo Wurmus * gnu/packages/crypto.scm (perl-math-random-isaac): New variable. 2017-08-14gnu: Add perl-math-random-isaac-xs.Ricardo Wurmus * gnu/packages/crypto.scm (perl-math-random-isaac-xs): New variable. 2017-07-16gnu: libsodium: Update to 1.0.13.Marius Bakke * gnu/packages/crypto.scm (libsodium): Update to 1.0.13. 2017-06-15gnu: tomb: Upgrade to 2.4.Eric Bavier * gnu/packages/crypto.scm (tomb): Upgrade to 2.4. [inputs]: Remove swish-e. Move "sude" input to... [native-inputs]: ...here. New field. 2017-06-07gnu: signify: Update to 21.Marius Bakke * gnu/packages/crypto.scm (signify): Update to 21. 2017-05-25gnu: Add python-asn1crypto.Leo Famulari * gnu/packages/crypto.scm (python-asn1crypto, python2-asn1crypto): New variables. 2017-04-21gnu: libsodium: Update to 1.0.12.Leo Famulari * gnu/packages/crypto.scm (libsodium): Update to 1.0.12. 2017-02-16gnu: tomb: Upgrade to 2.3.Eric Bavier * gnu/packages/crypto.scm (tomb): Upgrade to 2.3. 2017-02-16gnu: scrypt: Update to 1.2.1.Leo Famulari * gnu/packages/crypto.scm (scrypt): Update to 1.2.1. 2017-01-16gnu: Add scrypt.Leo Famulari * gnu/packages/crypto.scm (scrypt): New variable. 2016-11-26gnu: libsodium: Update to 1.0.11.Leo Famulari * gnu/packages/crypto.scm (libsodium): Update to 1.0.11. 2016-11-21gnu: packages: Use gettext-minimal.Alex Kost * gnu/packages/crypto.scm (tomb): Use 'gettext-minimal' instead of 'gnu-gettext'. * gnu/packages/emacs.scm (m17n-db): Likewise. * gnu/packages/ftp.scm (weex): Likewise. * gnu/packages/games.scm (chromium-bsu): Likewise. * gnu/packages/image.scm (steghide): Likewise. * gnu/packages/linux.scm (radeontop): Likewise. * gnu/packages/mpd.scm (sonata): Likewise. * gnu/packages/networking.scm (whois): Likewise. * gnu/packages/package-management.scm (guix-0.11.0): Likewise. * gnu/packages/psyc.scm (psyclpc): Likewise. * gnu/packages/syndication.scm (newsbeuter): Likewise. * gnu/packages/vim.scm (vim-full): Likewise. 2016-11-13gnu: signify: Update to 20.Leo Famulari * gnu/packages/crypto.scm (signify): Update to 20. 2016-09-30Merge branch 'master' into core-updatesLudovic Courtès 2016-09-28gnu: Add and use gettext-minimal.Alex Kost * gnu/packages/gettext.scm (gnu-gettext): Rename to... (gettext-minimal): ... this. Adjust synopsis and description. (gnu-gettext): Inherit from it. (po4a): Use 'gettext-minimal' instead of 'gnu-gettext'. * gnu/packages/acl.scm: Likewise. * gnu/packages/admin.scm: Likewise. * gnu/packages/apl.scm: Likewise. * gnu/packages/attr.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/base.scm: Likewise. * gnu/packages/cdrom.scm: Likewise. * gnu/packages/commencement.scm: Likewise. * gnu/packages/crypto.scm: Likewise. * gnu/packages/databases.scm: Likewise. * gnu/packages/disk.scm: Likewise. * gnu/packages/documentation.scm: Likewise. * gnu/packages/education.scm: Likewise. * gnu/packages/engineering.scm: Likewise. * gnu/packages/enlightenment.scm: Likewise. * gnu/packages/fcitx.scm: Likewise. * gnu/packages/fontutils.scm: Likewise. * gnu/packages/freedesktop.scm: Likewise. * gnu/packages/games.scm: Likewise. * gnu/packages/gkrellm.scm: Likewise. * gnu/packages/glib.scm: Likewise. * gnu/packages/gnome.scm: Likewise. * gnu/packages/grub.scm: Likewise. * gnu/packages/gtk.scm: Likewise. * gnu/packages/guile.scm: Likewise. * gnu/packages/ibus.scm: Likewise. * gnu/packages/irc.scm: Likewise. * gnu/packages/iso-codes.scm: Likewise. * gnu/packages/kde-frameworks.scm: Likewise. * gnu/packages/kodi.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/man.scm: Likewise. * gnu/packages/maths.scm: Likewise. * gnu/packages/mono.scm: Likewise. * gnu/packages/mp3.scm: Likewise. * gnu/packages/music.scm: Likewise. * gnu/packages/nano.scm: Likewise. * gnu/packages/networking.scm: Likewise. * gnu/packages/package-management.scm: Likewise. * gnu/packages/pdf.scm: Likewise. * gnu/packages/sawfish.scm: Likewise. * gnu/packages/statistics.scm: Likewise. * gnu/packages/terminals.scm: Likewise. * gnu/packages/version-control.scm: Likewise. * gnu/packages/vpn.scm: Likewise. * gnu/packages/w3m.scm: Likewise. * gnu/packages/webkit.scm: Likewise. * gnu/packages/wicd.scm: Likewise. * gnu/packages/wine.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/packages/xorg.scm: Likewise. 2016-09-28gnu: opendht: Propagate msgpack.Lukas Gradl * gnu/packages/crypto.scm (opendht)[inputs]: Remove msgpack. [propagated-inputs]: Add it. Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2016-09-28gnu: encfs: Update to 1.9.1.Tobias Geerinckx-Rice * gnu/packages/crypto.scm (encfs): Update to 1.9.1. 2016-09-14gnu: Remove unused, obsolete, private rlog.Tobias Geerinckx-Rice * gnu/packages/crypto.scm (rlog): Remove variable. 2016-09-14gnu: encfs: Update to 1.9.Tobias Geerinckx-Rice * gnu/packages/crypto.scm (encfs): Update to 1.9. [source]: Remove bundled TinyXML2 in a snippet. [build-system]: Switch to cmake-build-system. [arguments]: Remove autotools-related phases and configure-flags. Don't use bundled TinyXML2. Move under *inputs. [native-inputs]: Remove autoconf, automake, libtool, and pkg-config. Add expect. [inputs]: Remove boost and rlog, while adding attr and tinyxml2. [license]: Add expat licence for new easylogging++.h file. 2016-09-09gnu: Fix wrong import of '(gnu packages zsh)'.宋文武 * gnu/packages/crypot.scm: Change import of '(gnu packages zsh)' to '(gnu packages shells)'. 2016-09-09gnu: Add Tomb.Eric Bavier * gnu/packages/crypto.scm (tomb): New variable. 2016-09-06gnu: Add eschalot.ng0 * gnu/packages/crypto.scm (eschalot): New variable. Signed-off-by: Leo Famulari <leo@famulari.name> 2016-08-29gnu: keyutils: Fix typo in synopsis.Tobias Geerinckx-Rice * gnu/packages/crypto.scm (keyutils)[synopsis]: Fix typo. 2016-08-28gnu: Add keyutils.Tobias Geerinckx-Rice * gnu/packages/crypto.scm (keyutils): New variable. 2016-08-24gnu: signify: Update to 19.Leo Famulari * gnu/packages/crypto.scm (signify): Update to 19. 2016-07-16gnu: Add encfs.Tobias Geerinckx-Rice * gnu/packages/crypto.scm (rlog, encfs): New variables. Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2016-07-15gnu: Import (guix licenses) with #:prefix.Tobias Geerinckx-Rice * gnu/packages/crypto.scm: Add 'license:' #:prefix for (guix licenses). Signed-off-by: Andreas Enge <andreas@enge.fr> 2016-06-25gnu: Add opendht.Lukas Gradl * gnu/packages/crypto.scm (opendht): New variable. Signed-off-by: Leo Famulari <leo@famulari.name> 2016-06-11gnu: signify: Update to 18.Leo Famulari * gnu/packages/crypto.scm (signify): Update to 18. 2016-05-29gnu: libsodium: Update to 1.0.10.Leo Famulari * gnu/packages/crypto.scm (libsodium): Update to 1.0.10. 2016-05-17gnu: Add signify.Leo Famulari * gnu/packages/crypto.scm (signify): New variable.