Add python-enchant

Julien LepillerFri May 04 18:58:02+0200 2018

c0c5eb5

Add python-enchant

more/packages/python.scm

1919
(define-module (more packages python)
2020
  #:use-module ((guix licenses) #:prefix license:)
2121
  #:use-module (gnu packages)
22+
  #:use-module (gnu packages aspell)
2223
  #:use-module (gnu packages audio)
2324
  #:use-module (gnu packages check)
2425
  #:use-module (gnu packages compression)
2526
  #:use-module (gnu packages databases)
27+
  #:use-module (gnu packages enchant)
28+
  #:use-module (gnu packages libreoffice)
2629
  #:use-module (gnu packages maths)
2730
  #:use-module (gnu packages networking)
2831
  #:use-module (gnu packages python)

689692
    (synopsis "")
690693
    (description "")
691694
    (license license:agpl3+)))
695+
696+
(define-public python-pyenchant
697+
  (package
698+
    (name "python-pyenchant")
699+
    (version "2.0.0")
700+
    (source (origin
701+
              (method url-fetch)
702+
              (uri (pypi-uri "pyenchant" version))
703+
              (sha256
704+
               (base32
705+
                "1872ckgdip8nj9rnh167m0gsj5754qfg2hjxzsl1s06f5akwscgw"))))
706+
    (build-system python-build-system)
707+
    (arguments
708+
     `(#:tests? #f; FIXME: Dictionary for language 'en_US' could not be found
709+
       #:phases
710+
       (modify-phases %standard-phases
711+
         (add-before 'build 'setenv
712+
           (lambda* (#:key inputs #:allow-other-keys)
713+
             (setenv "PYENCHANT_LIBRARY_PATH"
714+
                     (string-append (assoc-ref inputs "enchant") "/lib/libenchant.so")))))))
715+
    (inputs
716+
     `(("enchant" ,enchant)
717+
       ("hunspell" ,hunspell)))
718+
    (native-inputs
719+
     `(("hunspell-dict-en-us" ,hunspell-dict-en-us)))
720+
    (home-page "")
721+
    (synopsis "")
722+
    (description "")
723+
    (license license:lgpl2.1+)))
724+
725+
(define-public offlate
726+
  (package
727+
    (name "offlate")
728+
    (version "0.1")
729+
    (source (origin
730+
              (method git-fetch)
731+
              (uri (git-reference
732+
                     (url "https://framagit.org/tyreunom/offlate")
733+
                     (commit "ed8579552331ecdf5975c4bcbbf1f17651282b30")))
734+
              (sha256
735+
               (base32
736+
                "0hisx9x5a15yk3y18ra4mvca5iv7rcsnijcaly4z3aqc56bg1rm0"))))
737+
    ;(source (origin
738+
    ;          (method url-fetch)
739+
    ;          (uri (pypi-uri "offlate" version))
740+
    ;          (sha256
741+
    ;           (base32
742+
    ;            "1872ckgdip8nj9rnh167m0gsj5754qfg2hjxzsl1s06f5akwscgw"))))
743+
    (build-system python-build-system)
744+
    (arguments
745+
     `(#:tests? #f
746+
       #:phases
747+
       (modify-phases %standard-phases
748+
         (add-before 'build 'fix-setup
749+
           (lambda _
750+
             (substitute* "setup.py"
751+
               (("config', \\['d") "offlate', ['offlate/d"))
752+
             #t)))))
753+
    (propagated-inputs
754+
     `(("python-android-stringslib" ,python-android-stringslib)
755+
       ("python-dateutil" ,python-dateutil)
756+
       ("python-pyenchant" ,python-pyenchant)))
757+
    (home-page "https://framagit.org/tyreunom/offlate")
758+
    (synopsis "")
759+
    (description "")
760+
    (license license:gpl3+)))