From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UMBoDu8s9GEz8gAAgWs5BA (envelope-from ) for ; Fri, 28 Jan 2022 18:50:39 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eNcXB+8s9GGASwAAG6o9tA (envelope-from ) for ; Fri, 28 Jan 2022 18:50:39 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A5C873E6E7 for ; Fri, 28 Jan 2022 18:50:38 +0100 (CET) Received: from localhost ([::1]:35702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDVOP-0004Hs-QG for larch@yhetil.org; Fri, 28 Jan 2022 12:50:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDVNr-0004Gs-2w for guix-patches@gnu.org; Fri, 28 Jan 2022 12:50:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDVNq-0002Sk-Op for guix-patches@gnu.org; Fri, 28 Jan 2022 12:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nDVNq-0001QP-KE for guix-patches@gnu.org; Fri, 28 Jan 2022 12:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53609] [PATCH 2/2] gnu: Add ghc-4. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Jan 2022 17:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53609@debbugs.gnu.org Cc: Ricardo Wurmus Received: via spool by 53609-submit@debbugs.gnu.org id=B53609.16433921535395 (code B ref 53609); Fri, 28 Jan 2022 17:50:02 +0000 Received: (at 53609) by debbugs.gnu.org; 28 Jan 2022 17:49:13 +0000 Received: from localhost ([127.0.0.1]:60445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDVMx-0001Or-TX for submit@debbugs.gnu.org; Fri, 28 Jan 2022 12:49:13 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDVMu-0001Og-6V for 53609@debbugs.gnu.org; Fri, 28 Jan 2022 12:49:04 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1643392143; cv=none; d=zohomail.com; s=zohoarc; b=iuXdW6evE1BtsuN+UfYKx4IyQTLRGQ7Ww+wAqeuh6oUlxi3mbvlwrPpOjYSfBZwMyxKYtrjVxrm36g1dRnD3WaO6FjmPAvcH68j6YTBsEEhRJMykdqFPHenfuRG0scRl9wZLOE4ws/3s252Qipg8P01MppaPdnmQKtbXh+LOd1s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1643392143; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=x97BrmwcZBuBB6ifzIISWdGsE5E3FeCIWyWqoud/gtk=; b=eAbgRZxE8KpxQh/+orL/yOahhQc2L9m/8VJLnILUHA2lTzy30++lBoacFwI6liu0n0ZYVoVx9E1Gm1zepty0/1fgA3Hesdmv3hhw99HF3Z2DIvUFTRqOD183kv+HvbM+AOI7/l0s6cpnjXF6uzbvPmZuQrZu4EivZZYOzJWt+rE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1643392143; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=x97BrmwcZBuBB6ifzIISWdGsE5E3FeCIWyWqoud/gtk=; b=QafsXfB7iCZ7y6sz0ByqOdTpUG39hNsAQl2muia7RghLM3fiKYONoVnz5dTX3wJH g4G8sB0oN8l0/rfhzO4o89fWlvmN0LV+menmZpnJnDTBPd+J0YGpnfsDETz2e6faxhi mw9s6kEDdXXwbQf+5p5YZ7awPh7zng23e+n/uI50= Received: from localhost (p54ad4fa1.dip0.t-ipconnect.de [84.173.79.161]) by mx.zohomail.com with SMTPS id 1643392140918723.5731038276593; Fri, 28 Jan 2022 09:49:00 -0800 (PST) From: Ricardo Wurmus Date: Fri, 28 Jan 2022 18:48:52 +0100 Message-Id: <20220128174852.10637-2-rekado@elephly.net> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220128174852.10637-1-rekado@elephly.net> References: <20220128174852.10637-1-rekado@elephly.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643392238; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=x97BrmwcZBuBB6ifzIISWdGsE5E3FeCIWyWqoud/gtk=; b=R2BI1o3z0I8pqGhclCb5Nn1gtjz0O04Z2SFqqxxK2eyYLGrwSjslL+5+uiHJXWy/PLHUa+ o8yvG8YLVQJ0YzE2nylOYTRdvI9O4ZznTfhffuGOU0vJK/bLVm2/VWBap4MbWud22sllS7 KkGS81pOhhz0Wy/haZBhf/O437eSSVuTd1GIJl4rMRsPaN7Q+K/IyV6gnkb81/RURq8abW Hl+4TYHLr5jqLYJpgVFKwzZJHw0W0nCPlBWkRRH+O8gTsGz4WSyjry6kaVkb4rI6U6GlGS +3xZQzmNaB6QRaXo6Jg9z/9biibVu/VYmzGIrlXAo5RC5xrr6V4op0jjSuziqw== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1643392238; a=rsa-sha256; cv=fail; b=kRpDcKdIV+y/n6VKUPBAXokdHRT8ENKoeK95ZLEdS83q599RVNYfGcwSSQo2FXPejwbOTv wlPrtUes2/L7SsaOu7DnyCxxsSl/Kff6hi15sDP2Lwd55CsoiVMeEIDMkyJomAYGRb+jnP dxk5DJrfUVsqTOa9DVLnrb0hog5e1AqNDqQ9TibQjZLb8BEaJAFFudLLCkNDJipmxgwGJn 8fdX26H3WoH9V3ZxezWf0ms57Sv+0XjbdvPWuFJBuhzHufMSSGzRco+2S5zUAB45g1nTru zbR1pxK0jlQzPUgTzmt0GedYTD3PCa/we5Uxtm9oND/BkQsrkRJn/1GFFursZw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=QafsXfB7; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=QafsXfB7; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A5C873E6E7 X-Spam-Score: -0.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: UznOcQV6UtXB * gnu/packages/commencement.scm (ghc-4): New variable. --- gnu/packages/commencement.scm | 131 ++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 96d914344d..03f1ea276c 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -30,6 +30,7 @@ (define-module (gnu packages commencement) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages bootstrap) #:use-module (gnu packages base) #:use-module (gnu packages bash) @@ -3902,5 +3903,135 @@ (define-public gfortran-toolchain gfortran, as well as libc (headers and binaries, plus debugging symbols in the @code{debug} output), and binutils."))) +(define-public ghc-4 + (package + (name "ghc") + (version "4.08.2") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.haskell.org/ghc/dist/" + version "/" name "-" version "-src.tar.bz2")) + (sha256 + (base32 + "0ar4nxy4cr5vwvfj71gmc174vx0n3lg9ka05sa1k60c8z0g3xp1q")))) + (build-system gnu-build-system) + (supported-systems '("i686-linux" "x86_64-linux")) + (arguments + `(#:system "i686-linux" + #:implicit-inputs? #f + #:strip-binaries? #f + #:phases + (modify-phases %standard-phases + (replace 'bootstrap + (lambda* (#:key inputs #:allow-other-keys) + (delete-file "configure") + (delete-file "config.sub") + (install-file (string-append (assoc-ref inputs "automake") + "/share/automake-1.16/config.sub") + ".") + (let ((bash (which "bash"))) + (substitute* '("configure.in" + "ghc/configure.in" + "ghc/rts/gmp/mpn/configure.in" + "ghc/rts/gmp/mpz/configure.in" + "ghc/rts/gmp/configure.in" + "distrib/configure-bin.in") + (("`/bin/sh") (string-append "`" bash)) + (("SHELL=/bin/sh") (string-append "SHELL=" bash)) + (("^#! /bin/sh") (string-append "#! " bash))) + + (substitute* '("mk/config.mk.in" + "ghc/rts/gmp/mpz/Makefile.in" + "ghc/rts/gmp/Makefile.in") + (("^SHELL.*=.*/bin/sh") (string-append "SHELL = " bash))) + (substitute* "aclocal.m4" + (("SHELL=/bin/sh") (string-append "SHELL=" bash)))) + + (invoke "autoreconf" "--verbose" "--force"))) + (add-before 'configure 'configure-gmp + (lambda* (#:key build inputs outputs #:allow-other-keys) + (with-directory-excursion "ghc/rts/gmp" + (let ((bash (which "bash")) + (out (assoc-ref outputs "out"))) + (setenv "CONFIG_SHELL" bash) + (setenv "SHELL" bash) + (invoke bash "./configure"))))) + (replace 'configure + (lambda* (#:key build inputs outputs #:allow-other-keys) + (let ((bash (which "bash")) + (out (assoc-ref outputs "out"))) + (setenv "CONFIG_SHELL" bash) + (setenv "SHELL" bash) + (invoke bash "./configure" + "--enable-hc-boot" + (string-append "--prefix=" out) + (string-append "--build=" build) + (string-append "--host=" build))))) + (replace 'build + (lambda _ + ;; mkdirhier doesn't get built, so just use mkdir -p. + (substitute* "mk/paths.mk" + (("^INSTALL_DIR.*") + "INSTALL_DIR = mkdir -p")) + + #; + (substitute* "ghc/driver/ghc-asm.prl" + (("local\\(\\$\\*\\) = 1;") "") + (("endef\\$/") "endef$/s")) + + (invoke "make" "boot") + (invoke "make")))))) + (native-inputs + `(("gcc" ,gcc-mesboot0) + ("libc" ,glibc-mesboot0) + ("binutils" ,binutils-mesboot0) + + ("autoconf" ,autoconf-2.13) + ("automake" ,automake) + + ("make" ,gnu-make-final) + ("sed" ,sed-final) + ("grep" ,grep-final) + ("coreutils" ,coreutils-final) + ("bash" ,bash-final) + ("ld-wrapper" ,ld-wrapper) + ("kernel-headers" ,%bootstrap-linux-libre-headers) + ("tar" ,tar) + ("bzip2" ,bzip2) + ("diffutils" ,diffutils) + ("file" ,file) + ("findutils" ,findutils) + ("gawk" ,gawk) + + ;; TODO: Perl used to allow setting $* to enable multi-line + ;; matching. If we want to use a more recent Perl we need to + ;; patch all expressions that require multi-line matching. Hard + ;; to tell. + ("perl" ,perl-5.14))) + (native-search-paths (list (search-path-specification + (variable "GHC_PACKAGE_PATH") + (files (list + (string-append "lib/ghc-" version))) + (file-pattern ".*\\.conf\\.d$") + (file-type 'directory)))) + (home-page "https://www.haskell.org/ghc") + (synopsis "The Glasgow Haskell Compiler") + (description + "The Glasgow Haskell Compiler (GHC) is a state-of-the-art compiler and +interactive environment for the functional language Haskell.") + (license license:bsd-3))) + (native-search-paths (list (search-path-specification + (variable "GHC_PACKAGE_PATH") + (files (list + (string-append "lib/ghc-" version))) + (file-pattern ".*\\.conf\\.d$") + (file-type 'directory)))) + (home-page "https://www.haskell.org/ghc") + (synopsis "The Glasgow Haskell Compiler") + (description + "The Glasgow Haskell Compiler (GHC) is a state-of-the-art compiler and +interactive environment for the functional language Haskell.") + (license license:bsd-3))) ;;; commencement.scm ends here -- 2.34.0