gnu: wine-staging: Hard-code vulkan loader.
* gnu/packages/wine.scm (wine-staging-patchset-data): Fix indentation. * gnu/packages/wine.scm (wine-staging)[arguments]: Add 'wrap-executable phase. * gnu/packages/wine.scm (wine64-staging)[arguments]: Add 'wrap-executable phase. Copy the real wine-preloader instead of the wrapped version.
This commit is contained in:
parent
e7c6bc45ed
commit
cb2ad4f508
|
@ -224,48 +224,48 @@ integrate Windows applications into your desktop.")
|
||||||
|
|
||||||
(define-public wine-staging-patchset-data
|
(define-public wine-staging-patchset-data
|
||||||
(package
|
(package
|
||||||
(name "wine-staging-patchset-data")
|
(name "wine-staging-patchset-data")
|
||||||
(version "4.0-rc5")
|
(version "4.0-rc5")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/wine-staging/wine-staging")
|
(url "https://github.com/wine-staging/wine-staging")
|
||||||
(commit (string-append "v" version))))
|
(commit (string-append "v" version))))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0smp6ngs77vk1yg0saavhhn7kmi9ri8y8gc3vcgg837ycwg5i5qb"))))
|
"0smp6ngs77vk1yg0saavhhn7kmi9ri8y8gc3vcgg837ycwg5i5qb"))))
|
||||||
(build-system trivial-build-system)
|
(build-system trivial-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("bash" ,bash)
|
`(("bash" ,bash)
|
||||||
("coreutils" ,coreutils)))
|
("coreutils" ,coreutils)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:modules ((guix build utils))
|
`(#:modules ((guix build utils))
|
||||||
#:builder
|
#:builder
|
||||||
(begin
|
(begin
|
||||||
(use-modules (guix build utils))
|
(use-modules (guix build utils))
|
||||||
(let* ((build-directory ,(string-append name "-" version))
|
(let* ((build-directory ,(string-append name "-" version))
|
||||||
(source (assoc-ref %build-inputs "source"))
|
(source (assoc-ref %build-inputs "source"))
|
||||||
(bash (assoc-ref %build-inputs "bash"))
|
(bash (assoc-ref %build-inputs "bash"))
|
||||||
(coreutils (assoc-ref %build-inputs "coreutils"))
|
(coreutils (assoc-ref %build-inputs "coreutils"))
|
||||||
(out (assoc-ref %outputs "out"))
|
(out (assoc-ref %outputs "out"))
|
||||||
(wine-staging (string-append out "/share/wine-staging")))
|
(wine-staging (string-append out "/share/wine-staging")))
|
||||||
(copy-recursively source build-directory)
|
(copy-recursively source build-directory)
|
||||||
(with-directory-excursion build-directory
|
(with-directory-excursion build-directory
|
||||||
(substitute* "patches/patchinstall.sh"
|
(substitute* "patches/patchinstall.sh"
|
||||||
(("/bin/sh")
|
(("/bin/sh")
|
||||||
(string-append bash "/bin/sh")))
|
(string-append bash "/bin/sh")))
|
||||||
(substitute* "patches/gitapply.sh"
|
(substitute* "patches/gitapply.sh"
|
||||||
(("/usr/bin/env")
|
(("/usr/bin/env")
|
||||||
(string-append coreutils "/bin/env"))))
|
(string-append coreutils "/bin/env"))))
|
||||||
(copy-recursively build-directory wine-staging)
|
(copy-recursively build-directory wine-staging)
|
||||||
#t))))
|
#t))))
|
||||||
(home-page "https://github.com/wine-staging")
|
(home-page "https://github.com/wine-staging")
|
||||||
(synopsis "Patchset for Wine")
|
(synopsis "Patchset for Wine")
|
||||||
(description
|
(description
|
||||||
"wine-staging-patchset-data contains the patchset to build Wine-Staging.")
|
"wine-staging-patchset-data contains the patchset to build Wine-Staging.")
|
||||||
(license license:lgpl2.1+)))
|
(license license:lgpl2.1+)))
|
||||||
|
|
||||||
(define-public wine-staging
|
(define-public wine-staging
|
||||||
(package
|
(package
|
||||||
|
@ -286,6 +286,7 @@ integrate Windows applications into your desktop.")
|
||||||
("ffmpeg" ,ffmpeg)
|
("ffmpeg" ,ffmpeg)
|
||||||
("gtk+" ,gtk+)
|
("gtk+" ,gtk+)
|
||||||
("libva" ,libva)
|
("libva" ,libva)
|
||||||
|
("mesa" ,mesa)
|
||||||
("python" ,python)
|
("python" ,python)
|
||||||
("sdl2" ,sdl2)
|
("sdl2" ,sdl2)
|
||||||
("util-linux" ,util-linux) ; for hexdump
|
("util-linux" ,util-linux) ; for hexdump
|
||||||
|
@ -296,6 +297,27 @@ integrate Windows applications into your desktop.")
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
|
;; Explicitely set the 32-bit version of vulkan-loader when installing
|
||||||
|
;; to i686-linux or x86_64-linux.
|
||||||
|
;; TODO: Add more JSON files as they become available in Mesa.
|
||||||
|
,@(match (%current-system)
|
||||||
|
((or "i686-linux" "x86_64-linux")
|
||||||
|
`((add-after 'install 'wrap-executable
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
(icd (string-append out "/share/vulkan/icd.d")))
|
||||||
|
(mkdir-p icd)
|
||||||
|
(copy-file (string-append (assoc-ref inputs "mesa")
|
||||||
|
"/share/vulkan/icd.d/radeon_icd.i686.json")
|
||||||
|
(string-append icd "/radeon_icd.i686.json"))
|
||||||
|
(wrap-program (string-append out "/bin/wine-preloader")
|
||||||
|
`("VK_ICD_FILENAMES" ":" =
|
||||||
|
(,(string-append icd
|
||||||
|
"/radeon_icd.i686.json"))))
|
||||||
|
#t)))))
|
||||||
|
(_
|
||||||
|
`())
|
||||||
|
)
|
||||||
(add-before 'configure 'patch-source-wine-staging
|
(add-before 'configure 'patch-source-wine-staging
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((source (assoc-ref %build-inputs "source"))
|
(let* ((source (assoc-ref %build-inputs "source"))
|
||||||
|
@ -344,6 +366,34 @@ integrated into the main branch.")
|
||||||
(string-append "libdir=" %output "/lib/wine64"))
|
(string-append "libdir=" %output "/lib/wine64"))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
|
;; Explicitely set both the 64-bit and 32-bit versions of vulkan-loader
|
||||||
|
;; when installing to x86_64-linux so both are available.
|
||||||
|
;; TODO: Add more JSON files as they become available in Mesa.
|
||||||
|
,@(match (%current-system)
|
||||||
|
((or "x86_64-linux")
|
||||||
|
`((add-after 'copy-wine32-binaries 'wrap-executable
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
(let* ((out (assoc-ref outputs "out")))
|
||||||
|
(wrap-program (string-append out "/bin/wine-preloader")
|
||||||
|
`("VK_ICD_FILENAMES" ":" =
|
||||||
|
(,(string-append (assoc-ref inputs "mesa")
|
||||||
|
"/share/vulkan/icd.d/radeon_icd.x86_64.json" ":"
|
||||||
|
(assoc-ref inputs "mesa")
|
||||||
|
"/share/vulkan/icd.d/intel_icd.x86_64.json" ":"
|
||||||
|
(assoc-ref inputs "wine-staging")
|
||||||
|
"/share/vulkan/icd.d/radeon_icd.i686.json"))))
|
||||||
|
(wrap-program (string-append out "/bin/wine64-preloader")
|
||||||
|
`("VK_ICD_FILENAMES" ":" =
|
||||||
|
(,(string-append (assoc-ref inputs "mesa")
|
||||||
|
"/share/vulkan/icd.d/radeon_icd.x86_64.json"
|
||||||
|
":" (assoc-ref inputs "mesa")
|
||||||
|
"/share/vulkan/icd.d/intel_icd.x86_64.json"
|
||||||
|
":" (assoc-ref inputs "wine-staging")
|
||||||
|
"/share/vulkan/icd.d/radeon_icd.i686.json"))))
|
||||||
|
#t)))))
|
||||||
|
(_
|
||||||
|
`())
|
||||||
|
)
|
||||||
(add-before 'configure 'patch-source-wine-staging
|
(add-before 'configure 'patch-source-wine-staging
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((source (assoc-ref %build-inputs "source"))
|
(let* ((source (assoc-ref %build-inputs "source"))
|
||||||
|
@ -359,7 +409,9 @@ integrated into the main branch.")
|
||||||
;; Copy the 32-bit binaries needed for WoW64.
|
;; Copy the 32-bit binaries needed for WoW64.
|
||||||
(copy-file (string-append wine32 "/bin/wine")
|
(copy-file (string-append wine32 "/bin/wine")
|
||||||
(string-append out "/bin/wine"))
|
(string-append out "/bin/wine"))
|
||||||
(copy-file (string-append wine32 "/bin/wine-preloader")
|
;; Copy the real 32-bit wine-preloader instead of the wrapped
|
||||||
|
;; version.
|
||||||
|
(copy-file (string-append wine32 "/bin/.wine-preloader-real")
|
||||||
(string-append out "/bin/wine-preloader"))
|
(string-append out "/bin/wine-preloader"))
|
||||||
#t)))
|
#t)))
|
||||||
(add-after 'compress-documentation 'copy-wine32-manpage
|
(add-after 'compress-documentation 'copy-wine32-manpage
|
||||||
|
|
Loading…
Reference in New Issue