diff mbox series

[bug#49123,24/24] gnu: Add mirage.

Message ID 20210620010742.4259-24-0x2d@disroot.org
State New
Headers show
Series [bug#49123,01/24] gnu: Add pyotherside. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

slg June 20, 2021, 1:07 a.m. UTC
* gnu/packages/messaging.scm (mirage): New variable.
---
 gnu/packages/messaging.scm | 96 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

Comments

M June 21, 2021, 4:10 p.m. UTC | #1
slg via Guix-patches via schreef op za 19-06-2021 om 22:07 [-0300]:
> * gnu/packages/messaging.scm (mirage): New variable.
> ---
>  gnu/packages/messaging.scm | 96 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 96 insertions(+)
> 
> diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
> index fe678d89fd..a8cdd90f57 100644
> --- a/gnu/packages/messaging.scm
> +++ b/gnu/packages/messaging.scm
> @@ -2997,4 +2997,100 @@ API.  Mattermost is not required.")
>      (home-page "https://github.com/42wim/matterbridge")
>      (license license:asl2.0)))
>  
> +(define-public mirage
> +  (package
> +    ;; (inherit qtsvg)
> +    (name "mirage")
> +    (version "0.7.1")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/mirukana/mirage")
> +                    (commit (string-append "v" version))
> +                    (recursive? #t)))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +                "0j7gdg2z8yg3qvwg9d9fa3i4ig231qda48p00s5gk8bc3c65vsll"))))
> +    (build-system gnu-build-system)
> +    (native-inputs
> +     `(("python" ,python-wrapper)))
> +    (propagated-inputs [ plenty of inputs ])

If possible, try to move some of these to 'inputs'.
Of course, mirage still needs to find all these python
libraries, so you may need to add a post-install phase
(after/before qt-wrap shouldn't mattr) doing appropriate
‘wrap-program' calls -- yes, an already wrapped program
can be wrapped again. I think. I'd presume the effects are
cumulative, not sure though.

Why? Keeping ‘propagated-inputs’ minimal reduces profile
pollution, so the profile contains less, so generating the
profile takes less time. This also reduces the chance
of version conflicts. (E.g., guile and stalin cannot be
installed in the same profile because they propagate
different versions of libgc.)

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index fe678d89fd..a8cdd90f57 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -2997,4 +2997,100 @@  API.  Mattermost is not required.")
     (home-page "https://github.com/42wim/matterbridge")
     (license license:asl2.0)))
 
+(define-public mirage
+  (package
+    ;; (inherit qtsvg)
+    (name "mirage")
+    (version "0.7.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/mirukana/mirage")
+                    (commit (string-append "v" version))
+                    (recursive? #t)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0j7gdg2z8yg3qvwg9d9fa3i4ig231qda48p00s5gk8bc3c65vsll"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("python" ,python-wrapper)))
+    (propagated-inputs
+     `(("python-pillow" ,python-pillow)
+       ("python-aiofiles" ,python-aiofiles)
+       ("python-appdirs" ,python-appdirs) ;; Update
+       ("python-cairosvg" ,python-cairosvg)
+       ("python-filetype" ,python-filetype)
+       ("python-html-sanitizer" ,python-html-sanitizer)
+       ("python-lxml", python-lxml) ;; Update
+       ("python-matrix-nio" ,python-matrix-nio)
+       ("python-mistune" ,python-mistune)
+       ("python-pymediainfo" ,python-pymediainfo)
+       ("python-plyer" ,python-plyer)
+       ("python-sortedcontainers" ,python-sortedcontainers) ;; Update
+       ("python-watchgod" ,python-watchgod)
+       ("python-redbaron" ,python-redbaron)
+       ("python-hsluv" ,python-hsluv)
+       ("python-simpleaudio" ,python-simpleaudio)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("pyotherside" ,pyotherside)))
+    (inputs
+     `(("qtbase" ,qtbase-5)
+       ("qtsvg" ,qtsvg)
+       ("qtimageformats" ,qtimageformats)
+       ("libx11" ,libx11)
+       ("libxscrnsaver" ,libxscrnsaver)
+       ("zlib" ,zlib)
+       ("libtiff" ,libtiff)
+       ("libwebp" ,libwebp)
+       ("libjpeg-turbo" ,libjpeg-turbo)
+       ("openjpeg" ,openjpeg)))
+    (arguments
+     `(#:tests? #f                      ; No target
+       #:imported-modules
+       (,@%gnu-build-system-modules
+        (guix build cmake-build-system)
+        (guix build qt-build-system))
+       #:modules
+       ((guix build gnu-build-system)
+        ((guix build qt-build-system)
+         #:prefix qt:)
+        (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out")))
+               (invoke "qmake"
+                       (string-append "PREFIX=" out)
+                       (string-append "BINDIR=" out "/bin")
+                       (string-append "DATADIR=" out "/share")
+                       (string-append "PLUGINDIR=" out "/lib/qt5/plugins")))
+             #t))
+         (add-after 'install 'qt-wrap
+           (assoc-ref qt:%standard-phases 'qt-wrap)))))
+    (home-page "https://github.com/mirukana/mirage")
+    (synopsis "Next generation Matrix client, highly customizable and keyboard
+friendly")
+    (description "A fancy, customizable, keyboard-operable Matrix chat client
+for encrypted and decentralized communication. Written in Qt/QML and Python,
+currently in alpha.
+
+Its main features include:
+@itemize
+@item Fluid, responsive interface that adapts to any window size
+@item Toggleable compact mode
+@item Customizable keyboard shortcuts for everything, including switching
+rooms, navigating messages, sending/opening files...
+@item Versatile theming system, properties can refer to each other and have
+any valid ECMAScript 7 expression as values
+@item Comes by default with dark and transparent themes
+@item Desktop notifications, sounds and window alerts
+@item Support for HTTP and SOCKS5 proxies including TOR
+@item Multiple accounts in one client
+@end itemize")
+    (license license:lgpl3)))
+
 ;;; messaging.scm ends here