summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2020-06-12 11:22:53 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2020-06-21 23:14:16 +0200
commit6d7ed7c05019fac74ff8b63f59f298ffb51cd40c (patch)
tree8f25b4e3d975843f4d0c7d6672cecc8779daefb6
parentgnu: Add font-mplus-testflight. (diff)
downloadguix-6d7ed7c05019fac74ff8b63f59f298ffb51cd40c.tar.gz
guix-6d7ed7c05019fac74ff8b63f59f298ffb51cd40c.tar.bz2
guix-6d7ed7c05019fac74ff8b63f59f298ffb51cd40c.tar.xz
gnu: Add seahorse-adventures.
* gnu/packages/games.scm (seahorse-adventures): New variable.
-rw-r--r--gnu/packages/games.scm112
1 files changed, 112 insertions, 0 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 76ddbab..25ee733 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -1774,6 +1774,118 @@ can be explored and changed freely.")
1774 license:gpl3+ 1774 license:gpl3+
1775 license:silofl1.1)))) 1775 license:silofl1.1))))
1776 1776
1777(define-public seahorse-adventures
1778 (package
1779 (name "seahorse-adventures")
1780 (version "1.2")
1781 (source
1782 (origin
1783 (method git-fetch)
1784 (uri (git-reference
1785 (url "https://github.com/dulsi/seahorse-adventures.git")
1786 (commit (string-append "release-" version))))
1787 (file-name (git-file-name name version))
1788 (sha256
1789 (base32 "1rnvk06npaqcpjz5z6xcmssz61i32s422lydp49vrnf3j2g4yimd"))
1790 (modules '((guix build utils)
1791 (ice-9 ftw)
1792 (srfi srfi-1)))
1793 ;; Remove non-free (non-commercial) font.
1794 (snippet
1795 `(begin
1796 (for-each delete-file (find-files "data/fonts" "."))
1797 #t))))
1798 (build-system python-build-system)
1799 (arguments
1800 `(#:tests? #f ;no test
1801 #:phases
1802 (modify-phases %standard-phases
1803 (delete 'build) ;pure Python
1804 (replace 'install ;no install script
1805 (lambda* (#:key outputs #:allow-other-keys)
1806 (let* ((out (assoc-ref outputs "out"))
1807 (bin (string-append out "/bin"))
1808 (share (string-append out "/share"))
1809 (applications (string-append share "/applications"))
1810 (data (string-append share "/seahorse-adventures")))
1811 ;; Install data.
1812 (for-each (lambda (f)
1813 (chmod f #o555)
1814 (install-file f data))
1815 '("leveledit.py" "run_game.py" "tileedit.py"))
1816 (for-each (lambda (dir)
1817 (let ((target (string-append data "/" dir)))
1818 (mkdir-p target)
1819 (copy-recursively dir target)))
1820 '("data" "lib"))
1821 ;; Create executable.
1822 (mkdir-p bin)
1823 (let ((executable (string-append bin "/seahorse-adventures")))
1824 (call-with-output-file executable
1825 (lambda (p)
1826 (format p
1827 "#!~a~@
1828 export PYTHONPATH=~a:~a~@
1829 exec -a \"~a\" ~a \"$@\"~%"
1830 (which "bash") data (getenv "PYTHONPATH")
1831 (which "python3")
1832 (string-append data "/run_game.py"))))
1833 (chmod executable #o555))
1834 ;; Add desktop file.
1835 (mkdir-p applications)
1836 (make-desktop-entry-file
1837 (string-append applications "/seahorse-adventures.desktop")
1838 #:name "Seahorse Adventures"
1839 #:comment
1840 '((#f "Help Barbie the seahorse float on bubbles to the moon"))
1841 #:exec ,name
1842 #:icon ,name
1843 #:categories '("Game" "ActionGame")
1844 #:keywords '("game" "retro" "platform"))
1845 ;; Add icons.
1846 (for-each
1847 (lambda (size)
1848 (let ((dir (string-append share "/icons/hicolor/"
1849 size "x" size "/apps")))
1850 (mkdir-p dir)
1851 (copy-file
1852 (string-append "icon" size ".png")
1853 (string-append dir "/searhorse-adventures.png"))))
1854 '("32" "64" "128")))
1855 #t))
1856 (add-after 'install 'unbundle-fonts
1857 ;; Unbundle Bitstream Vera font and replace deleted one.
1858 (lambda* (#:key outputs inputs #:allow-other-keys)
1859 (let* ((out (assoc-ref outputs "out"))
1860 (data (string-append out "/share/seahorse-adventures"))
1861 (vera (string-append (assoc-ref inputs "font-bitstream-vera")
1862 "/share/fonts/truetype/Vera.ttf")))
1863 (let ((themes-dir (string-append data "/data/themes/")))
1864 (for-each
1865 (lambda (theme)
1866 (let ((target (string-append themes-dir theme "/Vera.ttf")))
1867 (delete-file target)
1868 (symlink vera target)))
1869 '("default" "gray")))
1870 (symlink vera (string-append data "/data/fonts/04B_20__.TTF"))
1871 (substitute* (string-append data "/lib/main.py")
1872 (("f_scale = 0.35") "f_scale = 0.47")))
1873 #t)))))
1874 (inputs
1875 `(("font-bitstream-vera" ,font-bitstream-vera)
1876 ("python-pygame" ,python-pygame)))
1877 (home-page "http://www.imitationpickles.org/barbie/")
1878 (synopsis "Help Barbie the seahorse float on bubbles to the moon")
1879 (description
1880 "Barbie Seahorse Adventures is a retro style platform arcade game.
1881You are Barbie the seahorse who travels through the jungle, up to the
1882volcano until you float on bubbles to the moon. On the way to your
1883final destination you will encounter various enemies, servants of the
1884evil overlord who has stolen the galaxy crystal. Avoid getting hit
1885and defeat them with your bubbles!")
1886 ;; GPL2+ is for code, CC0 is for art.
1887 (license (list license:gpl2+ license:cc0))))
1888
1777(define-public superstarfighter 1889(define-public superstarfighter
1778 (package 1890 (package
1779 (name "superstarfighter") 1891 (name "superstarfighter")