iso-codes.scm 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
  3. ;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
  4. ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
  5. ;;;
  6. ;;; This file is part of GNU Guix.
  7. ;;;
  8. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  9. ;;; under the terms of the GNU General Public License as published by
  10. ;;; the Free Software Foundation; either version 3 of the License, or (at
  11. ;;; your option) any later version.
  12. ;;;
  13. ;;; GNU Guix is distributed in the hope that it will be useful, but
  14. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;;; GNU General Public License for more details.
  17. ;;;
  18. ;;; You should have received a copy of the GNU General Public License
  19. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  20. (define-module (gnu packages iso-codes)
  21. #:use-module ((guix licenses) #:prefix license:)
  22. #:use-module (guix packages)
  23. #:use-module (guix download)
  24. #:use-module (guix git-download)
  25. #:use-module (guix build-system gnu)
  26. #:use-module (guix build-system python)
  27. #:use-module (gnu packages gettext)
  28. #:use-module (gnu packages perl)
  29. #:use-module (gnu packages python))
  30. (define-public iso-codes
  31. (package
  32. (name "iso-codes")
  33. (version "4.5.0")
  34. (home-page "https://salsa.debian.org/iso-codes-team/iso-codes")
  35. (source (origin
  36. (method git-fetch)
  37. (uri (git-reference
  38. (url home-page)
  39. (commit (string-append "iso-codes-" version))))
  40. (file-name (git-file-name name version))
  41. (sha256
  42. (base32
  43. "1q6x9c5x4x0x4q11iygldsmxdyzhz1mb4n8im76glwsgqsqyjs80"))))
  44. (build-system gnu-build-system)
  45. ;; TODO(staging): Unconditionally move inputs to native-inputs.
  46. (native-inputs
  47. (if (%current-target-system)
  48. `(("python" ,python-wrapper)
  49. ("perl" ,perl)
  50. ("gettext" ,gettext-minimal))
  51. '()))
  52. (inputs
  53. `(,@(if (%current-target-system)
  54. '()
  55. `(("gettext" ,gettext-minimal)
  56. ("perl" ,perl)
  57. ("python" ,python-wrapper)))))
  58. (synopsis "Various ISO standards")
  59. (description
  60. "This package provides lists of various ISO standards (e.g. country,
  61. language, language scripts, and currency names) in one place, rather
  62. than repeated in many programs throughout the system.
  63. Currently there are lists of languages and countries embedded in
  64. several different programs, which leads to dozens of lists of
  65. 200 languages, translated into more than 30 languages... not
  66. very efficient.
  67. With this package, we create a single \"gettext domain\" for every
  68. supported ISO standard which contains the translations of
  69. that domain. It is easy for a programmer to re-use those
  70. translations instead of maintaining their own translation
  71. infrastructure. Moreover, the programmer does not need to follow
  72. changes in the ISO standard and will not work with outdated
  73. information.")
  74. (license license:gpl2+))) ; some bits use the lgpl2
  75. (define-public python-iso639
  76. (package
  77. (name "python-iso639")
  78. (version "0.4.5")
  79. (source
  80. (origin
  81. (method url-fetch)
  82. (uri (pypi-uri "iso-639" version))
  83. (sha256
  84. (base32
  85. "0jffmh4m20q8j27xb2fqbnlghjj0cx8pgsbzqisdg65qh2wd976w"))))
  86. (build-system python-build-system)
  87. (home-page "https://github.com/noumar/iso639")
  88. (synopsis "Python library for ISO 639 standard")
  89. (description "This package provides a Python library for ISO 639 standard
  90. that is concerned with representation of names for languages and language
  91. groups.")
  92. (license license:agpl3+)))
  93. (define-public python2-iso639
  94. (package-with-python2 python-iso639))
  95. (define-public python-iso3166
  96. (package
  97. (name "python-iso3166")
  98. (version "0.9")
  99. (source
  100. (origin
  101. (method url-fetch)
  102. (uri (pypi-uri "iso3166" version))
  103. (sha256
  104. (base32
  105. "0hm0xm30sprk1jssmn4cqks0x3nx5fp8r5ypvahcysmmayzrsnjl"))))
  106. (build-system python-build-system)
  107. (home-page "https://github.com/deactivated/python-iso3166")
  108. (synopsis "Self-contained ISO 3166-1 country definitions")
  109. (description "This package provides the ISO 3166-1 country definitions.")
  110. (license license:expat)))
  111. (define-public python2-iso3166
  112. (package-with-python2 python-iso3166))