From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH 02/11] gnu: Add mingw-w64. Date: Tue, 09 Aug 2016 10:28:42 +0300 Message-ID: <87y446cset.fsf@gmail.com> References: <20160809064139.27872-1-janneke@gnu.org> <20160809064139.27872-3-janneke@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX1Sy-0006ej-IE for guix-devel@gnu.org; Tue, 09 Aug 2016 03:28:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bX1Su-0002b2-IM for guix-devel@gnu.org; Tue, 09 Aug 2016 03:28:48 -0400 In-Reply-To: <20160809064139.27872-3-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Tue, 9 Aug 2016 08:41:30 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Jan Nieuwenhuizen Cc: guix-devel@gnu.org Hello, I understand nothing in all this mingw stuff, I just have a couple of insignificant comments. Jan Nieuwenhuizen (2016-08-09 09:41 +0300) wrote: > * gnu/packages/patches/gcc-4.9.3-mingw-gthr-default.patch, > gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch, > gnu/packages/mingw.scm: New files. > * gnu/local.mk (dist_patch_DATA): Add them. [...] > +(define-public mingw-w64 > + (package > + (name "mingw-w64") > + (version "5.0-rc2") > + (source (origin > + (method url-fetch) > + (uri (string-append > + "https://sourceforge.net/projects/mingw-w64/files/mingw-w64/" > + "mingw-w64-release/mingw-w64-v" version ".tar.bz2")) > + (sha256 > + (base32 "0imdary8j07if8ih73pfgxiclpf2ax8h3mz8mxln07i8sbbd30c9")) > + (patches (search-patches "mingw-w64-5.0rc2-gcc-4.9.3.patch")))) > + (native-inputs `(("xgcc-core" ,xgcc-sans-libc-i686-w64-mingw32) > + ("xbinutils" ,xbinutils-i686-w64-mingw32))) > + (build-system gnu-build-system) > + (search-paths > + (list (search-path-specification > + (variable "CROSS_C_INCLUDE_PATH") > + (files '("include" "i686-w64-mingw32/include"))) > + (search-path-specification > + (variable "CROSS_LIBRARY_PATH") > + (files > + '("lib" "lib64" "i686-w64-mingw32/lib" "i686-w64-mingw32/lib64"))))) > + (arguments > + `(#:configure-flags '("--host=i686-w64-mingw32") > + #:phases (modify-phases %standard-phases > + (add-before > + 'configure 'setenv The indentation of this 'modify-phases' is not good. I would write it like this: #:phases (modify-phases %standard-phases (add-before 'configure 'setenv (lambda ...))) > + (lambda _ > + (let ((xgcc-core (assoc-ref %build-inputs "xgcc-core")) Here, instead of referring '%build-inputs', it is better (I mean it would be more "functional") to use 'inputs' argument passed to this phase, like this: (lambda* (#:key inputs #:allow-other-keys) (let ((xgcc-core (assoc-ref inputs "xgcc-core")) -- Alex