You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.8 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages logo)
  19. #:use-module (gnu packages qt)
  20. #:use-module ((guix licenses) #:prefix license:)
  21. #:use-module (guix download)
  22. #:use-module (guix packages)
  23. #:use-module (guix build-system gnu))
  24. (define-public qlogo
  25. (package
  26. (name "qlogo")
  27. (version "0.92")
  28. (source
  29. (origin
  30. (method url-fetch)
  31. (uri (string-append "https://qlogo.org/assets/sources/QLogo-"
  32. version ".tgz"))
  33. (sha256
  34. (base32
  35. "0cpyj1ji6hjy7zzz05672f0j6fr0mwpc1y3sq36hhkv2fkpidw22"))))
  36. (build-system gnu-build-system)
  37. (inputs
  38. `(("qtbase" ,qtbase)))
  39. (arguments
  40. `(#:phases
  41. (modify-phases %standard-phases
  42. (replace 'configure
  43. (lambda* (#:key outputs #:allow-other-keys)
  44. (substitute* "QLogo.pro"
  45. (("target\\.path = /usr/bin")
  46. (string-append "target.path = "
  47. (assoc-ref outputs "out") "/bin")))
  48. (invoke "qmake" "QLogo.pro")))
  49. ;; The check phase rebuilds the source for tests. So, it needs to be
  50. ;; run after the install phase has installed the outputs of the build
  51. ;; phase.
  52. (delete 'check)
  53. (add-after 'install 'check
  54. (lambda _
  55. ;; Clean files created by the build phase.
  56. (invoke "make" "clean")
  57. ;; QLogo tries to create its "dribble file" in the home
  58. ;; directory. So, set HOME.
  59. (setenv "HOME" "/tmp")
  60. ;; Build and run tests.
  61. (invoke "qmake" "TestQLogo.pro")
  62. (invoke "make" "-j" (number->string (parallel-job-count)))
  63. (invoke "./testqlogo"))))))
  64. (home-page "https://qlogo.org")
  65. (synopsis "Logo interpreter using Qt and OpenGL")
  66. (description "QLogo is an interpreter for the Logo language written in C++
  67. using Qt and OpenGL. Specifically, it mimics, as reasonably as possible, the
  68. UCBLogo interpreter.")
  69. (license license:gpl2+)))