GNU bug report logs -
#31462
[PATCH] profiles: Add hook to generate "gschemas.compiled".
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31462 in the body.
You can then email your comments to 31462 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#31462
; Package
guix-patches
.
(Tue, 15 May 2018 12:50:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Danny Milosavljevic <dannym <at> scratchpost.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 15 May 2018 12:50:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* guix/profiles.scm (glib-schemas): New procedure.
(%default-profile-hooks): Add it.
---
guix/profiles.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index dca247976..300324362 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -843,6 +843,57 @@ MANIFEST. Single-file bundles are required by programs such as Git and Lynx."
#:local-build? #t
#:substitutable? #f))
+(define (glib-schemas manifest)
+ "Return a derivation that unions all schemas from manifest entries and
+creates the Glib 'gschemas.compiled' file."
+ (define glib ; lazy reference
+ (module-ref (resolve-interface '(gnu packages glib)) 'glib))
+
+ (mlet %store-monad ((%glib (manifest-lookup-package manifest "glib"))
+ ;; XXX: Can't use glib-compile-schemas corresponding
+ ;; to the glib referenced by 'manifest'. Because
+ ;; '%glib' can be either a package or store path, and
+ ;; there's no way to get the "bin" output for the later.
+ (glib-compile-schemas
+ -> #~(string-append #+glib:bin
+ "/bin/glib-compile-schemas")))
+
+ (define build
+ (with-imported-modules '((guix build utils)
+ (guix build union)
+ (guix build profiles)
+ (guix search-paths)
+ (guix records))
+ #~(begin
+ (use-modules (guix build utils)
+ (guix build union)
+ (guix build profiles)
+ (srfi srfi-26))
+
+ (let* ((destdir (string-append #$output "/share/glib-2.0/schemas"))
+ (schemadirs (filter file-exists?
+ (map (cut string-append <> "/share/glib-2.0/schemas")
+ '#$(manifest-inputs manifest)))))
+
+ ;; Union all the schemas.
+ (mkdir-p (string-append #$output "/share/glib-2.0"))
+ (union-build destdir schemadirs
+ #:log-port (%make-void-port "w"))
+
+ (let ((dir destdir))
+ (when (file-is-directory? dir)
+ (ensure-writable-directory dir)
+ (invoke #+glib-compile-schemas
+ (string-append "--targetdir=" dir)
+ dir)))))))
+
+ ;; Don't run the hook when there's nothing to do.
+ (if %glib
+ (gexp->derivation "glib-schemas" build
+ #:local-build? #t
+ #:substitutable? #f)
+ (return #f))))
+
(define (gtk-icon-themes manifest)
"Return a derivation that unions all icon themes from manifest entries and
creates the GTK+ 'icon-theme.cache' file for each theme."
@@ -1198,6 +1249,7 @@ the entries in MANIFEST."
fonts-dir-file
ghc-package-cache-file
ca-certificate-bundle
+ glib-schemas
gtk-icon-themes
gtk-im-modules
xdg-desktop-database
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31462
; Package
guix-patches
.
(Thu, 17 May 2018 08:58:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 31462 <at> debbugs.gnu.org (full text, mbox):
Hello!
Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
> * guix/profiles.scm (glib-schemas): New procedure.
> (%default-profile-hooks): Add it.
[...]
> + (mlet %store-monad ((%glib (manifest-lookup-package manifest "glib"))
> + ;; XXX: Can't use glib-compile-schemas corresponding
> + ;; to the glib referenced by 'manifest'. Because
> + ;; '%glib' can be either a package or store path, and
> + ;; there's no way to get the "bin" output for the later.
> + (glib-compile-schemas
> + -> #~(string-append #+glib:bin
> + "/bin/glib-compile-schemas")))
Oh right, too bad.
宋文武, any comments, since you wrote the existing hooks in that area?
Otherwise LGTM, thank you Danny!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31462
; Package
guix-patches
.
(Thu, 17 May 2018 11:56:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 31462 <at> debbugs.gnu.org (full text, mbox):
ludo <at> gnu.org (Ludovic Courtès) writes:
> Hello!
>
> Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
>
>> * guix/profiles.scm (glib-schemas): New procedure.
>> (%default-profile-hooks): Add it.
>
> [...]
>
>> + (mlet %store-monad ((%glib (manifest-lookup-package manifest "glib"))
>> + ;; XXX: Can't use glib-compile-schemas corresponding
>> + ;; to the glib referenced by 'manifest'. Because
>> + ;; '%glib' can be either a package or store path, and
>> + ;; there's no way to get the "bin" output for the later.
>> + (glib-compile-schemas
>> + -> #~(string-append #+glib:bin
>> + "/bin/glib-compile-schemas")))
>
> Oh right, too bad.
>
> 宋文武, any comments, since you wrote the existing hooks in that area?
>
Well, I think this situation is not changed. Our profile hooks
currently use latest version of zlib, gzip, guile-gdbm-ffi, gtk+, ghc
and etc. We'd like to use packages from the manifest to avoid
additional downloads, but it's not awlays possible...
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31462
; Package
guix-patches
.
(Thu, 17 May 2018 15:58:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 31462 <at> debbugs.gnu.org (full text, mbox):
Hey,
iyzsong <at> member.fsf.org (宋文武) skribis:
> ludo <at> gnu.org (Ludovic Courtès) writes:
>
>> Hello!
>>
>> Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
>>
>>> * guix/profiles.scm (glib-schemas): New procedure.
>>> (%default-profile-hooks): Add it.
>>
>> [...]
>>
>>> + (mlet %store-monad ((%glib (manifest-lookup-package manifest "glib"))
>>> + ;; XXX: Can't use glib-compile-schemas corresponding
>>> + ;; to the glib referenced by 'manifest'. Because
>>> + ;; '%glib' can be either a package or store path, and
>>> + ;; there's no way to get the "bin" output for the later.
>>> + (glib-compile-schemas
>>> + -> #~(string-append #+glib:bin
>>> + "/bin/glib-compile-schemas")))
>>
>> Oh right, too bad.
>>
>> 宋文武, any comments, since you wrote the existing hooks in that area?
>>
>
> Well, I think this situation is not changed. Our profile hooks
> currently use latest version of zlib, gzip, guile-gdbm-ffi, gtk+, ghc
> and etc. We'd like to use packages from the manifest to avoid
> additional downloads, but it's not awlays possible...
Right, so that’s not new.
You’re OK with the rest of the patch?
Thanks for your quick reply!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31462
; Package
guix-patches
.
(Sat, 19 May 2018 04:35:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 31462 <at> debbugs.gnu.org (full text, mbox):
ludo <at> gnu.org (Ludovic Courtès) writes:
> Hey,
>
> iyzsong <at> member.fsf.org (宋文武) skribis:
>
>> ludo <at> gnu.org (Ludovic Courtès) writes:
>>
>>> Hello!
>>>
>>> Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
>>>
>>>> * guix/profiles.scm (glib-schemas): New procedure.
>>>> (%default-profile-hooks): Add it.
>>>
>>> [...]
>>>
>>>> + (mlet %store-monad ((%glib (manifest-lookup-package manifest "glib"))
>>>> + ;; XXX: Can't use glib-compile-schemas corresponding
>>>> + ;; to the glib referenced by 'manifest'. Because
>>>> + ;; '%glib' can be either a package or store path, and
>>>> + ;; there's no way to get the "bin" output for the later.
>>>> + (glib-compile-schemas
>>>> + -> #~(string-append #+glib:bin
>>>> + "/bin/glib-compile-schemas")))
>>>
>>> Oh right, too bad.
>>>
>>> 宋文武, any comments, since you wrote the existing hooks in that area?
>>>
>>
>> Well, I think this situation is not changed. Our profile hooks
>> currently use latest version of zlib, gzip, guile-gdbm-ffi, gtk+, ghc
>> and etc. We'd like to use packages from the manifest to avoid
>> additional downloads, but it's not awlays possible...
>
> Right, so that’s not new.
>
> You’re OK with the rest of the patch?
>
Yes, it looks good to me, and it's useful for the 'dconf-editor'
package, which can edit the dconf database with the support from
available gsetting schemas.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31462
; Package
guix-patches
.
(Sun, 20 May 2018 20:34:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 31462 <at> debbugs.gnu.org (full text, mbox):
iyzsong <at> member.fsf.org (宋文武) skribis:
> ludo <at> gnu.org (Ludovic Courtès) writes:
>
>> Hey,
>>
>> iyzsong <at> member.fsf.org (宋文武) skribis:
>>
>>> ludo <at> gnu.org (Ludovic Courtès) writes:
>>>
>>>> Hello!
>>>>
>>>> Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
>>>>
>>>>> * guix/profiles.scm (glib-schemas): New procedure.
>>>>> (%default-profile-hooks): Add it.
>>>>
>>>> [...]
>>>>
>>>>> + (mlet %store-monad ((%glib (manifest-lookup-package manifest "glib"))
>>>>> + ;; XXX: Can't use glib-compile-schemas corresponding
>>>>> + ;; to the glib referenced by 'manifest'. Because
>>>>> + ;; '%glib' can be either a package or store path, and
>>>>> + ;; there's no way to get the "bin" output for the later.
>>>>> + (glib-compile-schemas
>>>>> + -> #~(string-append #+glib:bin
>>>>> + "/bin/glib-compile-schemas")))
>>>>
>>>> Oh right, too bad.
>>>>
>>>> 宋文武, any comments, since you wrote the existing hooks in that area?
>>>>
>>>
>>> Well, I think this situation is not changed. Our profile hooks
>>> currently use latest version of zlib, gzip, guile-gdbm-ffi, gtk+, ghc
>>> and etc. We'd like to use packages from the manifest to avoid
>>> additional downloads, but it's not awlays possible...
>>
>> Right, so that’s not new.
>>
>> You’re OK with the rest of the patch?
>>
>
> Yes, it looks good to me, and it's useful for the 'dconf-editor'
> package, which can edit the dconf database with the support from
> available gsetting schemas.
Alright, good to know. So Danny, go ahead! :-)
Thanks,
Ludo’.
bug closed, send any further explanations to
31462 <at> debbugs.gnu.org and Danny Milosavljevic <dannym <at> scratchpost.org>
Request was from
Danny Milosavljevic <dannym <at> scratchpost.org>
to
control <at> debbugs.gnu.org
.
(Mon, 21 May 2018 07:58:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31462
; Package
guix-patches
.
(Fri, 25 May 2018 09:17:03 GMT)
Full text and
rfc822 format available.
Message #25 received at 31462 <at> debbugs.gnu.org (full text, mbox):
Hi Danny,
Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
> * guix/profiles.scm (glib-schemas): New procedure.
> (%default-profile-hooks): Add it.
I just tried:
guix environment --ad-hoc libreoffice -- libreoffice
which at some point shows:
No schema files found: doing nothing.
and it doesn’t fix the file open dialog crash reported at
<https://bugs.gnu.org/30642>. Any idea?
Thanks,
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 22 Jun 2018 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 4 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.