From f868276b8af13ab577fffd41da5da33076e0665e Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 23 Aug 2018 05:11:19 +0200 Subject: 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. --- gnu/packages/wine.scm | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) (limited to 'gnu/packages/wine.scm') diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm index 0f3d227732..9c1257b2a1 100644 --- a/gnu/packages/wine.scm +++ b/gnu/packages/wine.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016, 2017, 2018 Efraim Flashner ;;; Copyright © 2017, 2018 Rutger Helling ;;; Copyright © 2017 Nicolas Goaziou +;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +25,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) @@ -226,38 +228,38 @@ integrate Windows applications into your desktop.") (version "3.14") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/wine-staging/wine-staging/archive/v" - version ".zip")) - (file-name (string-append name "-" version ".zip")) - (sha256 - (base32 - "1w3n90ab3xyhdzxw1mnkp2cw76lpm5l75hy9xkw3kz2fwzq6lwz7")))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/wine-staging/wine-staging") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0h6gck0p92hin0m13q1hnlfnqs4vy474w66ppinvqms2zn3vibgi")))) (build-system trivial-build-system) (native-inputs `(("bash" ,bash) - ("coreutils" ,coreutils) - ("unzip" ,unzip))) + ("coreutils" ,coreutils))) (arguments `(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils)) - (let* ((out (assoc-ref %outputs "out")) - (wine-staging (string-append out "/share/wine-staging")) + (let* ((build-directory ,(string-append name "-" version)) (source (assoc-ref %build-inputs "source")) - (sh (string-append (assoc-ref %build-inputs "bash") "/bin/bash")) - (env (string-append (assoc-ref %build-inputs "coreutils") "/bin/env")) - (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip"))) - (copy-file source (string-append ,name "-" ,version ".zip")) - (invoke unzip (string-append ,name "-" ,version ".zip")) - (substitute* (string-append "wine-staging-" ,version - "/patches/patchinstall.sh") (("/bin/sh") sh)) - (substitute* (string-append "wine-staging-" ,version - "/patches/gitapply.sh") (("/usr/bin/env") env)) - (mkdir-p wine-staging) - (copy-recursively (string-append "wine-staging-" ,version) - wine-staging) + (bash (assoc-ref %build-inputs "bash")) + (coreutils (assoc-ref %build-inputs "coreutils")) + (out (assoc-ref %outputs "out")) + (wine-staging (string-append out "/share/wine-staging"))) + (copy-recursively source build-directory) + (with-directory-excursion build-directory + (substitute* "patches/patchinstall.sh" + (("/bin/sh") + (string-append bash "/bin/sh"))) + (substitute* "patches/gitapply.sh" + (("/usr/bin/env") + (string-append coreutils "/bin/env")))) + (copy-recursively build-directory wine-staging) #t)))) (home-page "https://github.com/wine-staging") (synopsis "Patchset for Wine") -- cgit v1.2.3