* 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
* Re: How to use "every"?
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
0 siblings, 1 reply; 3+ messages in thread
From: Marius Bakke @ 2016-09-09 13:10 UTC (permalink / raw)
To: Danny Milosavljevic, Guix-devel
Danny Milosavljevic <dannym@scratchpost.org> writes:
> 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 (?).
I think when setting #:modules, you also have to specify the
"expected" ones, i.e. it will override the defaults rather than append.
So argument would be:
#:modules ((srfi srfi-1)
(guix build gnu-build-system)
(guix build utils))
But I am pretty new to Guile and Guix, so take it with a grain of salt.
HTH!
Marius
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to use "every"?
2016-09-09 13:10 ` Marius Bakke
@ 2016-09-09 19:12 ` Alex Kost
0 siblings, 0 replies; 3+ messages in thread
From: Alex Kost @ 2016-09-09 19:12 UTC (permalink / raw)
To: Marius Bakke; +Cc: Guix-devel
Marius Bakke (2016-09-09 14:10 +0100) wrote:
> Danny Milosavljevic <dannym@scratchpost.org> writes:
>
>> 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 (?).
>
> I think when setting #:modules, you also have to specify the
> "expected" ones, i.e. it will override the defaults rather than append.
Yes, you are absolutely right.
Danny, if you look at 'gnu-build' procedure in (guix build-system gnu)
module, you can see that the default value for 'modules' keyword is
'%default-modules' defined earlier in this module, so as Marius wrote,
when you specify #:modules argument in a package declaration, you have
to specify these default modules along with the additional ones.
> So argument would be:
>
> #:modules ((srfi srfi-1)
> (guix build gnu-build-system)
> (guix build utils))
>
> But I am pretty new to Guile and Guix, so take it with a grain of salt.
--
Alex
^ 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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.