root/ghc-sdl2.scm

(define-module (hidamari-blue ghc-sdl2)
  #:use-module (ice-9 regex)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix utils)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system haskell)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages haskell)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages elf)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages sdl)
  #:use-module (gnu packages bootstrap)
  #:use-module (gnu packages zip)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages ghostscript)
  #:use-module (gnu packages libffi)
  #:use-module (gnu packages libedit)
  #:use-module (gnu packages lua)
  #:use-module (gnu packages multiprecision)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages python)
  #:use-module (gnu packages pcre)
  #:use-module (gnu packages xml)
  #:use-module (gnu packages xorg))

;;; this is an upgrade from 0.4.4
(define ghc-base-orphans
  (package
   (name "ghc-base-orphans")
   (version "0.5.4")
   (source
    (origin
     (method url-fetch)
     (uri (string-append
           "https://hackage.haskell.org/package/base-orphans/base-orphans-"
           version
           ".tar.gz"))
     (sha256
      (base32
       "0qv20n4yabg7sc3rs2dd46a53c7idnd88by7n3s36dkbc21m41q4"))))
   (build-system haskell-build-system)
   (inputs
    `(("ghc-quickcheck" ,ghc-quickcheck)
      ("ghc-hspec" ,ghc-hspec)
      ("hspec-discover" ,hspec-discover)))
   (home-page "https://hackage.haskell.org/package/base-orphans")
   (synopsis "Orphan instances for backwards compatibility")
   (description "This package defines orphan instances that mimic instances
available in later versions of base to a wider (older) range of compilers.")
   (license license:bsd-3)))

(define-public ghc-bytes
  (package
   (name "ghc-bytes")
   (version "0.15.2")
   (source
    (origin
     (method url-fetch)
     (uri (string-append
           "https://hackage.haskell.org/package/bytes/bytes-"
           version
           ".tar.gz"))
     (sha256
      (base32
       "0d0z4sgl608x50zxhi0mlbag8g69x5sxs8763sz24djd2mqazyhb"))))
   (build-system haskell-build-system)
   (inputs
    `(("ghc-cereal" ,ghc-cereal)
      ("ghc-void" ,ghc-void)
      ("ghc-mtl" ,ghc-mtl)
      ("ghc-scientific" ,ghc-scientific)
      ("ghc-doctest" ,ghc-doctest)
      ("ghc-transformers-compat" ,ghc-transformers-compat)))
   (home-page "https://hackage.haskell.org/package/bytes")
   (synopsis "bytes")
   (description "Sharing code for serialization between binary and cereal")
   (license license:bsd-3)))

(define-public ghc-linear
  (package
   (name "ghc-linear")
   (version "1.20.5")
   (source
    (origin
     (method url-fetch)
     (uri (string-append
           "https://hackage.haskell.org/package/linear/linear-"
           version
           ".tar.gz"))
     (sha256
      (base32
       "03fccjs8z7crp54azwwq2pk35mqzifmf3zzpbn92fz0y5wjbgn31"))))
   (build-system haskell-build-system)
   (inputs
    `(("ghc-vector" ,ghc-vector)
      ("ghc-void" ,ghc-void)
      ("ghc-hunit" ,ghc-hunit)
      ("ghc-adjunctions" ,ghc-adjunctions)
      ("ghc-base-orphans" ,ghc-base-orphans)
      ("ghc-bytes" ,ghc-bytes)
      ("ghc-cereal" ,ghc-cereal)
      ("ghc-distributive" ,ghc-distributive)
      ("ghc-doctest" ,ghc-doctest)
      ("ghc-lens" ,ghc-lens)
      ("ghc-reflection" ,ghc-reflection)
      ("ghc-semigroupoids" ,ghc-semigroupoids)
      ("ghc-simple-reflect" ,ghc-simple-reflect)
      ("ghc-test-framework" ,ghc-test-framework)
      ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
      ("ghc-transformers-compat" ,ghc-transformers-compat)))
   (home-page "https://hackage.haskell.org/package/linear")
   (synopsis "linear")
   (description "Types and combinators for linear algebra on free vector spaces")
   (license license:bsd-3)))

(define-public ghc-sdl2
  (package
   (name "ghc-sdl2")
   (version "2.2.0")
   (source
    (origin
     (method url-fetch)
     (uri (string-append
           "https://hackage.haskell.org/package/sdl2/sdl2-"
           version
           ".tar.gz"))
     (sha256
      (base32
       "1164g29vb77kn5xdl71fsv95kf1h59gq8jhszyj3jrckv3x86fjs"))))
   (build-system haskell-build-system)
   (inputs
    `(("sdl2" ,sdl2)
      ("statevar" ,ghc-statevar)
      ("ghc-exceptions" ,ghc-exceptions)
      ("ghc-text" ,ghc-text)
      ("ghc-vector" ,ghc-vector)
      ("ghc-linear" ,ghc-linear)))
   (native-inputs `(("pkg-config" ,pkg-config)))
   (home-page "https://hackage.haskell.org/package/sdl2")
   (synopsis "LibSDL2 for Haskell")
   (description "This package contains bindings to the SDL 2 library, in both high- and low-level forms:

The SDL namespace contains high-level bindings, where enumerations are split into sum types, and we perform automatic error-checking.

The SDL.Raw namespace contains an almost 1-1 translation of the C API into Haskell FFI calls. As such, this does not contain sum types nor error checking. Thus this namespace is suitable for building your own abstraction over SDL, but is not recommended for day-to-day programming. ")
   (license license:bsd-3)))

(define-public ghc-sdl2-ttf
  (package
   (name "ghc-sdl2-ttf")
   (version "1.0.0")
   (source
    (origin
     (method url-fetch)
     (uri (string-append
           "https://hackage.haskell.org/package/sdl2-ttf/sdl2-ttf-"
           version
           ".tar.gz"))
     (sha256
      (base32
       "07z57y44hsfa7nbh7jl9c2yska98vddi906kjmbf1qlj15g1b6rl"))))
   (build-system haskell-build-system)
   (inputs
    `(("sdl2-ttf" ,sdl2-ttf)
      ("ghc-sdl2" ,ghc-sdl2)
      ("ghc-linear" ,ghc-linear)))
   (native-inputs `(("pkg-config" ,pkg-config)))
   (home-page "https://hackage.haskell.org/package/sdl2-ttf")
   (synopsis "LibSDL2-ttf for Haskell")
   (description "")
   (license license:bsd-3)))

;; (define-public ghc-sdl2-image
;;   (package
;;    (name "ghc-sdl2-image")
;;    (version "0.1.3.2")
;;    (source
;;     (origin
;;      (method url-fetch)
;;      (uri (string-append
;;            "https://hackage.haskell.org/package/sdl2-image/sdl2-image-"
;;            version
;;            ".tar.gz"))
;;      (sha256
;;       (base32
;;        "0gps89yy4jzmlh5cdvs94mhmqlakqb99ldall3rirqdfhdv2wysj"))))
;;    (build-system haskell-build-system)
;;    (inputs
;;     `(("sdl2" ,sdl2)
;;       ("sdl2-image" ,sdl2-image)
;;       ("ghc-sdl2" ,ghc-sdl2)))
;;    (native-inputs `(("pkg-config" ,pkg-config)))
;;    (home-page "https://hackage.haskell.org/package/sdl2-image")
;;    (synopsis "Haskell binding to sdl2-image.")
;;    (description "")
;;    (license license:x11)))

;; ghc-sdl2-image