Re: [PATCH 1/2] gnu: Add qtkeychain.

2015-11-12 Thread Ludovic Courtès
Efraim Flashner  skribis:

> On Tue, 10 Nov 2015 19:07:20 +0100
> l...@gnu.org (Ludovic Courtès) wrote:
>
>> Efraim Flashner  skribis:
>> 
>> > On Thu, 05 Nov 2015 22:28:42 +0100
>> > l...@gnu.org (Ludovic Courtès) wrote:
>> >  
>> >> Efraim Flashner  skribis:
>> >>   
>> >> > * gnu/packages/qt.scm (qtkeychain): New variable.
>> >> 
>> >> [...]
>> >>   
>> >> > +   (modify-phases
>> >> > + %standard-phases
>> >> 
>> >> ‘%standard-phases’ goes on the previous line.
>> >>   
>> >> > + (add-before
>> >> > +  'configure 'set-qt-trans-dir
>> >> > +   (lambda _
>> >> > + (substitute* "CMakeLists.txt"
>> >> > +  (("\\$\\{qt_translations_dir\\}")
>> >> > +
>> >> > "${CMAKE_INSTALL_PREFIX}/share/qtkeychain/translations")))
>> >> 
>> >> Is Qt able to find translations installed there?  Is some environment
>> >> variable needed to tell it where to look for them?  
>> >
>> > I don't really know.  
>> 
>> Could you check by running it with a non-English locale listed that
>> appears in the ‘translations’ directory?

[...]

> It works! I did `export LANG=de` and then
> ran /./gnu/store/...owncloud/bin/owncloud, and I got a German popup telling
> me there was no associated keychain and I had to enter the password myself.

Good!

So I think, with the tiny stylistic issues I reported fixed, you
can push.

Thank you for your patience!

Ludo’.



Re: [PATCH 1/2] gnu: Add qtkeychain.

2015-11-12 Thread Efraim Flashner
On Tue, 10 Nov 2015 19:07:20 +0100
l...@gnu.org (Ludovic Courtès) wrote:

> Efraim Flashner  skribis:
> 
> > On Thu, 05 Nov 2015 22:28:42 +0100
> > l...@gnu.org (Ludovic Courtès) wrote:
> >  
> >> Efraim Flashner  skribis:
> >>   
> >> > * gnu/packages/qt.scm (qtkeychain): New variable.
> >> 
> >> [...]
> >>   
> >> > +   (modify-phases
> >> > + %standard-phases
> >> 
> >> ‘%standard-phases’ goes on the previous line.
> >>   
> >> > + (add-before
> >> > +  'configure 'set-qt-trans-dir
> >> > +   (lambda _
> >> > + (substitute* "CMakeLists.txt"
> >> > +  (("\\$\\{qt_translations_dir\\}")
> >> > +
> >> > "${CMAKE_INSTALL_PREFIX}/share/qtkeychain/translations")))
> >> 
> >> Is Qt able to find translations installed there?  Is some environment
> >> variable needed to tell it where to look for them?  
> >
> > I don't really know.  
> 
> Could you check by running it with a non-English locale listed that
> appears in the ‘translations’ directory?
> 
> Maybe run the application in ‘strace’ to see whether/where it looks for
> its translation files.
> 
> > Without this it tries to install them to
> > /gnu/store/...qt5/translations, so I tried to make a directory that
> > would make sense. In this patch I've changed it to just /translations,
> > but I still didn't see it in .guix-profile/share/{de,ro}/LC_MESSAGES/,
> > so I don't really know what to do with it.  
> 
> Qt has its own mechanism for translation of UI messages.  The
> LC_MESSAGES thing is used by the ‘gettext’ function, part of libc.
> 
> Applications using ‘gettext’ tell libc the location of their
> translations using ‘bindtextdomain’.
> 
> Qt must have a way to know where translations are; maybe it has a
> function similar to ‘bindtextdomain’, in which case things will just
> work regardless of where translations are installed.
> 
> TIA,
> Ludo’.

It works! I did `export LANG=de` and then
ran /./gnu/store/...owncloud/bin/owncloud, and I got a German popup telling
me there was no associated keychain and I had to enter the password myself.
-- 
Efraim Flashner      אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


pgppA_YrWL0G1.pgp
Description: OpenPGP digital signature


Re: [PATCH 1/2] gnu: Add qtkeychain.

2015-11-10 Thread Ludovic Courtès
Efraim Flashner  skribis:

> On Thu, 05 Nov 2015 22:28:42 +0100
> l...@gnu.org (Ludovic Courtès) wrote:
>
>> Efraim Flashner  skribis:
>> 
>> > * gnu/packages/qt.scm (qtkeychain): New variable.  
>> 
>> [...]
>> 
>> > +   (modify-phases
>> > + %standard-phases  
>> 
>> ‘%standard-phases’ goes on the previous line.
>> 
>> > + (add-before
>> > +  'configure 'set-qt-trans-dir
>> > +   (lambda _
>> > + (substitute* "CMakeLists.txt"
>> > +  (("\\$\\{qt_translations_dir\\}")
>> > +
>> > "${CMAKE_INSTALL_PREFIX}/share/qtkeychain/translations")))  
>> 
>> Is Qt able to find translations installed there?  Is some environment
>> variable needed to tell it where to look for them?
>
> I don't really know.

Could you check by running it with a non-English locale listed that
appears in the ‘translations’ directory?

Maybe run the application in ‘strace’ to see whether/where it looks for
its translation files.

> Without this it tries to install them to
> /gnu/store/...qt5/translations, so I tried to make a directory that
> would make sense. In this patch I've changed it to just /translations,
> but I still didn't see it in .guix-profile/share/{de,ro}/LC_MESSAGES/,
> so I don't really know what to do with it.

Qt has its own mechanism for translation of UI messages.  The
LC_MESSAGES thing is used by the ‘gettext’ function, part of libc.

Applications using ‘gettext’ tell libc the location of their
translations using ‘bindtextdomain’.

Qt must have a way to know where translations are; maybe it has a
function similar to ‘bindtextdomain’, in which case things will just
work regardless of where translations are installed.

TIA,
Ludo’.



Re: [PATCH 1/2] gnu: Add qtkeychain.

2015-11-07 Thread Efraim Flashner
On Thu, 05 Nov 2015 22:28:42 +0100
l...@gnu.org (Ludovic Courtès) wrote:

> Efraim Flashner  skribis:
> 
> > * gnu/packages/qt.scm (qtkeychain): New variable.  
> 
> [...]
> 
> > +   (modify-phases
> > + %standard-phases  
> 
> ‘%standard-phases’ goes on the previous line.
> 
> > + (add-before
> > +  'configure 'set-qt-trans-dir
> > +   (lambda _
> > + (substitute* "CMakeLists.txt"
> > +  (("\\$\\{qt_translations_dir\\}")
> > +
> > "${CMAKE_INSTALL_PREFIX}/share/qtkeychain/translations")))  
> 
> Is Qt able to find translations installed there?  Is some environment
> variable needed to tell it where to look for them?

I don't really know. Without this it tries to install them to 
/gnu/store/...qt5/translations, so I tried to make a directory that would make 
sense. In this patch I've changed it to just /translations, but I still didn't 
see it in .guix-profile/share/{de,ro}/LC_MESSAGES/, so I don't really know what 
to do with it.
> 
> > +(synopsis "Qt API to store passwords")
> > +(description
> > +  "QtKeychain is a Qt API to store passwords and other secret data
> > +securely.  It will not store any data unencrypted unless explicitly 
> > requested.")  
> 
> What about “service” or “service and library” rather than “API”?

I think library works best. It can interact with gnome-keyring and the like
but would never be installed on its own. Plus as just library it doesn't go
on to the next line :)
> 
> Thanks,
> Ludo’.



-- 
Efraim Flashner      אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
From f4ae6cc0036556d1c205e8dbce658fd47f81b7fd Mon Sep 17 00:00:00 2001
From: Efraim Flashner 
Date: Wed, 16 Sep 2015 15:24:27 +0300
Subject: [PATCH 1/2] gnu: Add qtkeychain.

* gnu/packages/qt.scm (qtkeychain): New variable.
---
 gnu/packages/qt.scm | 36 +++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 9813f5b..242c21a 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015 Andreas Enge 
 ;;; Copyright © 2015 Sou Bunnbu 
 ;;; Copyright © 2015 Ludovic Courtès 
+;;; Copyright © 2015 Efraim Flashner 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,10 +20,11 @@
 ;;; along with GNU Guix.  If not, see .
 
 (define-module (gnu packages qt)
-  #:use-module ((guix licenses) #:select (gpl2 gpl3 lgpl2.1 x11-style))
+  #:use-module ((guix licenses) #:select (bsd-3 gpl2 gpl3 lgpl2.1 x11-style))
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build utils)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
   #:use-module (guix utils)
@@ -518,3 +520,35 @@ contain over 620 classes.")
("qt" ,qt-4)))
 (inputs
  `(("python" ,python-2)
+
+(define-public qtkeychain
+  (package
+(name "qtkeychain")
+(version "0.5.0")
+(source
+  (origin
+(method url-fetch)
+(uri (string-append "https://github.com/frankosterfeld/qtkeychain/;
+"archive/v" version ".tar.gz"))
+(file-name (string-append name "-" version ".tar.gz"))
+(sha256
+ (base32 "055mkd4pz6cyff4cw0784wjc1w92m8x223sxi96ph15fr3lplbg6"
+(build-system cmake-build-system)
+(inputs
+ `(("qt", qt)))
+(arguments
+ `(#:tests? #f ; No tests included
+   #:phases
+   (modify-phases %standard-phases
+ (add-before
+  'configure 'set-qt-trans-dir
+   (lambda _
+ (substitute* "CMakeLists.txt"
+  (("\\$\\{qt_translations_dir\\}")
+"${CMAKE_INSTALL_PREFIX}/translations")))
+(home-page "https://github.com/frankosterfeld/qtkeychain;)
+(synopsis "Qt API to store passwords")
+(description
+  "QtKeychain is a Qt library to store passwords and other secret data
+securely.  It will not store any data unencrypted unless explicitly requested.")
+(license bsd-3)))
-- 
2.6.2



pgpcSprh1xu2V.pgp
Description: OpenPGP digital signature


Re: [PATCH 1/2] gnu: Add qtkeychain.

2015-11-07 Thread Efraim Flashner
On Sat, 7 Nov 2015 20:31:45 +0200
Efraim Flashner  wrote:

> On Thu, 05 Nov 2015 22:28:42 +0100
> l...@gnu.org (Ludovic Courtès) wrote:
> 
> > Efraim Flashner  skribis:
> >   
> > > * gnu/packages/qt.scm (qtkeychain): New variable.
> > 
> > [...]
> >   
> > > +   (modify-phases
> > > + %standard-phases
> > 
> > ‘%standard-phases’ goes on the previous line.
> >   
> > > + (add-before
> > > +  'configure 'set-qt-trans-dir
> > > +   (lambda _
> > > + (substitute* "CMakeLists.txt"
> > > +  (("\\$\\{qt_translations_dir\\}")
> > > +
> > > "${CMAKE_INSTALL_PREFIX}/share/qtkeychain/translations")))
> > 
> > Is Qt able to find translations installed there?  Is some environment
> > variable needed to tell it where to look for them?  
> 
> I don't really know. Without this it tries to install them to 
> /gnu/store/...qt5/translations, so I tried to make a directory that would 
> make sense. In this patch I've changed it to just /translations, but I still 
> didn't see it in .guix-profile/share/{de,ro}/LC_MESSAGES/, so I don't really 
> know what to do with it.
> >   
--
> > Thanks,
> > Ludo’.  
> 

I took a look at Nix's qtkeychain package and I saw they put the translations
in /share/qt/translations so I changed the output (again) to there, and when
I installed it, there it was in .guix-profile/share/qt/translations, so I
think we may actually be at the right point with it. I don't know what the
difference is between /share/qt/translations and /share/$lang/LC_MESSAGES. I
installed qt and didn't see any difference. I could change the output so that
it lands in LC_MESSAGES, but that seems even messier than the other options
since it has to be filtered by language.


-- 
Efraim Flashner      אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
From f4ae6cc0036556d1c205e8dbce658fd47f81b7fd Mon Sep 17 00:00:00 2001
From: Efraim Flashner 
Date: Wed, 16 Sep 2015 15:24:27 +0300
Subject: [PATCH 1/2] gnu: Add qtkeychain.

* gnu/packages/qt.scm (qtkeychain): New variable.
---
 gnu/packages/qt.scm | 36 +++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 9813f5b..242c21a 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015 Andreas Enge 
 ;;; Copyright © 2015 Sou Bunnbu 
 ;;; Copyright © 2015 Ludovic Courtès 
+;;; Copyright © 2015 Efraim Flashner 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,10 +20,11 @@
 ;;; along with GNU Guix.  If not, see .
 
 (define-module (gnu packages qt)
-  #:use-module ((guix licenses) #:select (gpl2 gpl3 lgpl2.1 x11-style))
+  #:use-module ((guix licenses) #:select (bsd-3 gpl2 gpl3 lgpl2.1 x11-style))
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build utils)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
   #:use-module (guix utils)
@@ -518,3 +520,35 @@ contain over 620 classes.")
("qt" ,qt-4)))
 (inputs
  `(("python" ,python-2)
+
+(define-public qtkeychain
+  (package
+(name "qtkeychain")
+(version "0.5.0")
+(source
+  (origin
+(method url-fetch)
+(uri (string-append "https://github.com/frankosterfeld/qtkeychain/;
+"archive/v" version ".tar.gz"))
+(file-name (string-append name "-" version ".tar.gz"))
+(sha256
+ (base32 "055mkd4pz6cyff4cw0784wjc1w92m8x223sxi96ph15fr3lplbg6"
+(build-system cmake-build-system)
+(inputs
+ `(("qt", qt)))
+(arguments
+ `(#:tests? #f ; No tests included
+   #:phases
+   (modify-phases %standard-phases
+ (add-before
+  'configure 'set-qt-trans-dir
+   (lambda _
+ (substitute* "CMakeLists.txt"
+  (("\\$\\{qt_translations_dir\\}")
+"${CMAKE_INSTALL_PREFIX}/share/qt/translations")))
+(home-page "https://github.com/frankosterfeld/qtkeychain;)
+(synopsis "Qt API to store passwords")
+(description
+  "QtKeychain is a Qt library to store passwords and other secret data
+securely.  It will not store any data unencrypted unless explicitly requested.")
+(license bsd-3)))
-- 
2.6.2



pgpnpWLZLHuXo.pgp
Description: OpenPGP digital signature


Re: [PATCH 1/2] gnu: Add qtkeychain.

2015-11-05 Thread Ludovic Courtès
Efraim Flashner  skribis:

> * gnu/packages/qt.scm (qtkeychain): New variable.

[...]

> +   (modify-phases
> + %standard-phases

‘%standard-phases’ goes on the previous line.

> + (add-before
> +  'configure 'set-qt-trans-dir
> +   (lambda _
> + (substitute* "CMakeLists.txt"
> +  (("\\$\\{qt_translations_dir\\}")
> +
> "${CMAKE_INSTALL_PREFIX}/share/qtkeychain/translations")))

Is Qt able to find translations installed there?  Is some environment
variable needed to tell it where to look for them?

> +(synopsis "Qt API to store passwords")
> +(description
> +  "QtKeychain is a Qt API to store passwords and other secret data
> +securely.  It will not store any data unencrypted unless explicitly 
> requested.")

What about “service” or “service and library” rather than “API”?

Thanks,
Ludo’.