aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Jesse Gibbons <jgibbons2357+guix@gmail.com>
;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages rednotebook)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (guix build-system python)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages python)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages webkit)
  #:use-module (gnu packages python-xyz))

(define-public rednotebook
  (package
    (name "rednotebook")
    (version "2.22")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/jendrikseipp/rednotebook")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "11n970ad0j57vlll5j30ngkrfyil23v1b29ickbnblcldvjbgwa5"))))
    (build-system python-build-system)
    (arguments
     ;; Tests fail to find the "_" function.
     ;; It should be defined in rednotebook/info.py if '_' is not a member of
     ;; 'builtins'. It is either not defined or not exported during the check
     ;; phase. The program does not have this problem after it is installed.
     ;; TODO: Fix tests.
     `(#:tests? #f
       #:imported-modules ((guix build glib-or-gtk-build-system)
                           ,@%python-build-system-modules)
       #:modules ((ice-9 match)
                  (guix build python-build-system)
                  ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
                  (guix build utils))
       #:phases
       (modify-phases %standard-phases
         ;; Make sure rednotebook can find the typelibs and webkitgtk shared
         ;; libraries.
         (add-before 'wrap 'wrap-with-library-paths
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out"))
                   (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
                   (webkitgtk-path (string-append
                                    (assoc-ref inputs "webkitgtk-for-gtk3")
                                    "/lib")))
               (wrap-program (string-append out "/bin/rednotebook")
                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
                 `("LD_LIBRARY_PATH" ":" prefix (,webkitgtk-path)))))))))
    (inputs
     (list bash-minimal
           gtk+
           gtksourceview-3
           python-pyyaml
           python-pygobject
           webkitgtk-for-gtk3))
    ;; TODO: package the following for python3 (if possible), add them as
    ;; dependencies, and remove them from rednotebook source:
    ;; pygtkspellcheck, elib.intl, msgfmt, txt2tags
    ;; TODO: package and add pyenchant for python3 and add it as a dependency.
    (home-page "https://www.rednotebook.app")
    (synopsis "Daily journal with calendar, templates and keyword searching")
    (description
     "RedNotebook is a modern desktop journal.  It lets you format, tag and
search your entries.  You can also add pictures, links and customizable
templates, spell check your notes, and export to plain text, HTML, Latex or
PDF.")
    (license (list license:gpl2+     ; rednotebook, txt2tags
                   license:lgpl3+    ; elib.intl
                   license:gpl3+)))) ; pygtkspellcheck
sg-tooltip'>This package is needed because Jami uses a modified version of ffmpeg, which provides GPU hardware acceleration, automatical adapting of bitrate and extra codecs. Because of the configure flags list being long, it is better to keep them separated in variables, instead of littering the package definition. * gnu/packages/jami.scm (ffmpeg-jami, %ffmpeg-default-configure-flags, %ffmpeg-linux-configure-flags, %ffmpeg-linux-x86-configure-flags): New variables. (ffmpeg-compose-configure-flags): New procedure. (libring)[inputs]: Use ffmpeg-jami instead of ffmpeg. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Jan Wielkiewicz 2020-05-13gnu: jami: Remove obsolete wrapper....* gnu/packages/jami.scm (jami)[inputs]: Change from SQLITE-WITH-COLUMN-METADATA to SQLITE. [arguments]: Remove 'wrap' phase. Marius Bakke 2020-05-02gnu: jami: Add epoll support....* gnu/packages/jami.scm (jami)[arguments]: Add epoll support on Linux systems. Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com> Jan Wielkiewicz 2020-05-02gnu: jami: Use gettext-minimal....* gnu/packages/jami.scm (jami)[native-inputs]: Use "gettext-minimal" instead of "gnu-gettext". Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com> Jan Wielkiewicz 2020-05-02gnu: pjproject-jami: Update to 2.10....* gnu/packages/telephony.scm (pjproject): Update to 2.10, [source]: reorder "file-name" and "sha256" fields. * gnu/packages/jami.scm (%jami-version): Update to 20200401.1.6f090d, (pjproject-jami)[arguments]: apply patches related to 2.10. Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com> Jan Wielkiewicz 2020-05-02gnu: jami: Make gettext a native input....* gnu/packages/jami.scm (jami)[inputs]: Move "gettext" to ... [native-inputs]: ... here. Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com> Jan Wielkiewicz 2020-05-02gnu: libring: Add libnatpmp dependency....This library isn't mandatory, but it works better with new routers than libupnp. * gnu/packages/jami.scm (libring)[inputs]: Add libnatpmp. Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com> Jan Wielkiewicz 2020-05-02gnu: jami: Create a jami-apply-dependency-patches procedure....* gnu/packages/jami.scm (pjproject-jami) [native-inputs]: Rename "savoir-faire-linux-patches" to "sfl-patches". [arguments]: Move Jami patching procedure to ... (jami-apply-dependency-patches): ... this new procedure. Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com> Jan Wielkiewicz 2020-05-02gnu: jami: Fix download....The package name changed from Ring to Jami. Package tarballs start now with "jami_" prefix. The "ring-release" folder is also deprecated, let's use the "release" folder instead. * gnu/packages/jami.scm (jami-source)[origin]: Change the uri from "https://dl.jami.net/ring-release/tarballs/ring_" to "https://dl.jami.net/release/tarballs/jami_". Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com> Jan Wielkiewicz 2020-05-02gnu: telephony: Move Jami and its dependencies to jami.scm....Jami is a massive package and its developers modify many libraries. Keeping them in a single file makes maintenance easier. * gnu/packages/telephony.scm (%jami-version, jami-source, pjproject-jami, libring, libringclient, jami, jami-client-gnome): Move to ... * gnu/packages/jami.scm: ... this new file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com> Jan Wielkiewicz