From patchwork Thu Jan 16 00:36:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brett Gilio X-Patchwork-Id: 19836 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 852DA17ACF; Thu, 16 Jan 2020 00:37:16 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 0741717ABE for ; Thu, 16 Jan 2020 00:37:15 +0000 (GMT) Received: from localhost ([::1]:34586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irt9u-00035H-D3 for patchwork@mira.cbaines.net; Wed, 15 Jan 2020 19:37:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59922) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irt9k-000310-2Q for guix-patches@gnu.org; Wed, 15 Jan 2020 19:37:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irt9i-0005Sm-EN for guix-patches@gnu.org; Wed, 15 Jan 2020 19:37:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58786) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1irt9i-0005Se-B3 for guix-patches@gnu.org; Wed, 15 Jan 2020 19:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1irt9i-0000pb-9E for guix-patches@gnu.org; Wed, 15 Jan 2020 19:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38606] [WIP v2 1/1] gnu: Add smlnj. References: <871rt77dsl.fsf@posteo.net> In-Reply-To: <871rt77dsl.fsf@posteo.net> Resent-From: Brett Gilio Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Jan 2020 00:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38606 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 38606@debbugs.gnu.org Received: via spool by 38606-submit@debbugs.gnu.org id=B38606.15791350173174 (code B ref 38606); Thu, 16 Jan 2020 00:37:02 +0000 Received: (at 38606) by debbugs.gnu.org; 16 Jan 2020 00:36:57 +0000 Received: from localhost ([127.0.0.1]:36524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irt9V-0000os-GS for submit@debbugs.gnu.org; Wed, 15 Jan 2020 19:36:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irt9T-0000oe-R8 for 38606@debbugs.gnu.org; Wed, 15 Jan 2020 19:36:48 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1irt9O-0005Ic-LU for 38606@debbugs.gnu.org; Wed, 15 Jan 2020 19:36:42 -0500 Received: from [2605:6000:1a0d:4c95::3d] (port=33984 helo=oryx) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1irt9O-0003Ig-5t for 38606@debbugs.gnu.org; Wed, 15 Jan 2020 19:36:42 -0500 From: Brett Gilio Date: Wed, 15 Jan 2020 18:36:43 -0600 Message-ID: <87ftggw82s.fsf@gnu.org> MIME-Version: 1.0 Content-Disposition: inline; filename=v2-0001-gnu-Add-smlnj.patch Content-Description: [WIP v2 1/1] gnu: Add smlnj. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From 51d83f01e80f274fe30cf6cf39f5f0eff554c7a6 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 13 Dec 2019 22:02:20 -0600 Subject: [WIP v2 1/1] gnu: Add smlnj. * gnu/packages/sml.scm (smlnj): New variable. --- gnu/packages/sml.scm | 158 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 156 insertions(+), 2 deletions(-) diff --git a/gnu/packages/sml.scm b/gnu/packages/sml.scm index d441dcf638..af7f15512b 100644 --- a/gnu/packages/sml.scm +++ b/gnu/packages/sml.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2017 Andy Patterson ;;; Copyright © 2017 Tobias Geerinckx-Rice ;;; Copyright © 2018 Ricardo Wurmus -;;; Copyright © 2019 Brett Gilio +;;; Copyright © 2019, 2020 Brett Gilio ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,7 +28,8 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix packages)) + #:use-module (guix packages) + #:use-module (guix gexp)) (define-public polyml (package @@ -75,3 +76,156 @@ function interface, and a symbolic debugger.") (license (list license:lgpl2.1 license:lgpl2.1+)))) + +(define (smlnj-file version filename hash) + (origin + (method url-fetch) + (uri (string-append "http://smlnj.cs.uchicago.edu/dist/working/" version "/" filename)) + (sha256 + (base32 + hash)))) + +(define-public smlnj + (package + (name "smlnj") + (version "110.94") + (source #f) ; Sources are passed as native-inputs. + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'unpack + (lambda* (#:key inputs #:allow-other-keys) + (for-each + (lambda (file) + (invoke "tar" "xvf" (assoc-ref inputs file))) + (list "config" + "cm" + "compiler" + "runtime" + "system" + "MLRISC" + "smlnj-lib" + "old-basis" + "ckit" + "nlffi" + "cml" + "eXene" + "ml-lpt" + "ml-lex" + "ml-yacc" + "ml-burg" + "pgraph" + "trace-debug-profile" + "heap2asm" + "smlnj-c")) + #t)) + (delete 'configure) + (replace 'patch-source-shebangs + (lambda _ (substitute* + (list "config/install.sh" + "runtime/objs/mk.amd64-linux") + (("/bin/sh") (which "sh"))))) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "config/chk-global-names.sh" + (("CC=.*") "CC=gcc")) + (substitute* "config/unpack" + (("# Now do it:") "exit 0")) + (substitute* "config/_arch-n-opsys" + (("uname") (which "uname"))) + (substitute* "config/install.sh" + (("DEFAULT_SIZE=\"32\"") + "DEFAULT_SIZE=\"64\"") + (("BASEDIR=\\$ROOT/base") + "BASEDIR=$ROOT")) + (invoke "sh" "config/install.sh")))))) + (native-inputs + `(("cm" + ,(smlnj-file version + "cm.tgz" + "1x70nrk1gnxrzx16c7dyns35zkrqc0ngqyk34880ih04ccwmyxkp")) + ("smlnj-c" + ,(smlnj-file version + "smlnj-c.tgz" + "1w6yrckbn5yxi3m0hqb57lwmf7pri66yi0zs2ahvcv5bwbr4dfh1")) + ("config" + ,(smlnj-file version + "config.tgz" + "16ynwrakbcv5mp8i596aw8da09qdjkx9j0y5wxgix8aa99px4aba")) + ("compiler" + ,(smlnj-file version + "compiler.tgz" + "1fmxj017s9bg1hr4psvcxasp0hcrc00bk9f0845fr7gy8mb743a3")) + ("runtime" + ,(smlnj-file version + "runtime.tgz" + "08xq9ddp4ciqi1rwsnma0rsj7ydlbzcb9pc9m27n4krd61h8k4z9")) + ("system" + ,(smlnj-file version + "system.tgz" + "0lmi03mx9fbrdshazqmrvg1j4s6hnpyfm90rl7f8qhgy0qi8almh")) + ("MLRISC" + ,(smlnj-file version + "MLRISC.tgz" + "0y3f1ffzpqfn03a941dmjsr0zz4lz742ww1zbfnp15jbcy7mybiv")) + ("smlnj-lib" + ,(smlnj-file version + "smlnj-lib.tgz" + "1vvlgws7kb53v63hwfakvq5xbiix1pqiafk5m86qas46ayy731g7")) + ("old-basis" + ,(smlnj-file version + "old-basis.tgz" + "1kjgwnz0caymk4im9mjf88f2cym8bndnz0r84di5l4bd6pkwl8b2")) + ("ckit" + ,(smlnj-file version + "ckit.tgz" + "158973wwd4pkf6fpzwyfm9968xl7pmb2sd2zf1fb3s055gm5anz2")) + ("nlffi" + ,(smlnj-file version + "nlffi.tgz" + "13b3561b2bxpxyyy8ld359na7vimndw53nsc0fgr9li4xa3y70hl")) + ("cml" + ,(smlnj-file version + "cml.tgz" + "0q00nmsqq33vdykyz9mgsy7r437l26gnxxmfl03ls88kiq7fbq3l")) + ("eXene" + ,(smlnj-file version + "eXene.tgz" + "0phxh34psji67z30lq61b8pkwp7m45pakn6vnk592lmibikax2q0")) + ("ml-lpt" + ,(smlnj-file version + "ml-lpt.tgz" + "053784lbf57pzd80gz4x7chqyxvdn580ix6pkqwcr1vwpv980zyj")) + ("ml-lex" + ,(smlnj-file version + "ml-lex.tgz" + "052w6ck80v1jgql4m0k24hkkx9k4qwvqgxvk22hnwfh6k1avrk1i")) + ("ml-yacc" + ,(smlnj-file version + "ml-yacc.tgz" + "1vj346ffzx7vbcnzhw49cqzlmfw35hzzhvlivyakdqalqwc97h6m")) + ("ml-burg" + ,(smlnj-file version + "ml-burg.tgz" + "02qw4xkdh4h6ngj8a5yhgg4k4ph6lnhslbfh1drdz79whd389lzx")) + ("pgraph" + ,(smlnj-file version + "pgraph.tgz" + "0c4qgm46dvkix4s56hj3ii9025m3pcxj4hc2z4mcdxlw0gj0r684")) + ("trace-debug-profile" + ,(smlnj-file version + "trace-debug-profile.tgz" + "1z8ip80hgnj637ywcpzj9hfbnsci3qsdhssdbgparkzh7mk2bi4i")) + ("heap2asm" + ,(smlnj-file version + "heap2asm.tgz" + "0g0ndf4wj197igrac136lsc8wpj9686vv0kwarrbwffrrrkb1w76")))) + (synopsis "Standard ML of New Jersey interactive compiler") + (description "SML/NJ is an implementation of the Standard ML programming +language. Standard ML has many features, including type safety, polymorphism, +algebraic data types with pattern matching, higher-order functions, and a +sophisticated module system. It is especially well-suited for writing +compilers and other language processors.") + (home-page "http://www.smlnj.org/") + (license license:bsd-2))) -- 2.24.1