tetronimo.scm 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
  2. ;; This program is free software: you can redistribute it and/or modify
  3. ;; it under the terms of the GNU General Public License as published by
  4. ;; the Free Software Foundation, either version 3 of the License, or
  5. ;; (at your option) any later version.
  6. ;; This program is distributed in the hope that it will be useful,
  7. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. ;; GNU General Public License for more details.
  10. ;; You should have received a copy of the GNU General Public License
  11. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  12. (define-module (tetronimo)
  13. #:use-module (guix packages)
  14. #:use-module (guix download)
  15. #:use-module (guix build-system gnu)
  16. #:use-module ((guix licenses) #:prefix license:)
  17. #:use-module (gnu packages ncurses))
  18. (define-public vitetris
  19. (package
  20. (name "vitetris")
  21. (version "0.57")
  22. (source
  23. (origin
  24. (method url-fetch)
  25. (uri (string-append "http://www.victornils.net/tetris/"
  26. name "-" version ".tar.gz"))
  27. (sha256
  28. (base32
  29. "1hndj6mh010zfyqfzihhslkvhffd3dzsh5jyyrl8jbvfn74ad7qc"))))
  30. (build-system gnu-build-system)
  31. (arguments
  32. '(#:configure-flags '("CC=gcc")
  33. ;; The default $INSTALL variable tries to impose root user permissions
  34. ;; on its files and folders, but the root user is not present in the
  35. ;; build environment.
  36. #:make-flags '("INSTALL=install")
  37. #:tests? #f ; no check target
  38. #:phases
  39. (modify-phases %standard-phases
  40. (replace 'configure
  41. (lambda* (#:key outputs configure-flags #:allow-other-keys)
  42. (zero? (apply system* "./configure"
  43. (string-append "--prefix="
  44. (assoc-ref outputs "out"))
  45. configure-flags))))
  46. (add-after 'install 'rename-binary
  47. (lambda* (#:key outputs #:allow-other-keys)
  48. (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
  49. (rename-file (string-append bin "/tetris")
  50. (string-append bin "/vitetris")))
  51. #t)))))
  52. (home-page "http://www.victornils.net/tetris/")
  53. (synopsis "Terminal-based tetromino game")
  54. (description
  55. "vitetris is a terminal-based tetromino game with gameplay much like the
  56. early Tetris games by Nintendo.")
  57. (license license:bsd-2)))
  58. (define-public yetris
  59. (package
  60. (name "yetris")
  61. (version "2.3.0")
  62. (source
  63. (origin
  64. (method url-fetch)
  65. (uri (string-append "https://github.com/alexdantas/"
  66. name "/archive/v" version ".tar.gz"))
  67. (file-name (string-append name "-" version ".tar.gz"))
  68. (sha256
  69. (base32
  70. "06dr4gbmk6iwy1x7za37i10xsqdfy3w39v6g5mg8a7in4lij433j"))))
  71. (build-system gnu-build-system)
  72. (arguments
  73. '(#:tests? #f ; no test target
  74. ;; Set DESTDIR to the appropriate folder, remove the "/usr" prefix from
  75. ;; the installation's base directory, and set gcc as the C compiler.
  76. #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
  77. "PREFIX=" "CC=gcc")
  78. #:phases
  79. (modify-phases %standard-phases
  80. (delete 'configure)))) ; no configure script
  81. (inputs `(("ncurses" ,ncurses)))
  82. (home-page "https://github.com/alexdantas/yetris")
  83. (synopsis "Customizable tetromino game with a textual interface")
  84. (description "yetris is a customizable tetromino game for the terminal.
  85. Features include:
  86. @enumerate
  87. @item Colors and animated interface
  88. @item Customizable gameplay, with several game mode possibilities: ghost piece,
  89. hold piece, slide left/right, invisible and custom initial level and noise
  90. (like the old B-mode)
  91. @item Customizable interface: up to 7 next pieces, toggle game borders, center
  92. screen, modify game random algorithm
  93. @item Settings available on in-game menus and options
  94. @item Game profiles: settings are automatically saved and restored at startup.
  95. Multple profiles supported.
  96. @item Game statistics: cleared lines, individual and total pieces
  97. @end enumerate")
  98. (license license:gpl3+)))