From patchwork Thu Aug 29 02:42:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jesse Gibbons X-Patchwork-Id: 15153 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 95CD217348; Thu, 29 Aug 2019 03:43:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 0052917345 for ; Thu, 29 Aug 2019 03:43:14 +0100 (BST) Received: from localhost ([::1]:44956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3AP3-0007QC-Hh for patchwork@mira.cbaines.net; Wed, 28 Aug 2019 22:43:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36311) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3AOu-0007Q2-LI for guix-patches@gnu.org; Wed, 28 Aug 2019 22:43:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3AOs-000707-Ma for guix-patches@gnu.org; Wed, 28 Aug 2019 22:43:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42639) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i3AOs-0006zu-Fg for guix-patches@gnu.org; Wed, 28 Aug 2019 22:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i3AOs-0005Jn-Bl for guix-patches@gnu.org; Wed, 28 Aug 2019 22:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36559] [PATCH] add rednotebook Resent-From: Jesse Gibbons Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Aug 2019 02:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36559 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Goaziou Received: via spool by 36559-submit@debbugs.gnu.org id=B36559.156704655320384 (code B ref 36559); Thu, 29 Aug 2019 02:43:02 +0000 Received: (at 36559) by debbugs.gnu.org; 29 Aug 2019 02:42:33 +0000 Received: from localhost ([127.0.0.1]:51460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3AOK-0005Ic-Qq for submit@debbugs.gnu.org; Wed, 28 Aug 2019 22:42:33 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38033) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3AOF-0005IC-WD for 36559@debbugs.gnu.org; Wed, 28 Aug 2019 22:42:26 -0400 Received: by mail-pf1-f194.google.com with SMTP id o70so1027845pfg.5 for <36559@debbugs.gnu.org>; Wed, 28 Aug 2019 19:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:in-reply-to:references:date :mime-version; bh=Zihqf8P0hzD6GY9ztYnnc6yfkKUx1+juob7VKoOZ4/s=; b=gnFiix1BCa7lxTYs+VKLELHLnWVle5/ChjRg+tf13+XWzNzTRd3XgVNXavYJ6V5gy3 5VpJnQSlYCSaxAkgMC4FVV2V4e+R3pDe5ChdPiGk6y7FWKyfct5zz4x1dHdwnaDYjrIC kNmCDcz5tfxaUitrhioeOe/fS6QBIrWvZIKAOr+xPfChcMxZVdYd7ZMxglnRqxlpTIkc mF9pSl+XPRS1o4+OM/vVgLGFRwhYP1/46u5svicUO0buhiTCrKGI5NE01EAEdlMrWkCX GURfGmAr38fkGvBTVSQfwIhQURSxLSo5CjO0YIgcgT9pQJFCJFB1wua9sGBiw+s+g9Uy Mr2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:in-reply-to :references:date:mime-version; bh=Zihqf8P0hzD6GY9ztYnnc6yfkKUx1+juob7VKoOZ4/s=; b=GSBKwyS8yJpL4XyNLkUyZT/0HsrUVibcg5u2pigM0+tG+r7ER66a8FQYtmy+lIHoPe B7QqAYT1h5JAFlPUu+vIOSjYbTaX4+a03dogy6MdetkMcOBpnLrtNcH0r3qzEtf5iVqi x0oUUK2REi3rFv/UblU2sf6f9MT3c4b/uvInpGtDBibWkHoWINdRy53kQ3wbNJYl3lZH qU3r/DpQEpaplz83UjvgwGBranjgh0pnk6VXxJqWzFsnmU9186N83LtdDK2w+mGv39sd 6Jx+e6iuRuS6NE7QkwP0NFHyDk3+fDdh6R7WfN3jf5djBjsun01N9BAUvnfsfdLihYY7 UuFw== X-Gm-Message-State: APjAAAV9rNsVo7Tx8w6SsBW/gIBM0R+ZIgOZZtd52uRipSvVq5WhsGil ZsS20ddKaRQeaNZwPPOBwg9v3ctflqk= X-Google-Smtp-Source: APXvYqznWLdThN6MuLDHyoFYunZZrHlG0mlKqLFbLQupVAeqBg+4EiGq3xYMvycEie5lnkxOj5IAMA== X-Received: by 2002:a17:90a:9a90:: with SMTP id e16mr7604864pjp.71.1567046537982; Wed, 28 Aug 2019 19:42:17 -0700 (PDT) Received: from piranhaplant.local ([199.68.53.171]) by smtp.googlemail.com with ESMTPSA id d3sm473184pjz.31.2019.08.28.19.42.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2019 19:42:16 -0700 (PDT) Message-ID: From: Jesse Gibbons In-Reply-To: <871rx8xpqm.fsf@nicolasgoaziou.fr> References: <20190708222208.71c9d614@gmail.com> <871rx8xpqm.fsf@nicolasgoaziou.fr> Date: Wed, 28 Aug 2019 20:42:15 -0600 Mime-Version: 1.0 X-Mailer: Evolution 3.28.1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 36559@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches On Mon, 2019-08-26 at 11:03 +0200, Nicolas Goaziou wrote: > Hello, > > Jesse Gibbons writes: > > > Patch is attached. > > It looks like this patch felt through the cracks. Do not hesitate to > send a friendly ping after one or two weeks if no one responds. > > > As explained in the comment I had to correct a few problems: > > 1. Tests always fail, but (in my experience) the final application > > is > > stable. > > 2. rednotebook uses the GI_TYPELIB_PATH and LD_LIBRARY_PATH to > > find > > webkitgtk. > > - I made gnu/packages/journal.scm to add other similar > > journal/diary > > applications. Because I do not like naming sources for the only > > package defined within, especially when the package is simple, I > > recommend moving the jrnl package definition to it. Say the word > > and > > I will produce the patch to do this. > > It sounds good. > > > Perhaps we should discuss the idea of organizing packages by > > function > > on the devel mailing list? > > Feel free to start a discussion about it. I had the discussion soon after I sent the patch. Ricardo convinced me there is at least one good reason for having sources declaring a single package. See https://lists.gnu.org/archive/html/guix-devel/2019-07/msg00240.html for the explanation and the thread. I should have sent a new patch when I decided to rename journal.scm to rednotebook.scm. My mistake. > > > - I also plan to define a package for other journal applications > > (like those listed between rednotebook and jrnl at > > > > and > > any other recommendations). > > Great! > > > Knowing I am likely to err, I expect you (whoever reviews this > > patch) > > Some comments follow. > > > + (source > > + (origin > > + (method url-fetch) > > + (uri (string-append > > + "https://github.com/jendrikseipp/rednotebook/archive/ > > v" > > + version > > + ".tar.gz")) > > We do not use Github releases, because they are not stable. You > should > use `git-fetch` here: > > (method git-fetch) > (uri (git-reference > (url "https://github.com/jendrikseipp/rednotebook.git") > (commit (string-append "v" version)))) > (file-name (git-file-name name version)) > > with an appropriate hash. > fixed. > > + (sha256 > > + (base32 > > + "15n1ziypfj3lzpvhha7r637zrb259l9yrcsvkic9cg5mndiaivs3"))) > > ) > > + (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. > > Nitpick: missing space between ";;" and "Make". > > > + `(#: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. > > Ditto. > both fixed. > > + (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") > > + "/lib"))) > > + (wrap-program (string-append out > > "/bin/rednotebook") > > + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib- > > path)) > > + `("LD_LIBRARY_PATH" ":" prefix (,webkitgtk- > > path))) > > + #t)))))) > > + (inputs > > + `(("python" ,python-3) > > I don't think this input is necessary. `python-build-system' should > provide it already, shouldn't it? fixed > > > + ("gtk+" ,gtk+) > > Nitpick: spurious spaces. fixed > > > > + ("webkitgtk" ,webkitgtk) > > + ("python-pyyaml" ,python-pyyaml))) > > + (home-page "https://www.rednotebook.app") > > + (synopsis "journal") > > What about this one, borrowed to Debian: > > "Daily journal with calendar, templates and keyword searching" good idea > > > + (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.") > > You need two spaces after full stops in Texinfo. > fixed > Also, would it make sense to package pyenchant and add it as > a dependency? It's not a blocker though. Added this in a TODO. I also made a list of packages that should be added. It looks like there are four python modules in the rednotebook/external directory that should be packaged externally if possible. > > Could you send an updated patch? attached > > Thank you! > > Regards, > From a5967bdbd15987438f158f1ae9bac2dc5a44c645 Mon Sep 17 00:00:00 2001 From: Jesse Gibbons Date: Wed, 28 Aug 2019 20:35:29 -0600 Subject: [PATCH] gnu: Add rednotebook. * gnu/package/rednotebook.scm: New file. * gnu/local.mk: Add it. * gnu/packages/rednotebook.scm (rednotebook): New variable. --- gnu/local.mk | 1 + gnu/packages/rednotebook.scm | 90 ++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 gnu/packages/rednotebook.scm diff --git a/gnu/local.mk b/gnu/local.mk index 797936d2fd..2c02b8510a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -413,6 +413,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/rdf.scm \ %D%/packages/re2c.scm \ %D%/packages/readline.scm \ + %D%/packages/rednotebook.scm \ %D%/packages/regex.scm \ %D%/packages/robotics.scm \ %D%/packages/rrdtool.scm \ diff --git a/gnu/packages/rednotebook.scm b/gnu/packages/rednotebook.scm new file mode 100644 index 0000000000..60a22a7f1f --- /dev/null +++ b/gnu/packages/rednotebook.scm @@ -0,0 +1,90 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Jesse Gibbons +;;; +;;; 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 . + +(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 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.11.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jendrikseipp/rednotebook.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "04c7a0wgmdl88v9386y1052c38ajbkryiwhqps5lx34d4g7r6hm1")))) + (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") + "/lib"))) + (wrap-program (string-append out "/bin/rednotebook") + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)) + `("LD_LIBRARY_PATH" ":" prefix (,webkitgtk-path))) + #t)))))) + (inputs + `(("gtk+" ,gtk+) + ("gtksourceview" ,gtksourceview-3) + ("python-pyyaml" ,python-pyyaml) + ("python-pygobject" ,python-pygobject) + ("webkitgtk" ,webkitgtk))) + ;; 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 -- 2.23.0