From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id QEuSHp/GnV80HwAA0tVLHw (envelope-from ) for ; Sat, 31 Oct 2020 20:18:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4Hp7Gp/GnV/ZUQAA1q6Kng (envelope-from ) for ; Sat, 31 Oct 2020 20:18:39 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 03E39940430 for ; Sat, 31 Oct 2020 20:18:38 +0000 (UTC) Received: from localhost ([::1]:41436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYxKf-0001fL-I7 for larch@yhetil.org; Sat, 31 Oct 2020 16:18:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYx6H-0007nT-Oh for guix-devel@gnu.org; Sat, 31 Oct 2020 16:03:46 -0400 Received: from latitanza.investici.org ([2001:888:2000:56::19]:39973) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYx6F-0005OS-2T for guix-devel@gnu.org; Sat, 31 Oct 2020 16:03:45 -0400 Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4CNqql39gxz8sgJ for ; Sat, 31 Oct 2020 20:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1604174611; bh=+BAWuModvpSi+dKat0j6xmYwXe+U8OWhajWmQZ0n/gA=; h=To:From:Subject:Date:From; b=PJEFEGXJChLtNziCRm/JeI+usnwa65b2tUiaUaMsanBc5TKZLfOfJn2Hg88EIhrG5 cUK9LDaGom3ny/RS3lKimfIG0hSsKgND2zCpPfAmJ9bU2C8SxRD+/1AulVTIWNFgml ANwuE/Kr2pC3U17y+2kaM9iKIvuIX0g/jeOsW/t0= Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4CNqql25wlz8sf8 for ; Sat, 31 Oct 2020 20:03:31 +0000 (UTC) To: guix-devel@gnu.org From: paul Subject: Hunspell dictionaries Message-ID: <300e0c1f-e40b-be4e-40ae-3139b89a123a@autistici.org> Date: Sat, 31 Oct 2020 21:03:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Icedove/78.3.3 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------3147BCDE54068EA745F8CDFB" Content-Language: en-US Received-SPF: pass client-ip=2001:888:2000:56::19; envelope-from=goodoldpaul@autistici.org; helo=latitanza.investici.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 31 Oct 2020 16:17:34 -0400 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=autistici.org header.s=stigmate header.b=PJEFEGXJ; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -0.11 X-TUID: abgPsDgH1cVZ This is a multi-part message in MIME format. --------------3147BCDE54068EA745F8CDFB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: base64 RGVhciBHdWl4ZXJzLAoKSSB3YXMgcGFja2FnaW5nIGFuIEl0YWxpYW4gZGljdGlvbmFyeSBm b3IgSHVuc3BlbGwsIHdoZW4gSSBmb3VuZCB0aGlzIApsaW5rIGxpc3RpbmcgYWxsIHRoZSBI dW5zcGVsbCBkaWN0aW9uYXJpZXMgc3VwcG9ydGVkIGJ5IExpYnJlb2ZmaWNlIFswXS4KClRo aXMgbGVhZCBtZSB0byB0aGluayBhYm91dCBhIGZ1bmN0aW9uIGZvciBkZWZpbmluZyBkaWN0 aW9uYXJ5IHBhY2thZ2VzIAoodmVyeSBtdWNoIGJhc2VkIG9uIGFzcGVsbC1kaWN0aW9uYXJ5 IGZyb20gKGdudSBwYWNrYWdlcyBhc3BlbGwpKS4KCgooZGVmaW5lKiAoaHVuc3BlbGwtZGlj dGlvbmFyeSBkaWN0LW5hbWUgZnVsbC1uYW1lICM6a2V5IGhvbWUtcGFnZSBsaWNlbnNlKQog wqAgKHBhY2thZ2UKIMKgwqDCoCAobmFtZSAoc3RyaW5nLWFwcGVuZAogwqDCoMKgwqDCoMKg wqDCoMKgwqAgImh1bnNwZWxsLWRpY3QtIgogwqDCoMKgwqDCoMKgwqDCoMKgwqAgOzsgRG93 bmNhc2UgYW5kIHJlcGxhY2UgdW5kZXJzY29yZSBpbiBwYWNrYWdlIG5hbWVzCiDCoMKgwqDC oMKgwqDCoMKgwqDC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RvcC5vcmcvbGlicmVvZmZpY2UvZGljdGlvbmFyaWVzCgo= --------------3147BCDE54068EA745F8CDFB Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Dear Guixers,

I was packaging an Italian dictionary for Hunspell, when I found this link listing all the Hunspell dictionaries supported by Libreoffice [0].

This lead me to think about a function for defining dictionary packages (very much based on aspell-dictionary from (gnu packages aspell)).


(define* (hunspell-dictionary dict-name full-name #:key home-page license)
  (package
    (name (string-append
           "hunspell-dict-"
           ;; Downcase and replace underscore in package names
           ;; to follow Guix naming conventions.
           (string-map (match-lambda
                         (#\_ #\-)
                         (chr chr))
                       (string-downcase dict-name))))
    (version (package-version libreoffice))
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url (string-append "https://anongit.freedesktop.org/git/"
                                 "libreoffice/dictionaries.git/"))
            (commit
              (string-append "libreoffice-" version))))
       (file-name (git-file-name "libreoffice-dictionaries" version))
      (sha256
        (base32 "0vvxnjpm1322ahf9q8bqs1yhkn7krglw8c6yazcf7a3jljykd9k9"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (delete 'configure)
         (delete 'build)
         (replace 'install              ;no install target
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (hunspell (string-append out "/share/hunspell/"))
                    (myspell (string-append out "/share/myspell")))
               (for-each
                (lambda (ext)
                  (install-file (string-append ,dict-name "/" ,dict-name ext)
                                hunspell))
                '(".aff" ".dic"))
               (symlink hunspell myspell)
               #t))))
       #:tests? #f))                    ; no tests
    (synopsis
     (string-append "Hunspell dictionary for " full-name " (" dict-name ")"))
    (description "This package provides a dictionary for the Hunspell
spell-checking library.")
    (license license)
    (home-page home-page)))


Do you think it would be worth to add it to (gnu packages libreoffice) to define dictionaries?

Cheers,

Giacomo


[0]: https://cgit.freedesktop.org/libreoffice/dictionaries

--------------3147BCDE54068EA745F8CDFB--