GNU bug report logs - #41550
[PATCH] gnu: Add Polish hunspell dictionary.

Previous Next

Package: guix-patches;

Reported by: Marcin Karpezo <sirmacik <at> wioo.waw.pl>

Date: Tue, 26 May 2020 23:37:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41550 in the body.
You can then email your comments to 41550 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#41550; Package guix-patches. (Tue, 26 May 2020 23:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marcin Karpezo <sirmacik <at> wioo.waw.pl>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 26 May 2020 23:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Marcin Karpezo <sirmacik <at> wioo.waw.pl>
To: guix-patches <at> gnu.org
Cc: Marcin Karpezo <sirmacik <at> wioo.waw.pl>
Subject: [PATCH] gnu: Add Polish hunspell dictionary.
Date: Wed, 27 May 2020 01:35:03 +0200
* gnu/packages/libreoffice.scm (hunspell-dict-pl): New variable.
---
 gnu/packages/libreoffice.scm | 47 ++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index a3a6ea5d1a..6c1ce2a0f9 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2018 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
 ;;; Copyright © 2019 Chris Marusich <cmmarusich <at> gmail.com>
+;;; Copyright © 2020 Marcin Karpezo <marcin <at> karpezo.pl>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -920,6 +921,52 @@ library.")
   "toutesvariantes"
   (synopsis "Hunspell dictionary for all variants of French"))
 
