summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Pykhalov <go.wigust@gmail.com>2020-01-03 06:27:57 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2020-01-03 14:42:32 +0300
commit9a03249963bc9f92c842f1363de201cd1b6d7dcf (patch)
tree8f4626b39a3a5d3434d2288410e9a42fef745af0
parentguix: tome4: Comment mod/class/Game.lua color substitution. (diff)
downloadguix-wigust-9a03249963bc9f92c842f1363de201cd1b6d7dcf.tar.gz
guix: Move tome4-with-addons to tome4-with-addons-custom.
Use https://gitlab.com/wigust/guix-tome4 channel. * guix/wigust/packages/games.scm (tome4-with-addons): Delete variable. * guix/wigust/packages/tome4.scm: New file.
-rw-r--r--.guix-channel6
-rw-r--r--guix/wigust/packages/games.scm44
-rw-r--r--guix/wigust/packages/tome4.scm32
3 files changed, 37 insertions, 45 deletions
diff --git a/.guix-channel b/.guix-channel
index 8cec433..0b90677 100644
--- a/.guix-channel
+++ b/.guix-channel
@@ -1,3 +1,7 @@
(channel
(version 0)
- (directory "guix"))
+ (directory "guix")
+ (dependencies
+ (channel
+ (name guix-tome4)
+ (url "https://cgit.duckdns.org/git/guix/guix-tome4"))))
diff --git a/guix/wigust/packages/games.scm b/guix/wigust/packages/games.scm
index a178de9..500ce99 100644
--- a/guix/wigust/packages/games.scm
+++ b/guix/wigust/packages/games.scm
@@ -169,47 +169,3 @@ lots of other utilities frequently used in roguelikes.")
(synopsis "")
(description "")
(license license:gpl3+)))
-
-(define-public tome4-with-addons
- (package
- (inherit tome4)
- (name "tome4-with-addons")
- (version (package-version tome4))
- (inputs
- `(;; You need get and place on your computer the following files:
-
- ;; https://www.gog.com/game/tales_of_majeyal_ashes_of_urhrok
- ("ashes-urhrok.teaac" ,(local-file "/opt/tome4/rootfs/opt/tome4/game/t-engine4-linux64/game/addons/ashes-urhrok.teaac"))
-
- ;; https://www.gog.com/game/tales_of_majeyal_forbidden_cults
- ("cults.teaac" ,(local-file "/opt/tome4/rootfs/opt/tome4/game/t-engine4-linux64/game/addons/cults.teaac"))
-
- ;; https://www.gog.com/game/tales_of_majeyal_embers_of_rage
- ("orcs.teaac" ,(local-file "/opt/tome4/rootfs/opt/tome4/game/t-engine4-linux64/game/addons/orcs.teaac"))
- ,@(package-inputs tome4)))
- (native-inputs
- `(("zip" ,zip)
- ,@(package-native-inputs tome4)))
- (arguments
- (substitute-keyword-arguments
- (package-arguments tome4)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'install 'install-addons
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (for-each (lambda (file)
- (install-file (assoc-ref inputs file)
- (string-append (assoc-ref outputs "out")
- "/share/tome4/game/addons")))
- '("ashes-urhrok.teaac" "cults.teaac" "orcs.teaac"))))
- (add-before 'install 'my-customizations
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((unzip (string-append (assoc-ref inputs "unzip") "/bin/unzip"))
- (zip (string-append (assoc-ref inputs "zip") "/bin/zip")))
- (let ((archive (string-append "game/modules/tome-" ,version ".team")))
- (mkdir-p "mod/class")
- (system* unzip "-j" archive "mod/class/Game.lua" "-d" "mod/class")
- ;; Change tactic grid color from yellow to black.
- (substitute* "mod/class/Game.lua"
- (("d5990880") "1a1a1a80"))
- (system* zip archive "mod/class/Game.lua")))))))))))
diff --git a/guix/wigust/packages/tome4.scm b/guix/wigust/packages/tome4.scm
new file mode 100644
index 0000000..a8833a6
--- /dev/null
+++ b/guix/wigust/packages/tome4.scm
@@ -0,0 +1,32 @@
+(define-module (wigust packages tome4)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages games)
+ #:use-module (guix build-system trivial)
+ #:use-module (guix download)
+ #:use-module (guix packages)
+ #:use-module (guix utils)
+ #:use-module (tome4 packages tome4))
+
+(define-public tome4-with-addons-custom
+ (package
+ (inherit tome4-with-addons)
+ (name "tome4-with-addons-custom")
+ (version (package-version tome4))
+ (arguments
+ (substitute-keyword-arguments
+ (package-arguments tome4-with-addons)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'install 'my-customizations
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((unzip (string-append (assoc-ref inputs "unzip") "/bin/unzip"))
+ (zip (string-append (assoc-ref inputs "zip") "/bin/zip")))
+ (let ((archive (string-append "game/modules/tome-" ,version ".team")))
+ (mkdir-p "mod/class")
+ (system* unzip "-j" archive "mod/class/Game.lua" "-d" "mod/class")
+ ;; Change tactic grid color from yellow to black.
+ (substitute* "mod/class/Game.lua"
+ (("d5990880") "1a1a1a80"))
+ (system* zip archive "mod/class/Game.lua")))))))))))