iso-codes.scm 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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 build-system gnu)
  25. #:use-module (guix build-system python)
  26. #:use-module (gnu packages gettext)
  27. #:use-module (gnu packages perl)
  28. #:use-module (gnu packages python))
  29. (define-public iso-codes
  30. (package
  31. (name "iso-codes")
  32. (version "3.77")
  33. (source (origin
  34. (method url-fetch)
  35. (uri (string-append
  36. "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-"
  37. version ".tar.xz"))
  38. (sha256
  39. (base32
  40. "140dgygv22a49xb8x1941xr5ff12cphd9zzwxds98pgrqsj77k91"))))
  41. (build-system gnu-build-system)
  42. (inputs
  43. `(("gettext" ,gettext-minimal)
  44. ("perl" ,perl)
  45. ("python" ,python-wrapper)))
  46. (home-page "https://salsa.debian.org/iso-codes-team/iso-codes")
  47. (synopsis "Various ISO standards")
  48. (description
  49. "This package provides lists of various ISO standards (e.g. country,
  50. language, language scripts, and currency names) in one place, rather
  51. than repeated in many programs throughout the system.
  52. Currently there are lists of languages and countries embedded in
  53. several different programs, which leads to dozens of lists of
  54. 200 languages, translated into more than 30 languages... not
  55. very efficient.
  56. With this package, we create a single \"gettext domain\" for every
  57. supported ISO standard which contains the translations of
  58. that domain. It is easy for a programmer to re-use those
  59. translations instead of maintaining their own translation
  60. infrastructure. Moreover, the programmer does not need to follow
  61. changes in the ISO standard and will not work with outdated
  62. information.")
  63. (license license:gpl2+))) ; some bits use the lgpl2
  64. (define-public python-iso639
  65. (package
  66. (name "python-iso639")
  67. (version "0.4.5")
  68. (source
  69. (origin
  70. (method url-fetch)
  71. (uri (pypi-uri "iso-639" version))
  72. (sha256
  73. (base32
  74. "0jffmh4m20q8j27xb2fqbnlghjj0cx8pgsbzqisdg65qh2wd976w"))))
  75. (build-system python-build-system)
  76. (home-page "https://github.com/noumar/iso639")
  77. (synopsis "Python library for ISO 639 standard")
  78. (description "This package provides a Python library for ISO 639 standard
  79. that is concerned with representation of names for languages and language
  80. groups.")
  81. (license license:agpl3+)))
  82. (define-public python2-iso639
  83. (package-with-python2 python-iso639))
  84. (define-public python-iso3166
  85. (package
  86. (name "python-iso3166")
  87. (version "0.9")
  88. (source
  89. (origin
  90. (method url-fetch)
  91. (uri (pypi-uri "iso3166" version))
  92. (sha256
  93. (base32
  94. "0hm0xm30sprk1jssmn4cqks0x3nx5fp8r5ypvahcysmmayzrsnjl"))))
  95. (build-system python-build-system)
  96. (home-page "https://github.com/deactivated/python-iso3166")
  97. (synopsis "Self-contained ISO 3166-1 country definitions")
  98. (description "This package provides the ISO 3166-1 country definitions.")
  99. (license license:expat)))
  100. (define-public python2-iso3166
  101. (package-with-python2 python-iso3166))