* [PATCH 1/2] gnu: itstool: Wrap with PTYHONPATH.
@ 2015-08-20 8:41 宋文武
2015-08-20 8:41 ` [PATCH 2/2] gnu: Add d-feet 宋文武
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: 宋文武 @ 2015-08-20 8:41 UTC (permalink / raw)
To: guix-devel
* gnu/packages/glib.scm (itstool): Change 'propagated-inputs' to 'inputs'.
[arguments]: New field.
---
gnu/packages/glib.scm | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 88c61b6..59d64e9 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -315,10 +315,18 @@ The intltool collection can be used to do these things:
(base32
"0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
(build-system gnu-build-system)
- (propagated-inputs
+ (inputs
`(("libxml2" ,libxml2)
("python2-libxml2" ,python2-libxml2)
("python-2" ,python-2)))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after
+ 'install 'wrap-program
+ (lambda _
+ (wrap-program (string-append %output "/bin/itstool")
+ `("PYTHONPATH" = (,(getenv "PYTHONPATH")))))))))
(home-page "http://www.itstool.org")
(synopsis "Tool to translate XML documents with PO files")
(description
--
2.4.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] gnu: Add d-feet.
2015-08-20 8:41 [PATCH 1/2] gnu: itstool: Wrap with PTYHONPATH 宋文武
@ 2015-08-20 8:41 ` 宋文武
2015-08-22 2:05 ` Mark H Weaver
2015-08-22 5:32 ` Mark H Weaver
2015-08-20 8:47 ` [PATCH 1/2] gnu: itstool: Wrap with PTYHONPATH 宋文武
2015-08-22 2:00 ` Mark H Weaver
2 siblings, 2 replies; 7+ messages in thread
From: 宋文武 @ 2015-08-20 8:41 UTC (permalink / raw)
To: guix-devel
* gnu/packages/gnome.scm (d-feet): New variable.
---
gnu/packages/gnome.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 1c31be2..393e983 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3302,3 +3302,58 @@ work and the interface is well tested.")
"Epiphany is a GNOME web browser targeted at non-technical users. Its
principles are simplicity and standards compliance.")
(license license:gpl2+)))
+
+(define-public d-feet
+ (package
+ (name "d-feet")
+ (version "0.3.10")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0nb31bvwnj7pcpm85g8bvgjc6s5kbqy8g4qp7pzqf8w6rdgxzw48"))))
+ (build-system glib-or-gtk-build-system)
+ (arguments
+ '(#:out-of-source? #f ; tests need to run in the source directory.
+ #:phases
+ (modify-phases %standard-phases
+ (add-before
+ 'check 'pre-check
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; The test suite requires a running X server.
+ (system (format #f "~a/bin/Xvfb :1 &"
+ (assco-ref inputs "xorg-server")))
+ (setenv "DISPLAY" ":1")
+ ;; Don't fail on missing '/etc/machine-id'.
+ (setenv "DBUS_FATAL_WARNINGS" "0")
+ ;; tests.py and window.py don't meet E402:
+ ;; E402 module level import not at top of file
+ (substitute* "src/tests/Makefile"
+ (("--ignore=E123") "--ignore=E123,E402"))))
+ (add-after
+ 'install 'wrap-program
+ (lambda _
+ (wrap-program (string-append %output "/bin/d-feet")
+ `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
+ `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))))))
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("itstool" ,itstool)
+ ("pkg-config" ,pkg-config)
+ ("python-pep8" ,python-pep8)
+ ("xmllint" ,libxml2)
+ ("xorg-server" ,xorg-server)))
+ (inputs
+ `(("gobject-introspection" ,gobject-introspection)
+ ("gtk+" ,gtk+)
+ ("python" ,python-wrapper)
+ ("python-pygobject" ,python-pygobject)))
+ (home-page "https://wiki.gnome.org/Apps/DFeet")
+ (synopsis "D-Bus debugger")
+ (description
+ "D-Feet is a D-Bus debugger, which can be used to inspect D-Bus interfaces
+of running programs and invoke methods on those interfaces.")
+ (license license:gpl2+)))
--
2.4.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] gnu: itstool: Wrap with PTYHONPATH.
2015-08-20 8:41 [PATCH 1/2] gnu: itstool: Wrap with PTYHONPATH 宋文武
2015-08-20 8:41 ` [PATCH 2/2] gnu: Add d-feet 宋文武
@ 2015-08-20 8:47 ` 宋文武
2015-08-22 2:00 ` Mark H Weaver
2 siblings, 0 replies; 7+ messages in thread
From: 宋文武 @ 2015-08-20 8:47 UTC (permalink / raw)
To: guix-devel
> * gnu/packages/glib.scm (itstool): Change 'propagated-inputs' to 'inputs'.
> [arguments]: New field.
> ---
> gnu/packages/glib.scm | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
> index 88c61b6..59d64e9 100644
> --- a/gnu/packages/glib.scm
> +++ b/gnu/packages/glib.scm
> @@ -315,10 +315,18 @@ The intltool collection can be used to do these things:
> (base32
> "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
> (build-system gnu-build-system)
> - (propagated-inputs
> + (inputs
> `(("libxml2" ,libxml2)
> ("python2-libxml2" ,python2-libxml2)
> ("python-2" ,python-2)))
> + (arguments
> + '(#:phases
> + (modify-phases %standard-phases
> + (add-after
> + 'install 'wrap-program
> + (lambda _
> + (wrap-program (string-append %output "/bin/itstool")
> + `("PYTHONPATH" = (,(getenv "PYTHONPATH")))))))))
> (home-page "http://www.itstool.org")
> (synopsis "Tool to translate XML documents with PO files")
> (description
> --
> 2.4.3
Don't propagate python2 things, so that packages using itstool could
use python3. (eg: d-feet and totem?).
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] gnu: itstool: Wrap with PTYHONPATH.
2015-08-20 8:41 [PATCH 1/2] gnu: itstool: Wrap with PTYHONPATH 宋文武
2015-08-20 8:41 ` [PATCH 2/2] gnu: Add d-feet 宋文武
2015-08-20 8:47 ` [PATCH 1/2] gnu: itstool: Wrap with PTYHONPATH 宋文武
@ 2015-08-22 2:00 ` Mark H Weaver
2015-08-22 5:44 ` 宋文武
2 siblings, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2015-08-22 2:00 UTC (permalink / raw)
To: 宋文武; +Cc: guix-devel
宋文武 <iyzsong@gmail.com> writes:
> gnu: itstool: Wrap with PTYHONPATH.
s/PTYHONPATH/PYTHONPATH/
> * gnu/packages/glib.scm (itstool): Change 'propagated-inputs' to 'inputs'.
> [arguments]: New field.
> ---
> gnu/packages/glib.scm | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
> index 88c61b6..59d64e9 100644
> --- a/gnu/packages/glib.scm
> +++ b/gnu/packages/glib.scm
> @@ -315,10 +315,18 @@ The intltool collection can be used to do these things:
> (base32
> "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
> (build-system gnu-build-system)
> - (propagated-inputs
> + (inputs
> `(("libxml2" ,libxml2)
> ("python2-libxml2" ,python2-libxml2)
> ("python-2" ,python-2)))
> + (arguments
> + '(#:phases
> + (modify-phases %standard-phases
> + (add-after
> + 'install 'wrap-program
> + (lambda _
> + (wrap-program (string-append %output "/bin/itstool")
In phase procedures, it's probably better to accept the 'outputs'
keyword argument to the phase procedure and use that.
> + `("PYTHONPATH" = (,(getenv "PYTHONPATH")))))))))
> (home-page "http://www.itstool.org")
> (synopsis "Tool to translate XML documents with PO files")
> (description
Otherwise it looks good to me.
Thanks,
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] gnu: Add d-feet.
2015-08-20 8:41 ` [PATCH 2/2] gnu: Add d-feet 宋文武
@ 2015-08-22 2:05 ` Mark H Weaver
2015-08-22 5:32 ` Mark H Weaver
1 sibling, 0 replies; 7+ messages in thread
From: Mark H Weaver @ 2015-08-22 2:05 UTC (permalink / raw)
To: 宋文武; +Cc: guix-devel
宋文武 <iyzsong@gmail.com> writes:
> * gnu/packages/gnome.scm (d-feet): New variable.
> ---
> gnu/packages/gnome.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 1c31be2..393e983 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -3302,3 +3302,58 @@ work and the interface is well tested.")
> "Epiphany is a GNOME web browser targeted at non-technical users. Its
> principles are simplicity and standards compliance.")
> (license license:gpl2+)))
> +
> +(define-public d-feet
> + (package
> + (name "d-feet")
> + (version "0.3.10")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "mirror://gnome/sources/" name "/"
> + (version-major+minor version) "/"
> + name "-" version ".tar.xz"))
> + (sha256
> + (base32
> + "0nb31bvwnj7pcpm85g8bvgjc6s5kbqy8g4qp7pzqf8w6rdgxzw48"))))
> + (build-system glib-or-gtk-build-system)
> + (arguments
> + '(#:out-of-source? #f ; tests need to run in the source directory.
> + #:phases
> + (modify-phases %standard-phases
> + (add-before
> + 'check 'pre-check
> + (lambda* (#:key inputs #:allow-other-keys)
> + ;; The test suite requires a running X server.
> + (system (format #f "~a/bin/Xvfb :1 &"
> + (assco-ref inputs "xorg-server")))
Did you test this? I don't see how this could work, since you mispelled
'assoc-ref'. Anyway, I guess that Xvfb will be in $PATH, so you can
probably just launch it as "Xvfb". If so, you could avoid the 'format'
and change the 'lambda*' to just "lambda _"
> + (setenv "DISPLAY" ":1")
> + ;; Don't fail on missing '/etc/machine-id'.
> + (setenv "DBUS_FATAL_WARNINGS" "0")
> + ;; tests.py and window.py don't meet E402:
> + ;; E402 module level import not at top of file
> + (substitute* "src/tests/Makefile"
> + (("--ignore=E123") "--ignore=E123,E402"))))
> + (add-after
> + 'install 'wrap-program
> + (lambda _
> + (wrap-program (string-append %output "/bin/d-feet")
> + `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
> + `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))))))
> + (native-inputs
> + `(("intltool" ,intltool)
> + ("itstool" ,itstool)
> + ("pkg-config" ,pkg-config)
> + ("python-pep8" ,python-pep8)
> + ("xmllint" ,libxml2)
> + ("xorg-server" ,xorg-server)))
> + (inputs
> + `(("gobject-introspection" ,gobject-introspection)
> + ("gtk+" ,gtk+)
> + ("python" ,python-wrapper)
> + ("python-pygobject" ,python-pygobject)))
> + (home-page "https://wiki.gnome.org/Apps/DFeet")
> + (synopsis "D-Bus debugger")
> + (description
> + "D-Feet is a D-Bus debugger, which can be used to inspect D-Bus interfaces
> +of running programs and invoke methods on those interfaces.")
> + (license license:gpl2+)))
Otherwise it looks good to me.
Thanks,
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] gnu: Add d-feet.
2015-08-20 8:41 ` [PATCH 2/2] gnu: Add d-feet 宋文武
2015-08-22 2:05 ` Mark H Weaver
@ 2015-08-22 5:32 ` Mark H Weaver
1 sibling, 0 replies; 7+ messages in thread
From: Mark H Weaver @ 2015-08-22 5:32 UTC (permalink / raw)
To: 宋文武; +Cc: guix-devel
One more thing:
宋文武 <iyzsong@gmail.com> writes:
> + (modify-phases %standard-phases
> + (add-before
> + 'check 'pre-check
> + (lambda* (#:key inputs #:allow-other-keys)
> + ;; The test suite requires a running X server.
> + (system (format #f "~a/bin/Xvfb :1 &"
> + (assco-ref inputs "xorg-server")))
> + (setenv "DISPLAY" ":1")
> + ;; Don't fail on missing '/etc/machine-id'.
> + (setenv "DBUS_FATAL_WARNINGS" "0")
> + ;; tests.py and window.py don't meet E402:
> + ;; E402 module level import not at top of file
> + (substitute* "src/tests/Makefile"
> + (("--ignore=E123") "--ignore=E123,E402"))))
I forgot to mention that you should add #t here, since phase procedures
are supposed to return a boolean, but the return value of 'substitute*'
is unspecified.
Thanks,
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] gnu: itstool: Wrap with PTYHONPATH.
2015-08-22 2:00 ` Mark H Weaver
@ 2015-08-22 5:44 ` 宋文武
0 siblings, 0 replies; 7+ messages in thread
From: 宋文武 @ 2015-08-22 5:44 UTC (permalink / raw)
To: Mark H Weaver; +Cc: guix-devel
Mark H Weaver <mhw@netris.org> writes:
> 宋文武 <iyzsong@gmail.com> writes:
>
>> gnu: itstool: Wrap with PTYHONPATH.
>
> s/PTYHONPATH/PYTHONPATH/
oops, thanks!
>
>> * gnu/packages/glib.scm (itstool): Change 'propagated-inputs' to 'inputs'.
>> [arguments]: New field.
>> ---
>> gnu/packages/glib.scm | 10 +++++++++-
>> 1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
>> index 88c61b6..59d64e9 100644
>> --- a/gnu/packages/glib.scm
>> +++ b/gnu/packages/glib.scm
>> @@ -315,10 +315,18 @@ The intltool collection can be used to do these things:
>> (base32
>> "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
>> (build-system gnu-build-system)
>> - (propagated-inputs
>> + (inputs
>> `(("libxml2" ,libxml2)
>> ("python2-libxml2" ,python2-libxml2)
>> ("python-2" ,python-2)))
>> + (arguments
>> + '(#:phases
>> + (modify-phases %standard-phases
>> + (add-after
>> + 'install 'wrap-program
>> + (lambda _
>> + (wrap-program (string-append %output "/bin/itstool")
>
> In phase procedures, it's probably better to accept the 'outputs'
> keyword argument to the phase procedure and use that.
ok.
>
>> + `("PYTHONPATH" = (,(getenv "PYTHONPATH")))))))))
>> (home-page "http://www.itstool.org")
>> (synopsis "Tool to translate XML documents with PO files")
>> (description
>
> Otherwise it looks good to me.
Pushed, thanks for review!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-08-22 5:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-20 8:41 [PATCH 1/2] gnu: itstool: Wrap with PTYHONPATH 宋文武
2015-08-20 8:41 ` [PATCH 2/2] gnu: Add d-feet 宋文武
2015-08-22 2:05 ` Mark H Weaver
2015-08-22 5:32 ` Mark H Weaver
2015-08-20 8:47 ` [PATCH 1/2] gnu: itstool: Wrap with PTYHONPATH 宋文武
2015-08-22 2:00 ` Mark H Weaver
2015-08-22 5:44 ` 宋文武
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).