Patchwork [2/2] gnu: Add qtox.

login
register
mail settings
Submitter Andy Patterson
Date Sept. 14, 2016, 7:30 p.m.
Message ID <20160914193014.24224-3-ajpatter@uwaterloo.ca>
Download mbox | patch
Permalink /patch/15642/
State New
Headers show

Comments

Andy Patterson - Sept. 14, 2016, 7:30 p.m.
* gnu/packages/messaging.scm (qtox): New variable.
---
 gnu/packages/messaging.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
Brendan Tildesley - Sept. 21, 2016, 7:47 a.m.
Andy Patterson 於 2016-09-15 05:30 寫道:
[...]
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (replace 'configure
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (zero?
> +              (system* "qmake"
> +                       (string-append "PREFIX="
> +                                      (assoc-ref outputs "out"))))))
> +         (add-after 'unpack 'fix-reproducibility-issues
> +           (lambda _
> +             (substitute* "src/main.cpp"
> +               (("__DATE__") "\"\"")
> +               (("__TIME__") "\"\"")
> +               (("TIMESTAMP") "\"\""))
> +             #t)))))
'unpack is before 'configure, so I think this should be put above
(replace 'configure. Also I noticed qmake outputs Makefile that contains
DTIMESTAMP=.... It doesn't look like it actually does anything though.
> +    (home-page "https://qtox.github.io/")
> +    (synopsis "Tox chat client using Qt")
> +    (description "qTox is a Tox client that follows the Tox design
> +guidelines.  It provides an easy to use application that allows you to
> +connect with friends and family without anyone else listening in.")
> +    (license license:gpl3+)))
> +
>  (define-public pybitmessage
>    (package
>      (name "pybitmessage")

I was able to compile and run, but the package technically failed with

builder for `/gnu/store/3qh6k8lixrkdxvd3zfvapc1fdwl079lv-qtox-1.5.1.drv'
failed to produce output path
`/gnu/store/j4yg5hd5giss2fpivzdkrdlzp62x4qbq-qtox-1.5.1'

I don't understand what produces this message. Can anyone explain. If I
use guix build qtox -K I can find the "failed" build in /tmp/ and run it.
Ricardo Wurmus - Sept. 21, 2016, 8:28 a.m.
Brendan Tildesley <brendan.tildesley@openmailbox.org> writes:

> I was able to compile and run, but the package technically failed with
>
> builder for `/gnu/store/3qh6k8lixrkdxvd3zfvapc1fdwl079lv-qtox-1.5.1.drv'
> failed to produce output path
> `/gnu/store/j4yg5hd5giss2fpivzdkrdlzp62x4qbq-qtox-1.5.1'
>
> I don't understand what produces this message. Can anyone explain. If I
> use guix build qtox -K I can find the "failed" build in /tmp/ and run it.

This means that nothing was installed to the given target directory.
Often this means that the “install” target is defective in some way.

~~ Ricardo

Patch

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 3627fec..f628404 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -6,6 +6,7 @@ 
 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,6 +33,7 @@ 
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
+  #:use-module (gnu packages aidc)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages check)
@@ -658,6 +660,58 @@  instant messenger with audio and video chat capabilities.")
    (home-page "http://utox.org/")
    (license license:gpl3)))
 
+(define-public qtox
+  (package
+    (name "qtox")
+    (version "1.5.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/qTox/qTox/archive/v"
+                           version ".tar.gz"))
+       (sha256
+        (base32 "0y15mc39x54k1kz36cw9412kl1p1p6nzlx97gagv4gg3vybfhbjv"))
+       (file-name (string-append name "-" version ".tar.gz"))))
+    (inputs
+     `(("ffmpeg" ,ffmpeg)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+-2)
+       ("libsodium" ,libsodium)
+       ("libtoxcore" ,libtoxcore)
+       ("libvpx" ,libvpx)
+       ("libxscrnsaver" ,libxscrnsaver)
+       ("libx11" ,libx11)
+       ("openal" ,openal)
+       ("qrencode" ,qrencode)
+       ("qt" ,qt)
+       ("sqlcipher" ,sqlcipher)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("qmake" ,qt)))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (zero?
+              (system* "qmake"
+                       (string-append "PREFIX="
+                                      (assoc-ref outputs "out"))))))
+         (add-after 'unpack 'fix-reproducibility-issues
+           (lambda _
+             (substitute* "src/main.cpp"
+               (("__DATE__") "\"\"")
+               (("__TIME__") "\"\"")
+               (("TIMESTAMP") "\"\""))
+             #t)))))
+    (home-page "https://qtox.github.io/")
+    (synopsis "Tox chat client using Qt")
+    (description "qTox is a Tox client that follows the Tox design
+guidelines.  It provides an easy to use application that allows you to
+connect with friends and family without anyone else listening in.")
+    (license license:gpl3+)))
+
 (define-public pybitmessage
   (package
     (name "pybitmessage")