gnu: wine-staging-patchset-data: Don't use unstable archive.

* gnu/packages/wine.scm (wine-staging-patchset-data)[source]:
Use GIT-FETCH and GIT-FILE-NAME.
[native-inputs]: Remove unzip.
[arguments]: Adjust and refactor accordingly.
master
Tobias Geerinckx-Rice 2018-08-23 05:11:19 +02:00
parent 574e2ee8ea
commit f868276b8a
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 25 additions and 23 deletions

View File

@ -4,6 +4,7 @@
;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com> ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2017 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; Copyright © 2017 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -24,6 +25,7 @@
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix build-system trivial) #:use-module (guix build-system trivial)
@ -226,38 +228,38 @@ integrate Windows applications into your desktop.")
(version "3.14") (version "3.14")
(source (source
(origin (origin
(method url-fetch) (method git-fetch)
(uri (string-append "https://github.com/wine-staging/wine-staging/archive/v" (uri (git-reference
version ".zip")) (url "https://github.com/wine-staging/wine-staging")
(file-name (string-append name "-" version ".zip")) (commit (string-append "v" version))))
(sha256 (file-name (git-file-name name version))
(base32 (sha256
"1w3n90ab3xyhdzxw1mnkp2cw76lpm5l75hy9xkw3kz2fwzq6lwz7")))) (base32
"0h6gck0p92hin0m13q1hnlfnqs4vy474w66ppinvqms2zn3vibgi"))))
(build-system trivial-build-system) (build-system trivial-build-system)
(native-inputs (native-inputs
`(("bash" ,bash) `(("bash" ,bash)
("coreutils" ,coreutils) ("coreutils" ,coreutils)))
("unzip" ,unzip)))
(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* ((out (assoc-ref %outputs "out")) (let* ((build-directory ,(string-append name "-" version))
(wine-staging (string-append out "/share/wine-staging"))
(source (assoc-ref %build-inputs "source")) (source (assoc-ref %build-inputs "source"))
(sh (string-append (assoc-ref %build-inputs "bash") "/bin/bash")) (bash (assoc-ref %build-inputs "bash"))
(env (string-append (assoc-ref %build-inputs "coreutils") "/bin/env")) (coreutils (assoc-ref %build-inputs "coreutils"))
(unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip"))) (out (assoc-ref %outputs "out"))
(copy-file source (string-append ,name "-" ,version ".zip")) (wine-staging (string-append out "/share/wine-staging")))
(invoke unzip (string-append ,name "-" ,version ".zip")) (copy-recursively source build-directory)
(substitute* (string-append "wine-staging-" ,version (with-directory-excursion build-directory
"/patches/patchinstall.sh") (("/bin/sh") sh)) (substitute* "patches/patchinstall.sh"
(substitute* (string-append "wine-staging-" ,version (("/bin/sh")
"/patches/gitapply.sh") (("/usr/bin/env") env)) (string-append bash "/bin/sh")))
(mkdir-p wine-staging) (substitute* "patches/gitapply.sh"
(copy-recursively (string-append "wine-staging-" ,version) (("/usr/bin/env")
wine-staging) (string-append coreutils "/bin/env"))))
(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")