summaryrefslogtreecommitdiff
path: root/rodion/packages/games.scm
diff options
context:
space:
mode:
authorRodion Goritskov <rodion.goritskov@gmail.com>2024-06-03 21:09:55 +0400
committerRodion Goritskov <rodion.goritskov@gmail.com>2024-06-03 21:09:55 +0400
commit394cf8f71aef45ad2529fa889690d76cbe2fbbb1 (patch)
tree6b937e7503940988864550e8205ac35d88b9edbd /rodion/packages/games.scm
parentf71bfbf250ae2730691be78b62583b9607f6b923 (diff)
parent0130f144e8d7690a5b08118f402aa7a6be613902 (diff)
Merge branch 'master' of ssh://ssh.goritskov.com:10022/rodion/little-guix-channel
Diffstat (limited to 'rodion/packages/games.scm')
-rw-r--r--rodion/packages/games.scm103
1 files changed, 103 insertions, 0 deletions
diff --git a/rodion/packages/games.scm b/rodion/packages/games.scm
new file mode 100644
index 0000000..e81fe26
--- /dev/null
+++ b/rodion/packages/games.scm
@@ -0,0 +1,103 @@
+(define-module (rodion packages games)
+ #:use-module (guix packages)
+ #:use-module (guix build-system copy)
+ #:use-module (guix build-system cmake)
+ #:use-module (guix git-download)
+ #:use-module (guix gexp)
+ #:use-module (gnu packages sdl)
+ #:use-module (gnu packages compression)
+ #:use-module ((guix licenses) #:prefix license:))
+
+(define-public fpattern
+ (package
+ (name "fpattern")
+ (version "1.9")
+ (build-system copy-build-system)
+ (home-page "https://github.com/Loadmaster/fpattern")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Loadmaster/fpattern")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "0lm5afk18a6m4wib4xvslik9zz00r36zvdrrgjbwd8d8550cq2zx"))))
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'build-library
+ (lambda* (#:key inputs #:allow-other-keys)
+ (invoke "gcc" "-c" "-Wall" "-fpic" "fpattern.c")
+ (invoke "gcc" "-shared" "-o" "libfpattern.so" "fpattern.o"))))
+ #:install-plan ''(("libfpattern.so" "lib/")
+ ("fpattern.h" "include/"))))
+ (license license:expat)
+ (description "Filename pattern matching library functions")
+ (synopsis "Filename pattern matching library functions for DOS, Windows, and Unix.
+
+Functions for matching filename patterns to filenames. Written in C. Provided as an object file (fpattern.obj) and a header include source file (fpattern.h).
+
+Filename patterns are composed of regular (printable) characters which may comprise a filename, as well as special pattern matching characters. A filename patterns is a special kind of regular expression, except that it is not as general and is designed to match only file and directory names instead of arbitrary text strings. The syntax is borrowed from Unix, and is a superset of the MS-DOS and Windows syntax.")))
+
+(define-public fallout-ce
+ (package
+ (name "fallout-ce")
+ (version "1.1.0")
+ (build-system cmake-build-system)
+ (home-page "https://github.com/alexbatalov/fallout1-ce")
+ (inputs (list sdl2
+ fpattern))
+ (arguments
+ (list
+ #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (copy-file "fallout-ce" (string-append bin "/fallout-ce"))))))))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/alexbatalov/fallout1-ce")
+ (commit (string-append "v" version))))
+ (patches `(,(local-file "./patches/0001-fallout-ce-fpattern.patch")))
+ (sha256
+ (base32 "0c11zbvja42s0z8zqfm6gf981m0v2vwxvhqas46lplwbfhbnh836"))))
+ (license license:expat)
+ (description "Fallout")
+ (synopsis "Fallout")))
+
+(define-public fallout2-ce
+ (package
+ (name "fallout2-ce")
+ (version "1.3.0")
+ (build-system cmake-build-system)
+ (home-page "https://github.com/alexbatalov/fallout2-ce")
+ (inputs (list sdl2
+ fpattern
+ zlib))
+ (arguments
+ (list
+ #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (copy-file "fallout2-ce" (string-append bin "/fallout2-ce"))))))))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/alexbatalov/fallout2-ce")
+ (commit (string-append "v" version))))
+ (patches `(,(local-file "./patches/0001-fallout2-ce-fpattern.patch")))
+ (sha256
+ (base32 "15b30i2ixq0w01qxrymd1qs1awj8kijbqzac8wvfrpm85fdnfnmg"))))
+ (license license:expat)
+ (description "Fallout")
+ (synopsis "Fallout")))