+(define-public hunspell-dict-pl
+  (package
+    (name "hunspell-dict-pl")
+    (version "20200526")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://sjp.pl/slownik/ort/sjp-myspell-pl-"
+                           version ".zip"))
+       (sha256 (base32
+                "1v8fc9ka18hs5vl7d515kgd0r4lcxl3pyk5075c5pg8ix9krzs4j"))))
+
+    (build-system trivial-build-system)
+    (native-inputs `(("unzip" ,unzip)))
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils)
+                                (srfi srfi-26))
+
+                   (let* ((out      (assoc-ref %outputs "out"))
+                          (hunspell (string-append out "/share/hunspell"))
+                          (myspell  (string-append out "/share/myspell"))
+                          (doc      (string-append out "/share/doc/"
+                                                   ,name))
+                          (unzip (string-append (assoc-ref %build-inputs "unzip")
+                                                "/bin/unzip")))
+                     (invoke unzip "-j" "-o" (assoc-ref %build-inputs "source"))
+                     (invoke unzip "-j" "-o" "pl_PL.zip")
+                     (for-each (cut install-file <> hunspell)
+                               (find-files "."
+                                           ,(string-append "pl_PL"
+                                                           "\\.(dic|aff)$")))
+                     (mkdir-p myspell)
+                     (symlink hunspell (string-append myspell "/dicts"))
+                     (for-each (cut install-file <> doc)
+                               (find-files "." "\\.(txt|org|md)$"))
+                     #t))))
+    (synopsis "Hunspell dictionary for Polish")
+    (description
+     "This package provides a dictionary for the Hunspell spell-checking
+library.")
+    (home-page "https://qsjp.pl/slownik/ort/")
+    (license
+     (list license:gpl2 license:mpl1.1 license:cc-by4.0 license:lgpl2.1 license:asl2.0))))
+
 (define-public hyphen
   (package
     (name "hyphen")
-- 
2.26.2





Information forwarded to guix-patches <at> gnu.org:
bug#41550; Package guix-patches. (Tue, 26 May 2020 23:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 41550 <at> debbugs.gnu.org (full text, mbox):

From: Marcin Karpezo <sirmacik <at> wioo.waw.pl>
To: 41550 <at> debbugs.gnu.org
Cc: Marcin Karpezo <sirmacik <at> wioo.waw.pl>
Subject: [PATCH v2] gnu: Add Polish hunspell dictionary.
Date: Wed, 27 May 2020 01:44:23 +0200
* gnu/packages/libreoffice.scm (hunspell-dict-pl): New variable.
---
 gnu/packages/libreoffice.scm | 47 ++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index a3a6ea5d1a..0f824bd29e 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2018 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
 ;;; Copyright © 2019 Chris Marusich <cmmarusich <at> gmail.com>
+;;; Copyright © 2020 Marcin Karpezo <sirmacik <at> wioo.waw.pl>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -920,6 +921,52 @@ library.")
   "toutesvariantes"
   (synopsis "Hunspell dictionary for all variants of French"))
 
+(define-public hunspell-dict-pl
+  (package
+    (name "hunspell-dict-pl")
+    (version "20200526")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://sjp.pl/slownik/ort/sjp-myspell-pl-"
+                           version ".zip"))
+       (sha256 (base32
+                "1v8fc9ka18hs5vl7d515kgd0r4lcxl3pyk5075c5pg8ix9krzs4j"))))
+
+    (build-system trivial-build-system)
+    (native-inputs `(("unzip" ,unzip)))
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils)
+                                (srfi srfi-26))
+
+                   (let* ((out      (assoc-ref %outputs "out"))
+                          (hunspell (string-append out "/share/hunspell"))
+                          (myspell  (string-append out "/share/myspell"))
+                          (doc      (string-append out "/share/doc/"
+                                                   ,name))
+                          (unzip (string-append (assoc-ref %build-inputs "unzip")
+                                                "/bin/unzip")))
+                     (invoke unzip "-j" "-o" (assoc-ref %build-inputs "source"))
+                     (invoke unzip "-j" "-o" "pl_PL.zip")
+                     (for-each (cut install-file <> hunspell)
+                               (find-files "."
+                                           ,(string-append "pl_PL"
+                                                           "\\.(dic|aff)$")))
+                     (mkdir-p myspell)
+                     (symlink hunspell (string-append myspell "/dicts"))
+                     (for-each (cut install-file <> doc)
+                               (find-files "." "\\.(txt|org|md)$"))
+                     #t))))
+    (synopsis "Hunspell dictionary for Polish")
+    (description
+     "This package provides a dictionary for the Hunspell spell-checking
+library.")
+    (home-page "https://qsjp.pl/slownik/ort/")
+    (license
+     (list license:gpl2 license:mpl1.1 license:cc-by4.0 license:lgpl2.1 license:asl2.0))))
+
 (define-public hyphen
   (package
     (name "hyphen")
-- 
2.26.2





Information forwarded to guix-patches <at> gnu.org:
bug#41550; Package guix-patches. (Tue, 26 May 2020 23:51:01 GMT) Full text and rfc822 format available.

Message #11 received at 41550 <at> debbugs.gnu.org (full text, mbox):

From: Marcin Karpezo <sirmacik <at> wioo.waw.pl>
To: 41550 <at> debbugs.gnu.org
Cc: Marcin Karpezo <sirmacik <at> wioo.waw.pl>
Subject: [PATCH v3] gnu: Add Polish hunspell dictionary.
Date: Wed, 27 May 2020 01:50:20 +0200
* gnu/packages/libreoffice.scm (hunspell-dict-pl): New variable.
---
Fixing another typo, sorry for that. Will pay more attention next time.

 gnu/packages/libreoffice.scm | 47 ++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index a3a6ea5d1a..995ab410ea 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2018 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
 ;;; Copyright © 2019 Chris Marusich <cmmarusich <at> gmail.com>
+;;; Copyright © 2020 Marcin Karpezo <sirmacik <at> wioo.waw.pl>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -920,6 +921,52 @@ library.")
   "toutesvariantes"
   (synopsis "Hunspell dictionary for all variants of French"))

+(define-public hunspell-dict-pl
+  (package
+    (name "hunspell-dict-pl")
+    (version "20200526")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://sjp.pl/slownik/ort/sjp-myspell-pl-"
+                           version ".zip"))
+       (sha256 (base32
+                "1v8fc9ka18hs5vl7d515kgd0r4lcxl3pyk5075c5pg8ix9krzs4j"))))
+
+    (build-system trivial-build-system)
+    (native-inputs `(("unzip" ,unzip)))
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils)
+                                (srfi srfi-26))
+
+                   (let* ((out      (assoc-ref %outputs "out"))
+                          (hunspell (string-append out "/share/hunspell"))
+                          (myspell  (string-append out "/share/myspell"))
+                          (doc      (string-append out "/share/doc/"
+                                                   ,name))
+                          (unzip (string-append (assoc-ref %build-inputs "unzip")
+                                                "/bin/unzip")))
+                     (invoke unzip "-j" "-o" (assoc-ref %build-inputs "source"))
+                     (invoke unzip "-j" "-o" "pl_PL.zip")
+                     (for-each (cut install-file <> hunspell)
+                               (find-files "."
+                                           ,(string-append "pl_PL"
+                                                           "\\.(dic|aff)$")))
+                     (mkdir-p myspell)
+                     (symlink hunspell (string-append myspell "/dicts"))
+                     (for-each (cut install-file <> doc)
+                               (find-files "." "\\.(txt|org|md)$"))
+                     #t))))
+    (synopsis "Hunspell dictionary for Polish")
+    (description
+     "This package provides a dictionary for the Hunspell spell-checking
+library.")
+    (home-page "https://sjp.pl/slownik/ort/")
+    (license
+     (list license:gpl2 license:mpl1.1 license:cc-by4.0 license:lgpl2.1 license:asl2.0))))
+
 (define-public hyphen
   (package
     (name "hyphen")
--
2.26.2




Information forwarded to guix-patches <at> gnu.org:
bug#41550; Package guix-patches. (Fri, 29 May 2020 16:08:01 GMT) Full text and rfc822 format available.

Message #14 received at 41550 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Marcin Karpezo <sirmacik <at> wioo.waw.pl>
Cc: 41550 <at> debbugs.gnu.org
Subject: Re: [bug#41550] [PATCH v3] gnu: Add Polish hunspell dictionary.
Date: Fri, 29 May 2020 18:07:12 +0200
Hello!

Marcin Karpezo <sirmacik <at> wioo.waw.pl> skribis:

> * gnu/packages/libreoffice.scm (hunspell-dict-pl): New variable.

Looks like the URL is incorrect:

  gnu/packages/libreoffice.scm:929:5: hunspell-dict-pl <at> 20200526: all the source URIs are unreachable:
  gnu/packages/libreoffice.scm:929:5: hunspell-dict-pl <at> 20200526: URI https://sjp.pl/slownik/ort/sjp-myspell-pl-20200526.zip not reachable: 404 ("Not Found")

Could you take a look?

Thanks in advance!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#41550; Package guix-patches. (Fri, 29 May 2020 16:14:02 GMT) Full text and rfc822 format available.

Message #17 received at 41550 <at> debbugs.gnu.org (full text, mbox):

From: sirmacik <sirmacik <at> wioo.waw.pl>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 41550 <at> debbugs.gnu.org
Subject: Re: [bug#41550] [PATCH v3] gnu: Add Polish hunspell dictionary.
Date: Fri, 29 May 2020 18:13:24 +0200
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hello!
>
> Marcin Karpezo <sirmacik <at> wioo.waw.pl> skribis:
>
>> * gnu/packages/libreoffice.scm (hunspell-dict-pl): New variable.
>
> Looks like the URL is incorrect:
>
>   gnu/packages/libreoffice.scm:929:5: hunspell-dict-pl <at> 20200526: all
> the source URIs are unreachable:
>   gnu/packages/libreoffice.scm:929:5: hunspell-dict-pl <at> 20200526: URI
> https://sjp.pl/slownik/ort/sjp-myspell-pl-20200526.zip not reachable:
> 404 ("Not Found")
>
> Could you take a look?

That'd explain why archlinux is mirroring source for each release. Looks
like they're hosting only last release (which happens daily). Do we in
Guix have such capabilities or a way to mitigate that?

-- 
sirmacik
PGP: 0xE0DC81D523891771




Information forwarded to guix-patches <at> gnu.org:
bug#41550; Package guix-patches. (Fri, 29 May 2020 16:54:01 GMT) Full text and rfc822 format available.

Message #20 received at 41550 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: sirmacik <sirmacik <at> wioo.waw.pl>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 41550 <at> debbugs.gnu.org
Subject: Re: [bug#41550] [PATCH v3] gnu: Add Polish hunspell dictionary.
Date: Fri, 29 May 2020 12:53:44 -0400
On Fri, May 29, 2020 at 06:13:24PM +0200, sirmacik wrote:
> That'd explain why archlinux is mirroring source for each release. Looks
> like they're hosting only last release (which happens daily). Do we in
> Guix have such capabilities or a way to mitigate that?

We could download it from Arch or another distro that mirrors things.




Information forwarded to guix-patches <at> gnu.org:
bug#41550; Package guix-patches. (Fri, 29 May 2020 17:32:01 GMT) Full text and rfc822 format available.

Message #23 received at 41550 <at> debbugs.gnu.org (full text, mbox):

From: Marcin Karpezo <sirmacik <at> wioo.waw.pl>
To: 41550 <at> debbugs.gnu.org
Cc: Marcin Karpezo <sirmacik <at> wioo.waw.pl>
Subject: [PATCH v4] gnu: Add Polish hunspell dictionary.
Date: Fri, 29 May 2020 19:30:12 +0200
* gnu/packages/libreoffice.scm (hunspell-dict-pl): New variable.
---
Based on Leo's suggestion I've changed source to last version mirrored
by Arch Linux and version number accordingly.

gnu/packages/libreoffice.scm | 51 ++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index a3a6ea5d1a..0873072a64 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2018 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
 ;;; Copyright © 2019 Chris Marusich <cmmarusich <at> gmail.com>
+;;; Copyright © 2020 Marcin Karpezo <sirmacik <at> wioo.waw.pl>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -920,6 +921,56 @@ library.")
   "toutesvariantes"
   (synopsis "Hunspell dictionary for all variants of French"))

+(define-public hunspell-dict-pl
+  (package
+    (name "hunspell-dict-pl")
+    (version "20200327")
+    (source
+     (origin
+       (method url-fetch)
+       ;; Since creators of dictionary host only the latest daily release,
+       ;; we're using version mirrored by Arch Linux, which seems good
+       ;; enough. They're mirroring hunspell-pl releases since 2011.
+       (uri (string-append "https://sources.archlinux.org/other/community/"
+                           "hunspell-pl/sjp-myspell-pl-"
+                           version ".zip"))
+       (sha256 (base32
+                "14mzf8glxkp2775dcqisb1zv6r8ncm3bvzl46q352rwyl2dg1c59"))))
+
+    (build-system trivial-build-system)
+    (native-inputs `(("unzip" ,unzip)))
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils)
+                                (srfi srfi-26))
+
+                   (let* ((out      (assoc-ref %outputs "out"))
+                          (hunspell (string-append out "/share/hunspell"))
+                          (myspell  (string-append out "/share/myspell"))
+                          (doc      (string-append out "/share/doc/"
+                                                   ,name))
+                          (unzip (string-append (assoc-ref %build-inputs "unzip")
+                                                "/bin/unzip")))
+                     (invoke unzip "-j" "-o" (assoc-ref %build-inputs "source"))
+                     (invoke unzip "-j" "-o" "pl_PL.zip")
+                     (for-each (cut install-file <> hunspell)
+                               (find-files "."
+                                           ,(string-append "pl_PL"
+                                                           "\\.(dic|aff)$")))
+                     (mkdir-p myspell)
+                     (symlink hunspell (string-append myspell "/dicts"))
+                     (for-each (cut install-file <> doc)
+                               (find-files "." "\\.(txt|org|md)$"))
+                     #t))))
+    (synopsis "Hunspell dictionary for Polish")
+    (description
+     "This package provides a dictionary for the Hunspell spell-checking
+library.")
+    (home-page "https://sjp.pl/slownik/ort/")
+    (license
+     (list license:gpl2 license:mpl1.1 license:cc-by4.0 license:lgpl2.1 license:asl2.0))))
+
 (define-public hyphen
   (package
     (name "hyphen")
--
2.26.2




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 03 Jun 2020 15:58:02 GMT) Full text and rfc822 format available.

Notification sent to Marcin Karpezo <sirmacik <at> wioo.waw.pl>:
bug acknowledged by developer. (Wed, 03 Jun 2020 15:58:02 GMT) Full text and rfc822 format available.

Message #28 received at 41550-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Marcin Karpezo <sirmacik <at> wioo.waw.pl>
Cc: 41550-done <at> debbugs.gnu.org
Subject: Re: [bug#41550] [PATCH v4] gnu: Add Polish hunspell dictionary.
Date: Wed, 03 Jun 2020 17:57:11 +0200
Hi,

Marcin Karpezo <sirmacik <at> wioo.waw.pl> skribis:

> * gnu/packages/libreoffice.scm (hunspell-dict-pl): New variable.
> ---
> Based on Leo's suggestion I've changed source to last version mirrored
> by Arch Linux and version number accordingly.

Perfect.  Applied, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 02 Jul 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.