Guix: Move Linux-nonfree, winetricks, unrar, Duke3D, SORR to Guix Gaming Channels

master
Pierre Neidhardt 2019-03-24 12:48:05 +01:00
parent 6165dc4d5c
commit 018a685918
9 changed files with 39 additions and 897 deletions

View File

@ -1,5 +1,18 @@
(cons* ;; (channel
;; (name 'guix-chromium)
;; (url "https://gitlab.com/mbakke/guix-chromium.git")
;; (branch "master"))
(cons*
(channel
(name 'non-free-applications)
(url "https://gitlab.com/guix-gaming-channels/applications.git")
(branch "master"))
(channel
(name 'non-free-games)
(url "https://gitlab.com/guix-gaming-channels/games.git")
(branch "master"))
(channel
(name 'non-free-duke-nukem-3d)
(url "https://gitlab.com/guix-gaming-channels/duke-nukem-3d.git")
(branch "master"))
;; (channel
;; (name 'guix-chromium)
;; (url "https://gitlab.com/mbakke/guix-chromium.git")
;; (branch "master"))
%default-channels)

View File

@ -1,13 +1,22 @@
(use-modules (srfi srfi-1))
(cons* (channel
(name 'guix-chromium)
(url "https://gitlab.com/mbakke/guix-chromium.git")
(branch "master"))
;; The following channel can be used as an alternative to
;; %default-channels to avoid rebuilding Guix on =guix pull=.
(list
(channel
(inherit (first %default-channels))
;; Get commit from =guix describe -f channels=.
(commit "6df215f8c8ad0ed4afd8c32a0414cf2ac7ec8983"))))
(cons*
(channel
(name 'non-free-applications)
(url "https://gitlab.com/guix-gaming-channels/applications.git")
(branch "master"))
(channel
(name 'non-free-games)
(url "https://gitlab.com/guix-gaming-channels/games.git")
(branch "master"))
(channel
(name 'non-free-duke-nukem-3d)
(url "https://gitlab.com/guix-gaming-channels/duke-nukem-3d.git")
(branch "master"))
;; The following channel can be used as an alternative to
;; %default-channels to avoid rebuilding Guix on =guix pull=.
(list
(channel
(inherit (first %default-channels))
;; Get commit from =guix describe -f channels=.
(commit "77f3d3036406b1d1ceaeba8017ae5f597f2a0fb4"))))

View File

@ -1,401 +0,0 @@
(define-module (ambrevar games)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (srfi srfi-1)
#:use-module (guix utils)
#:use-module ((guix build-system gnu) #:select (gnu-build-system))
#:use-module ((guix build-system trivial) #:select (trivial-build-system))
;; Inputs
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module ((gnu packages sdl) #:select (sdl-union sdl2 sdl2-mixer))
#:use-module ((gnu packages gl) #:select (glu))
#:use-module ((gnu packages pkg-config) #:select (pkg-config))
#:use-module ((gnu packages xiph) #:select (libvorbis flac))
#:use-module ((gnu packages video) #:select (libvpx))
#:use-module ((gnu packages gtk) #:select (gtk+-2)))
(define (version-minor version-string)
"Return minor version number.
For example, (version-minor \"2.1.47.4.23\") returns \"1\"."
(second (string-split version-string #\.)))
(define duke-nukem-3d-directory "share/dukenukem3d")
(define-public duke-nukem-3d-shareware
(package
(name "duke-nukem-3d-shareware")
(version "1.3d")
(source
(origin
(method url-fetch)
(uri (string-append "http://hendricks266.duke4.net/files/3dduke13_data.7z"))
(sha256
(base32 "1v0d0pr09m3dcnylyckv5731s4rgknp1dagr2mm4mr0n9k5w7k9z"))))
(build-system trivial-build-system)
(native-inputs
`(("p7zip" ,p7zip)))
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(setenv "PATH" (string-append
(assoc-ref %build-inputs "p7zip") "/bin" ":"))
(invoke "7z" "x" (assoc-ref %build-inputs "source"))
(let ((data (string-append (assoc-ref %outputs "out") "/" ,duke-nukem-3d-directory)))
(mkdir-p data)
(copy-file "DUKE.RTS" (string-append data "/duke.rts"))
(copy-file "DUKE3D.GRP" (string-append data "/duke3d.grp")))
#t)))
(synopsis "Data files from Duke Nukem 3D")
(description "Those are only the data files from Duke Nukem 3D.
You'll need eduke32 to play.")
(home-page "https://legacy.3drealms.com/duke3d/")
(license ((@@ (guix licenses) license) "Duke Nukem 3D license"
;; TODO: License?
"https://legacy.3drealms.com/duke3d/"
""))))
(define-public duke-nukem-3d-high-resolution-pack
(package
(name "duke-nukem-3d-high-resolution-pack")
(version "5.4")
(source
(origin
(method url-fetch)
(uri (string-append "http://www.duke4.org/files/nightfright/hrp/duke3d_hrp.zip"))
(file-name (string-append name "-" version))
(sha256
(base32 "19bqvippx8n46x772gi5k7dgl0j4bvik643k8580a4agdd2xy5zj"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let ((dir (string-append (assoc-ref %outputs "out")
"/" ,duke-nukem-3d-directory)))
(mkdir-p dir)
(copy-file (assoc-ref %build-inputs "source")
(string-append dir "/duke3d_hrp.zip")))
#t)))
(synopsis "High definition textures and models for Duke Nukem 3D")
(description "For all Duke fans who want to play the game again in a modern
Windows environment with 3D accelerated graphics, the Duke3D community has
created the High Resolution Pack (HRP). Utilizing the amazing skills of various
texturing and modelling artists, the project´s goal is to replace all textures
and sprites with high-res versions, optimizing it for latest OpenGL ports.")
(home-page "http://hrp.duke4.net/")
(license ((@@ (guix licenses) license) "HRP art license"
"http://hrp.duke4.net/hrp_art_license.txt"
""))))
(define-public duke-nukem-3d-high-resolution-pack-duke-dc
(package
(name "duke-nukem-3d-high-resolution-pack-duke-dc")
(version "1.64")
(source
(origin
(method url-fetch)
(uri (string-append "http://www.duke4.org/files/nightfright/related/"
"dukedc_hrp.zip"))
(file-name (string-append name "-" version))
(sha256
(base32 "04ml1w2hgjgskdqg8jbfpcyrjm4c7cwq75wc8b6fjx7bid9mbcrx"))))
(build-system trivial-build-system)
(propagated-inputs
`(("hrp" ,duke-nukem-3d-high-resolution-pack)))
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let ((dir (string-append (assoc-ref %outputs "out")
"/" ,duke-nukem-3d-directory)))
(mkdir-p dir)
(copy-file (assoc-ref %build-inputs "source")
(string-append dir "/dukedc_hrp.zip")))
#t)))
(synopsis "High definition textures and models for Duke Nukem 3D: Duke It Out In D.C.")
(description "This file contains data for using the Duke3D High-Resolution
Pack (HRP) with the addon \"Duke It Out In D.C.\". It contains replacements
that work as some kind of override for some of the HRP textures.")
(home-page "http://hrp.duke4.net/")
(license ((@@ (guix licenses) license) "HRP art license"
"http://hrp.duke4.net/hrp_art_license.txt"
""))))
(define-public duke-nukem-3d-xxx-pack
(package
(name "duke-nukem-3d-xxx-pack")
(version "1.33")
(source
(origin
(method url-fetch)
(uri (string-append "http://www.duke4.org/files/nightfright/related/"
"duke3d_xxx.zip"))
(file-name (string-append name "-" version))
(sha256
(base32 "0d5mhjd2n9lqkxa17h8mi77apa7q6b8nklrvz8dml5qa83k165y3"))))
(build-system trivial-build-system)
(propagated-inputs
`(("hrp" ,duke-nukem-3d-high-resolution-pack)))
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let ((dir (string-append (assoc-ref %outputs "out")
"/" ,duke-nukem-3d-directory)))
(mkdir-p dir)
(copy-file (assoc-ref %build-inputs "source")
(string-append dir "/duke3d_xxx.zip")))
#t)))
(synopsis "Nudity files for Duke Nukem 3D")
(description "This pack is meant for those who want to play Duke Nukem 3D
with the Highres Pack (HRP) and also like to see... errr... *cough* well, the
babes you encounter wearing less stuff.")
(home-page "http://hrp.duke4.net/")
(license ((@@ (guix licenses) license) "HRP art license"
"http://hrp.duke4.net/hrp_art_license.txt"
""))))
(define-public eduke32
(package
(name "eduke32")
(version "20181027-7136")
(source
(origin
(method url-fetch)
(uri (string-append "http://dukeworld.duke4.net/eduke32/synthesis/"
version
"/eduke32_src_"
version
".tar.xz"))
(sha256
(base32 "121k2k7ylw8dvs71mrdy7hwb1a2xd5di7jdqc20a1ml5k0n9akpn"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f
#:phases
(modify-phases %standard-phases
(delete 'configure)
(add-after 'set-paths 'set-sdl-paths
;; The makefile adds the output of `sdl2-config --cflags` to the
;; compiler flags, but sdl2-config gives us the wrong directory to
;; include. We have to add the SDL2 header directory ourselves.
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPLUS_INCLUDE_PATH"
(string-append (assoc-ref inputs "sdl-union")
"/include/SDL2"
":"
(getenv "CPLUS_INCLUDE_PATH")))
#t))
(replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(glu (assoc-ref inputs "glu"))
(eduke (string-append out "/bin/eduke32"))
(eduke-real (string-append out "/bin/.eduke32-real")))
;; TODO: Install custom .desktop file? Need icon.
;; See https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=eduke32.
(install-file "eduke32" (string-append out "/bin"))
(install-file "mapster32" (string-append out "/bin"))
(install-file "package/common/buildlic.txt" (string-append out "/share/licenses"))
;; Wrap program:
;; - Need to expose GLU so that the polymer renderer can load.
;; - Make sure current directory is writable, else eduke32 will segfault.
;; - Add ../share/dukenukem3d to the dir search list.
;; TODO: Skip store duke3d.grp When ~/.config/eduke32/duke3d.grp is found.
(rename-file eduke eduke-real)
(call-with-output-file eduke
(lambda (p)
(format p "\
#!~a
export LD_LIBRARY_PATH=\"~a/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH\"
mkdir -p ~~/.config/eduke32
cd ~~/.config/eduke32
exec -a \"$0\" ~a\
-g \"${0%/*}\"/../~a/*.grp\
-g \"${0%/*}\"/../~a/*.zip\
-g \"${0%/*}\"/../~a/*.map\
-g \"${0%/*}\"/../~a/*.con\
-g \"${0%/*}\"/../~a/*.def\
\"$@\"~%"
(which "bash") glu eduke-real
,duke-nukem-3d-directory
,duke-nukem-3d-directory
,duke-nukem-3d-directory
,duke-nukem-3d-directory
,duke-nukem-3d-directory)))
(chmod eduke #o755)))))))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
`(("sdl-union" ,(sdl-union (list sdl2 sdl2-mixer)))
("glu" ,glu)
("libvorbis" ,libvorbis)
("libvpx" ,libvpx)
("flac" ,flac)
("gtk+" ,gtk+-2)))
(synopsis "Source port of the classic PC first person shooter Duke Nukem 3D")
(description "EDuke32 is a free homebrew game engine and source port of the
classic PC first person shooter Duke Nukem 3DDuke3D for shortto Windows,
Linux, Mac OS X, FreeBSD, several handhelds, your family toaster, and to your
vibrator. A thousands of cool and useful features and upgrades were added for
regular players and additional editing capabilities and scripting extensions for
homebrew developers and mod creators. EDuke32 is open source but non-free
software.
You'll need Duke Nukem 3D data files in order to play. You can either install
duke-nukem-3d-shareware or put whichever version of DUKE3D.GRP in
~/.config/eduke32/.")
(home-page "https://eduke32.com/")
(license ((@@ (guix licenses) license) "BUILD license"
"https://eduke32.com/buildlic.txt"
""))))
(define-public duke-nukem-3d-roland-sc-55-music-pack
(package
(name "duke-nukem-3d-roland-sc-55-music-pack")
(version "4.02")
(source
(origin
(method url-fetch)
(uri (string-append "http://www.duke4.org/files/nightfright/music/"
"duke3d_music-sc55.zip"))
(file-name (string-append name "-" version))
(sha256
(base32 "11wh2fpmz7j3107fkwlkb67nral2p3na90wa6dqli6v2nm7mf8z1"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let ((dir (string-append (assoc-ref %outputs "out")
"/" ,duke-nukem-3d-directory)))
(mkdir-p dir)
(copy-file (assoc-ref %build-inputs "source")
(string-append dir "/duke3d_music-sc55.zip")))
#t)))
(synopsis "Music modification for Duke Nukem 3D")
(description "This pack is meant for those who want to play Duke Nukem 3D
with the Highres Pack (HRP) and also like to have high quality music instead of
listening to the old MIDI soundtrack. It also works for anyone who just wants
to have a music replacement for the game without having any HRP installed.
The music was recorded by MusicallyInspired with a Roland SC-55 synthesizer.")
(home-page "http://hrp.duke4.net/")
(license ((@@ (guix licenses) license) "GPLv2?"
"No URL"
""))))
(define-public duke-nukem-3d-duke-it-out-in-dc-music-pack
(package
(name "duke-nukem-3d-duke-it-out-in-dc-music-pack")
(version "2.0")
(source
(origin
(method url-fetch)
(uri (string-append "http://www.duke4.org/files/nightfright/music/dukedc_music"
(version-major version) (version-minor version)
".zip"))
(file-name (string-append name "-" version))
(sha256
(base32 "1i3hcc4j1m6pwkb919qjam0gq6q6ixnaz911xrcjd1dyyp8jpzyf"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let ((dir (string-append (assoc-ref %outputs "out")
"/" ,duke-nukem-3d-directory)))
(mkdir-p dir)
(copy-file (assoc-ref %build-inputs "source")
(string-append dir "/duke3d_music"
,(version-major version)
,(version-minor version)
".zip")))
#t)))
(synopsis "Custom soundtrack for Duke Nukem 3D's Duke It Out in D.C.")
(description "This music pack is optional since it features music which was
not part of the addon at all. (Standard Duke Nukem 3D music from episode 3 was
used!)")
(home-page "http://hrp.duke4.net/")
(license ((@@ (guix licenses) license) "No license"
"No URL"
""))))
(define duke-nukem-3d-eduke32-addon-compilation
(package
(name "duke-nukem-3d-eduke32-addon-compilation")
(version "3.13")
(source
(origin
(method url-fetch)
(uri (string-append "http://www.duke4.org/files/nightfright/misc/eduke32_addons"
(version-major version) (version-minor version) ".exe"))
(sha256
(base32 "067gdlm3xwbih4ygvwz5bfq6hi9j9zy8pr44m527i3icr5jsq02k"))))
(build-system trivial-build-system)
(native-inputs
`(("p7zip" ,p7zip)))
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(setenv "PATH" (string-append
(assoc-ref %build-inputs "p7zip") "/bin" ":"))
(invoke "7z" "x" (assoc-ref %build-inputs "source"))
(let* ((out (assoc-ref %outputs "out"))
(doc (string-append out "/doc"))
(dir (string-append (assoc-ref %outputs "out")
"/" ,duke-nukem-3d-directory)))
(mkdir-p dir)
(mkdir-p doc)
(copy-recursively "addons" dir)
(copy-recursively (string-append dir "/readme")
(string-append doc "/dukenukem3d"))
(delete-file-recursively (string-append dir "/readme")))
#t)))
(synopsis "Selection of mods for Duke Nukem 3D")
(description "This pack is is a compilation of great episodes and/or total
conversions for Duke Nukem 3D.")
(home-page "http://hrp.duke4.net/")
(license ((@@ (guix licenses) license) "Custom license"
"http://hrp.duke4.net/misc/addons_readme.txt"
""))))
(define-public duke-nukem-3d-borg-nukem
(package
(name "duke-nukem-3d-borg-nukem")
(version (package-version duke-nukem-3d-eduke32-addon-compilation))
(source #f)
(build-system trivial-build-system)
(inputs
`(("compilation" ,duke-nukem-3d-eduke32-addon-compilation)))
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let ((indir (string-append (assoc-ref %build-inputs "compilation")
"/" ,duke-nukem-3d-directory))
(dir (string-append (assoc-ref %outputs "out")
"/" ,duke-nukem-3d-directory)))
(mkdir-p dir)
(install-file (string-append indir "/borgnukem.grp") dir))
#t)))
(synopsis "Borg Nukem addon for Duke Nukem 3D")
(description "Borg Nukem addon for Duke Nukem 3D") ; TODO: Extend description.
(home-page "http://hrp.duke4.net/")
(license ((@@ (guix licenses) license) "By Kevin 'Kef_Nukem' Cools/Borg Team"
"No URL"
""))))
;; TODO: Write importer for other addons? Maybe not worth it.

View File

@ -1,124 +0,0 @@
(define-module (ambrevar linux-custom)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (guix build-system trivial)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages linux)
#:use-module (srfi srfi-1))
(define-public linux-nonfree
(package
(inherit linux-libre)
(name "linux-nonfree")
(version (package-version linux-libre))
(source
(origin
(method url-fetch)
(uri
(string-append
"https://www.kernel.org/pub/linux/kernel/v"
(version-major version)
".x/linux-" version ".tar.xz"))
(sha256
(base32
;; 5.0.1
"0gik1ijakfs2z45h78qv044k0s5m8xks3h5idrqssnyvg53j2ril"))))
;; (native-inputs
;; `(("kconfig" ,(local-file "./linux-laptop.conf"))
;; ,@(alist-delete "kconfig" (package-native-inputs linux-libre))))
))
;; 250+ MB.
(define-public linux-firmware-all
(let ((version "0.0.0")
(commit "6d5131107f2ba67a13f469ac770a55f101ba654d"))
(package
(name "linux-firmware-all")
(version version)
(source (origin
(method git-fetch)
(uri (git-reference
(url "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git")
(commit commit)))
(sha256
(base32
"0nql7rqkx064lsw5bh6n29yfdxmp3hl4nqgp1fxdb4ys76awchg3"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
#:builder (begin
(use-modules (guix build utils))
(let ((source (assoc-ref %build-inputs "source"))
(destination (string-append %output "/lib/firmware")))
(mkdir-p destination)
(copy-recursively source destination #:follow-symlinks? #t)
#t))))
(home-page "")
(synopsis "Non-free firmware for the Linux kernel")
(description "Non-free firmware for the Linux kernel")
(license #f))))
(define (linux-firmware-version) "9d40a17beaf271e6ad47a5e714a296100eef4692")
(define (linux-firmware-source version)
(origin
(method git-fetch)
(uri (git-reference
(url (string-append "https://git.kernel.org/pub/scm/linux/kernel"
"/git/firmware/linux-firmware.git"))
(commit version)))
(file-name (string-append "linux-firmware-" version "-checkout"))
(sha256
(base32
"099kll2n1zvps5qawnbm6c75khgn81j8ns0widiw0lnwm8s9q6ch"))))
;; ~60 MB.
(define-public linux-firmware-iwlwifi
(package
(name "linux-firmware-iwlwifi")
(version (linux-firmware-version))
(source (linux-firmware-source version))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
#:builder (begin
(use-modules (guix build utils))
(let ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware/")))
(mkdir-p fw-dir)
(for-each (lambda (file)
(copy-file file
(string-append fw-dir (basename file))))
(find-files source
"iwlwifi-.*\\.ucode$|LICENSE\\.iwlwifi_firmware$"))
#t))))
(home-page "https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi")
(synopsis "Non-free firmware for Intel wifi chips")
(description "Non-free iwlwifi firmware")
(license (license:non-copyleft
"https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/LICENCE.iwlwifi_firmware?id=HEAD"))))
(define-public linux-firmware-amdgpu
(package
(name "linux-firmware-amdgpu")
(version (linux-firmware-version))
(source (linux-firmware-source version))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
#:builder (begin
(use-modules (guix build utils))
(let* ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware/"))
(bin-dir (string-append fw-dir "/amdgpu")))
(mkdir-p bin-dir)
(copy-recursively (string-append source "/amdgpu") bin-dir)
(install-file (string-append source "/LICENSE.amdgpu") fw-dir)
#t))))
(home-page "http://support.amd.com/en-us/download/linux")
(synopsis "Non-free firmware for AMD graphics chips")
(description "Non-free firmware for AMD graphics chips.")
(license (license:non-copyleft
"https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/LICENSE.amdgpu"))))

View File

@ -1,268 +0,0 @@
(define-module (ambrevar streetsofrage)
#:use-module (ice-9 match)
#:use-module ((guix licenses) :prefix license:)
#:use-module (guix packages)
#:use-module (guix build-system trivial)
#:use-module (guix download)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages elf)
#:use-module (gnu packages gcc)
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
#:use-module (gnu packages sdl)
#:use-module (gnu packages tls))
(define (to32 package64)
"Build package for i686-linux.
Only x86_64-linux and i686-linux are supported.
- If i686-linux, return the package unchanged.
- If x86_64-linux, return the 32-bit version of the package."
(match (%current-system)
("x86_64-linux"
(package
(inherit package64)
(name (string-append (package-name package64) "32"))
(arguments `(#:system "i686-linux"
,@(package-arguments package64)))))
(_ package64)))
;; TODO: Package https://aur.archlinux.org/packages/bennugd-core/.
(define streets-of-rage-remake-containerized
(package
(name "streets-of-rage-remake-containerized")
(version "5.1")
(source (origin
(method url-fetch)
(uri (string-append "http://launchpad.net/~ubuntugames/+archive/ubuntu/games/+files/sorr_"
version ".orig.tar.gz"))
(sha256
(base32
"1gld4i6ma265j7jw06c1drfp7pbg3n8dpm4lg9xgg28dkl5flwai"))))
(build-system trivial-build-system)
(inputs
`(("bash" ,bash-minimal)
("glibc" ,(to32 glibc))
("zlib" ,(to32 zlib))
("alsa-lib" ,(to32 alsa-lib)) ; TODO: Do we really need alsa-lib?
("sdl" ,(to32 sdl))
("sdl-mixer" ,(to32 sdl-mixer))
("libpng" ,(to32 libpng-1.2))))
(native-inputs
`(("tar" ,tar)
("gzip" ,gzip)))
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let ((out (assoc-ref %outputs "out")))
(setenv "PATH" (string-append
(assoc-ref %build-inputs "gzip") "/bin:"
(assoc-ref %build-inputs "tar") "/bin"))
(invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
(mkdir-p out)
(copy-recursively "." out)
(chdir out)
;; (mkdir-p "share/applications/")
;; (rename-file "sorr.desktop" "share/applications/sorr.desktop")
;; (mkdir-p "share/icons/hicolor/48x48/apps/")
;; (rename-file "sorr.png" "share/icons/hicolor/48x48/apps/sorr.png")
;; (mkdir-p "bin")
;; (rename-file "bgdi" "bin/bgdi")
;; (rename-file "data" "lib")
;; (mkdir-p "bin")
;; (rename-file "bennugd/libbgdrtm.so" "lib/libbgdrtm.so")
;; (mkdir-p "share/streetsofrageremake")
;; (for-each (lambda (f) (rename-file f (string-append "share/streetsofrageremake/" f)))
;; '("SorMaker.dat" "SorR.dat" "manual" "manual.html"
;; "mod" "palettes" "Readme.txt"))
(delete-file "sorr")
;; Remove the unneeded executable bit.
(for-each (lambda (file)
(chmod file #o644))
(find-files "." ".*"))
(chmod "bgdi" #o755)
;; TODO: Remove bennugd/ once all libs are available as inputs:
;; libSDL-1.2.so.0
;; libSDL_mixer-1.2.so.0
;; libcrypto.so.1.0.0
;; libdraw.so
;; libmad.so.0
;; libssl.so.1.0.0
;; libvideo.so
;; Patch the executable to use the right interpreter.
;; TODO: Sort out data from bennugd:
(for-each (lambda (f) (rename-file (string-append "bennugd/" f)
(string-append "data/" f)))
'("libbgdrtm.so" "libcrypto.so.1.0.0" "libdraw.so"))
(with-directory-excursion "data"
;; Need to prefix with "lib" otherwise we get the error:
;; libmod_map.so: cannot open shared object file: No such file or directory
(for-each (lambda (f) (rename-file f
(string-append "lib" (basename f))))
(find-files "." "mod.*")))
(let* ((bash (assoc-ref %build-inputs "bash"))
(zlib (assoc-ref %build-inputs "zlib"))
(sdl (assoc-ref %build-inputs "sdl"))
(sdl-mixer (assoc-ref %build-inputs "sdl-mixer"))
(libpng (assoc-ref %build-inputs "libpng"))
(glibc (assoc-ref %build-inputs "glibc"))
(sorr (string-append out "/sorr"))
(sorr-real (string-append out "/bgdi"))
(sorr-data (string-append out "/share/streetsofrageremake/SorR.dat")))
;; Wrap program:
(call-with-output-file sorr
(lambda (p)
;; Expose /dev/snd for sound.
(format p "\
#!~a/bin/bash
guix environment --container \
--share=/tmp/.X11-unix/ \
--share=/dev/snd \
--expose=~a/lib=/lib \
--ad-hoc streets-of-rage-remake coreutils -- \
env DISPLAY=$DISPLAY LD_LIBRARY_PATH=\"~a/lib:~a/lib:~a/lib:~a/lib:~a/lib:~a${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH\" \
~a ~a \"$@\"~%"
bash
glibc ; Need to be exposed to /lib, or else it won't start.
glibc zlib sdl sdl-mixer libpng (string-append out "/data")
sorr-real sorr-data)))
(chmod sorr 493))
#t))))
(home-page "http://www.sorrcommunity.com/t148-sor-v5-for-linux-debian-download-links")
(synopsis "Remake of the classic Streets of Rage 1, 2 and 3")
(description "Remake of the classic Streets of Rage 1, 2 and 3")
(license ((@@ (guix licenses) license) "No license"
"No URL"
""))))
(define-public streets-of-rage-remake
(package
(name "streets-of-rage-remake")
(version "5.1")
(source (origin
(method url-fetch)
(uri (string-append "http://launchpad.net/~ubuntugames/"
"+archive/ubuntu/games/+files/sorr_"
version ".orig.tar.gz"))
(sha256
(base32
"1gld4i6ma265j7jw06c1drfp7pbg3n8dpm4lg9xgg28dkl5flwai"))))
(build-system trivial-build-system)
(inputs
`(("bash" ,bash-minimal)
("glibc" ,(to32 glibc))
("zlib" ,(to32 zlib))
("sdl" ,(to32 sdl))
("sdl-mixer" ,(to32 sdl-mixer))
("libcrypto" ,(to32 openssl))
("libpng" ,(to32 libpng-1.2))))
(native-inputs
`(("patchelf" ,(to32 patchelf))
("tar" ,tar)
("gzip" ,gzip)))
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let ((out (assoc-ref %outputs "out")))
(setenv "PATH" (string-append
(assoc-ref %build-inputs "gzip") "/bin:"
(assoc-ref %build-inputs "patchelf") "/bin:"
(assoc-ref %build-inputs "tar") "/bin"))
(invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
(mkdir-p out)
(copy-recursively "." out)
(chdir out)
;; Remove the unneeded executable bit.
(for-each (lambda (file)
(chmod file #o644))
(find-files "." ".*"))
(mkdir-p "share/applications/")
(rename-file "sorr.desktop" "share/applications/sorr.desktop")
(mkdir-p "share/icons/hicolor/48x48/apps/")
(rename-file "sorr.png" "share/icons/hicolor/48x48/apps/sorr.png")
(rename-file "data" "lib")
(mkdir-p "share/sorr")
(for-each (lambda (f) (rename-file f (string-append "share/sorr/" f)))
'("SorMaker.dat" "SorR.dat" "manual" "manual.html"
"mod" "palettes" "Readme.txt"))
(delete-file "sorr")
(chmod "bgdi" #o755)
(mkdir-p "bin")
(rename-file "bgdi" "bin/bgdi")
;; Sort out libraries from bennugd:
(for-each (lambda (f) (rename-file (string-append "bennugd/" f)
(string-append "lib/" f)))
'("libbgdrtm.so" "libdraw.so"))
(delete-file-recursively "bennugd")
(with-directory-excursion "lib"
(for-each (lambda (f) (rename-file f
(string-append "lib" (basename f))))
(find-files "." "mod.*")))
;; Patch the executable to use the right RPATH to its dependent libraries:
(let* ((zlib (assoc-ref %build-inputs "zlib"))
(sdl (assoc-ref %build-inputs "sdl"))
(sdl-mixer (assoc-ref %build-inputs "sdl-mixer"))
(libpng (assoc-ref %build-inputs "libpng"))
(libcrypto (assoc-ref %build-inputs "libcrypto"))
(glibc (assoc-ref %build-inputs "glibc")))
(invoke "patchelf" "--set-interpreter" (string-append glibc "/lib/ld-linux.so.2")
(string-append out "/bin/bgdi"))
(for-each (lambda (f)
(invoke "patchelf" "--set-rpath"
(string-append
(string-append out "/lib") ":"
(string-append sdl "/lib") ":"
(string-append sdl-mixer "/lib") ":"
(string-append libpng "/lib") ":"
(string-append libcrypto "/lib") ":"
(string-append zlib "/lib"))
f))
(append (list (string-append out "/bin/bgdi"))
(find-files "lib" ".*"))))
;; Wrap program to start the game easily:
(let* ((bash (assoc-ref %build-inputs "bash"))
(sorr (string-append out "/bin/sorr"))
(sorr-real (string-append out "/bin/bgdi"))
(sorr-data (string-append out "/share/sorr/SorR.dat"))
(sorr-path (string-append out "/share/sorr/")))
(call-with-output-file sorr
(lambda (p)
;; Passing '-a "$0"' to exec breaks the game.
(format p "\
#!~a
SORR_PATH=\"${SORR_PATH:-$HOME/.config/sorr}\"
mkdir -p \"$SORR_PATH\"
cd \"$SORR_PATH\"
for i in \"~a\"/*; do
if [ \"$(basename \"$i\")\" != \"mod\" ]; then
ln -sf \"$i\"
fi
done
mkdir -p mod/games
for i in \"~a\"/mod/*; do
ln -sf \"$i\" mod/
done
exec ~a ~a \"$@\"~%"
(string-append bash "/bin/bash")
sorr-path sorr-path
sorr-real
sorr-data)))
(chmod sorr #o755))
#t))))
(home-page "http://www.sorrcommunity.com/t148-sor-v5-for-linux-debian-download-links")
(synopsis "Remake of the classic Streets of Rage 1, 2 and 3")
(description "This is a Bombergames remake of the classic Streets of Rage 1,
2 and 3 by Sega. The save games are stored in ~/.config/sorr (configurable via
the SORR_PATH environment variable). Mods can be installed in
$SORR_PATH/mod/games.
")
(license ((@@ (guix licenses) license) "No license"
"No URL"
""))))

View File

@ -1,7 +1,7 @@
(define-module (ambrevar system default)
#:use-module (gnu)
#:use-module (gnu system nss)
#:use-module (ambrevar linux-custom)
#:use-module (nonfree packages linux)
#:use-module (gnu packages linux) ; For ntfs-3g
#:use-module (gnu packages mtools) ; For exfat
#:use-module (gnu services xorg)

View File

@ -2,7 +2,7 @@
;; *sudo -E guix system reconfigure ~/.guix-packages/ambrevar/system/desktop-bababa.scm
(define-module (ambrevar system desktop-bababa)
#:use-module (ambrevar system default)
#:use-module (ambrevar linux-custom)
#:use-module (nonfree packages linux)
#:use-module (gnu system)
#:use-module (gnu bootloader)
#:use-module (gnu bootloader grub)

View File

@ -1,31 +0,0 @@
(define-module (ambrevar unrar)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix build-system gnu)
#:use-module (guix download))
(define-public unrar
(package
(name "unrar")
(version "5.6.4")
(source (origin
(method url-fetch)
(uri (string-append "http://www.rarlab.com/rar/unrarsrc-"
version
".tar.gz"))
(sha256
(base32
"1zj9pbk38qf7anfk52xq5j9j7p7i007fhjy00x007wkh30hd4dck"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f
#:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
#:phases
(modify-phases %standard-phases
(delete 'configure))))
(home-page "http://www.rarlab.com/rar_add.htm")
(synopsis "The RAR uncompression program")
(description "The RAR uncompression program.")
(license ((@@ (guix licenses) license) "RARlab Copyright"
"http://www.rarlab.com"
""))))

View File

@ -1,56 +0,0 @@
(define-module (ambrevar wine)
#:use-module ((guix licenses) :prefix license:)
#:use-module (guix packages)
#:use-module (guix build-system gnu)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (gnu packages wget)
#:use-module (gnu packages compression)
#:use-module (gnu packages gnome))
(define-public winetricks
(package
(name "winetricks")
(version "20181203")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/Winetricks/winetricks")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"1as5h5xibpplm619b1i73g974p96q2jnd7fqm28xj3zkqy7qjdm3"))))
(build-system gnu-build-system)
(inputs
`(("wget" ,wget)
("cabextract" ,cabextract)
("p7zip" ,p7zip)
("unzip" ,unzip)
;; ("unrar" ,unrar) ; Referenced in the source.
("zenity" ,zenity)))
(arguments
`(#:tests? #f
;; TODO: Checks need bashate, shellcheck (OK), and checkbashisms.
#:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
"PREFIX=")
#:phases
(modify-phases %standard-phases
(delete 'configure)
(add-after 'unpack 'patch-zenity-path
(lambda* (#:key inputs #:allow-other-keys)
(let* ((zenity (assoc-ref inputs "zenity"))
(zenity-bin (string-append zenity "/bin/zenity")))
(substitute* "src/winetricks"
;; TODO: There might need more command substitution needed, e.g. wget, 7z, etc.
;; TODO: Add coreutils to the input?
(("command -v zenity") (string-append "command -v " zenity-bin))
(("WINETRICKS_GUI=zenity") (string-append "WINETRICKS_GUI=" zenity-bin))
(("WINETRICKS_GUI_VERSION=\"\\$\\(zenity") (string-append "WINETRICKS_GUI_VERSION=\"$(" zenity-bin)))))))))
(home-page "https://github.com/Winetricks/winetricks")
(synopsis "Easy way to work around problems in Wine")
(description "Winetricks is an easy way to work around problems in Wine. It
has a menu of supported games/apps for which it can do all the workarounds
automatically. It also allows the installation of missing DLLs and tweaking of
various Wine settings.")
(license license:lgpl2.1)))