unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* How to use "every"?
@ 2016-09-09 13:01 Danny Milosavljevic
  2016-09-09 13:10 ` Marius Bakke
  0 siblings, 1 reply; 3+ messages in thread
From: Danny Milosavljevic @ 2016-09-09 13:01 UTC (permalink / raw)
  To: Guix-devel

Hi,

how do I use "every" in a guix package declaration?

When I add #:modules (sfri sfri-1) I get a message that guix-build is undefined (?).

;; FIXME import "every" somehow
(define-public pypy3.3
  (package
    (name "pypy3.3")
    (version "5.2.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://bitbucket.org/pypy/pypy/downloads/"
                                  "pypy3.3-v" version "-alpha1-src.tar.bz2"))
              (sha256
               (base32
                "09hllsxds9ck22m92gy0ii9rwgqdp1d51c2bjrs15sl2ih42yk1l"))
              (file-name (string-append "pypy3.3-v"
                                        version
                                        "-alpha1-src.tar.bz2"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("python-2" ,python-2)
       ("pkg-config" ,pkg-config)))
    (inputs
     `(("libffi" ,libffi)
       ("zlib" ,zlib)
       ("ncurses" ,ncurses)
       ("openssl" ,openssl)
       ("expat" ,expat)
       ("bzip2" ,bzip2)
       ("sqlite" ,sqlite)
       ("gdbm" ,gdbm)
       ("tk" ,tk)
       ("xz" ,xz))) ; lzma
; TODO libgc for the untranslated tests
; TODO fix "cc" references (use "--cc" option)
    (arguments
      `( ;#:modules ((srfi srfi-1)
          ;         (guix build utils))
        #:phases (modify-phases %standard-phases
         (delete 'configure)
         (replace 'build
            (lambda* (#:key inputs #:allow-other-keys)
              ;; distutils is used to verify extensions.
              ;; However, distutils build_ext uses a compiler that can only
              ;; be specified via CC environment variable.
              (setenv "CC" "gcc")
              (substitute* '("rpython/rtyper/lltypesystem/ll2ctypes.py")
                ;; Python ctypes.util.find_library documentation specifies
                ;; that it returns a file path, however all the actual
                ;; implementation cases return a SONAME.
                ;; Pypy expects it to return a file path.
                ;; Therefore, hotpatch ctypes.util to disable SONAME
                ;; determination.
                (("    import ctypes.util") "    import ctypes.util
    ctypes.util._get_soname = lambda x: x"))
              ;; FIXME just use main Makefile
              (chdir "pypy/goal") ; FIXME error checking
              (and
                (zero? (system* "python" "../../rpython/bin/rpython"
                                "-Ojit" "targetpypystandalone")))))
         (replace 'check
            (lambda* (#:key outputs #:allow-other-keys)
              (every zero?
                ;; TODO: " ./pypy/test_all.py"
                ;;       "lib-python/2.7.0/test/test_complex.py"
                ;;       "--pypy=foobar"
                (list (system* "mkdir" "/tmp/pytest")
                      (system* "python" "testrunner/runner.py"
                               "--config=pypy/pytest-A.cfg"
                               "--config=pypy/pytest-A.py"
                               "--root=pypy"
                               "--timeout=3600") ; --config=~/machine-A_cfg.py
                      (system* "python" "pypy/test_all.py"
                               "--pypy=pypy/goal/pypy-c" "--timeout=3600"
                               "lib-python")
                      (system* "python" "pypy/test_all.py"
                               "--pypy=pypy/goal/pypy-c"
                               "pypy/module/pypyjit/test")
                      (system* "pypy/goal/pypy-c" "pypy/test_all.py"
                               "pypy/module/pypyjit/test_pypy_c"))))))
         (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              (chdir "../tool/release")
              (zero? (system* "./package.py pypy-VER-PLATFORM")))))))
    (home-page "http://www.pypy.org/")
    (synopsis "Python 3.3 JIT")
    (description "Python 3.3 JIT.")
    (license (list license:expat
                   license:psfl
                   license:asl2.0
                   license:gpl2+
                   license:bsd-2
                   license:bsd-3
                   (license:non-copyleft
                    "http://www.unicode.org/copyright.html"))))

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-09 19:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-09 13:01 How to use "every"? Danny Milosavljevic
2016-09-09 13:10 ` Marius Bakke
2016-09-09 19:12   ` Alex Kost

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).