From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id gO89JVWwX19zEQAA0tVLHw (envelope-from ) for ; Mon, 14 Sep 2020 18:03:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aLWVH1WwX19gQQAAbx9fmQ (envelope-from ) for ; Mon, 14 Sep 2020 18:03:01 +0000 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 BCF6C940390 for ; Mon, 14 Sep 2020 18:03:00 +0000 (UTC) Received: from localhost ([::1]:39352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHsQA-00040d-P4 for larch@yhetil.org; Mon, 14 Sep 2020 13:37:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHsPW-00039Y-LS for guix-patches@gnu.org; Mon, 14 Sep 2020 13:37:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44560) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHsPW-0008Pj-0w for guix-patches@gnu.org; Mon, 14 Sep 2020 13:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kHsPV-0002Fj-SA for guix-patches@gnu.org; Mon, 14 Sep 2020 13:37:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#38605] [WIP MLton 1/1] gnu: Add mlton. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 14 Sep 2020 17:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38605 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Brett Gilio Cc: 38605@debbugs.gnu.org Received: via spool by 38605-submit@debbugs.gnu.org id=B38605.16001050088640 (code B ref 38605); Mon, 14 Sep 2020 17:37:01 +0000 Received: (at 38605) by debbugs.gnu.org; 14 Sep 2020 17:36:48 +0000 Received: from localhost ([127.0.0.1]:56106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHsPI-0002FH-3R for submit@debbugs.gnu.org; Mon, 14 Sep 2020 13:36:48 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:41498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHsPE-0002F0-M0 for 38605@debbugs.gnu.org; Mon, 14 Sep 2020 13:36:47 -0400 Received: by mail-wr1-f49.google.com with SMTP id w5so512352wrp.8 for <38605@debbugs.gnu.org>; Mon, 14 Sep 2020 10:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=4kGpYnBpkJLXwciiccaogdvXVdcXTt6d85canf6/aOs=; b=ELaoow68C/OPywtEidyZw3mMnld/CpUf8peYlg26P6vIrqWz/FHfvvS0K8pkmbQJuh e/GNDHB8OX92qmdNO8mNBKBG74LHMbKgl2XazMdGC6xwyGWbfZ9NLCMKzEash0iwFqNx 5ook1x/U7OFLwj9qRXwg6iCE8iB6aRhmnfshA/3+xSCK1uc6898MZjDxULPoSp9WyW9x Y0idI1poAM/8pdvd6eWcuyV3tlxj3FWFTC+pzg0Qoc1FXyK/sZWslB+sGk1xEk90ZuEg Q72SKXyA01vs4s0ovF4PAjy/ggdXja+cqv+vTKL8RFvlVD9XCdofTjpUB9r/xmOlu07z cVSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=4kGpYnBpkJLXwciiccaogdvXVdcXTt6d85canf6/aOs=; b=VmO0YCJC91L8YLkQ4YejUQ/xjWE/lh5ZxlxNNIA+0aETEB+ogD8/QcG7cj/q8/QFvX qA7xdSNJ8ZzhToZFuaJXKFACbpYh1VAYgb4gPrNjzyak8GX2vh1C7xIt++HR6iCJ4l7N PjDJYRVl5mlfTCLEZPD9uPHxJXeTwoJ/MEPUfxnzqF/06mL2ouDJ8wXSuoNDf7j3s97L krbcR9bTDEMlmI+GDDLVewVgcGFOlP0g3jzkdQgo/zlnZH5FP3aArlCp8jHPrz6U7xh/ ukX2L3bQkBXaINPzskSZv4gUKt5JQ3AhkzMBu33xw3tYmjq9da7O2R0rOsbI9W6jOX7B 16Uw== X-Gm-Message-State: AOAM531oavLcNfSdQ1r6Ud8qRU+qWgFfI1PMDE+xaErduQdXRRHcyh57 XqZGtfLZZOWd7eh83b9SuZndUHI+5hw= X-Google-Smtp-Source: ABdhPJw83outh8x4IvbCpbzdPx6UaAvBk20M0p5KIO/6BJt7U05e/cUfZny8CrUqfGQTUcJtkwI/zA== X-Received: by 2002:a5d:4cc1:: with SMTP id c1mr16998435wrt.122.1600104998526; Mon, 14 Sep 2020 10:36:38 -0700 (PDT) Received: from pfiuh02 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id a17sm22931159wra.24.2020.09.14.10.36.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 10:36:37 -0700 (PDT) From: zimoun References: <877e2z7e3x.fsf@posteo.net> <874ky37e1n.fsf@posteo.net> Date: Mon, 14 Sep 2020 19:36:37 +0200 In-Reply-To: <874ky37e1n.fsf@posteo.net> (Brett Gilio's message of "Fri, 13 Dec 2019 21:59:32 -0600") Message-ID: <87ft7kqmze.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -0.3 (/) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=ELaoow68; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: mqbFO3wzNKan Hi Brett, Digging in old unmerged patches, I hit this one. :-) On Fri, 13 Dec 2019 at 21:59, Brett Gilio wrote: >>>From d6e94b0a04bf71e51d29b7228bd4233bf763eaaa Mon Sep 17 00:00:00 2001 > From: Brett Gilio > Date: Fri, 13 Dec 2019 21:54:13 -0600 > Subject: [WIP MLton 1/1] gnu: Add mlton. > > * gnu/packages/sml.scm (mlton-no-gcc): New variable. > --- > gnu/packages/sml.scm | 138 +++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 138 insertions(+) What is the status of the WIP? Have you make progress? > diff --git a/gnu/packages/sml.scm b/gnu/packages/sml.scm > index 30ee58c498..e45ce4c59c 100644 > --- a/gnu/packages/sml.scm > +++ b/gnu/packages/sml.scm > @@ -75,3 +75,141 @@ function interface, and a symbolic debugger.") > (license > (list license:lgpl2.1 > license:lgpl2.1+)))) > + > +(define-private mlton-reduced > + (package > + (name "mlton") > + (version "20180207") > + (source (origin > + (method url-fetch) > + (uri (string-append "https://github.com/MLton/" name > + "/releases/download/on-" version > + "-release/" name "-" version > + "-1.amd64-linux.tgz")) > + (sha256 > + (base32 > + "0f4q575yfm5dpg4a2wsnqn4l2zrar96p6rlsk0dw10ggyfwvsjlf")))) > + (build-system trivial-build-system) > + ;; TODO: The build arguments can be much more programmatic. > + (arguments > + '(#:modules > + ((guix build utils)) > + #:builder > + (begin > + (use-modules (guix build utils)) > + (let* > + ((out (assoc-ref %outputs "out")) > + (source (assoc-ref %build-inputs "source")) > + (tar (string-append (assoc-ref %build-inputs "tar") "/bin/tar")) > + (patchelf (string-append (assoc-ref %build-inputs "patchelf") "/bin/patchelf")) > + (ld (string-append (assoc-ref %build-inputs "glibc") "/lib/ld-linux-x86-64.so.2")) > + (gmp (string-append (assoc-ref %build-inputs "gmp") "/lib")) > + (bash (string-append (assoc-ref %build-inputs "bash") "/bin/bash")) > + (rm (string-append (assoc-ref %build-inputs "coreutils") "/bin/rm")) > + (PATH > + (string-append > + (assoc-ref %build-inputs "gzip") "/bin" > + ":" > + (assoc-ref %build-inputs "tar") "/bin"))) > + (mkdir-p out) > + (mkdir-p (string-append out "/bin")) > + (with-directory-excursion out > + (setenv "PATH" PATH) > + (system* tar "xf" source "--strip-components=1") > + ;; PATCHES FOR /LIB/MLTON/MLTON-COMPILE > + (system* patchelf > + "--set-interpreter" > + ld > + (string-append out "/lib/mlton/mlton-compile")) > + (system* patchelf > + "--set-rpath" > + gmp > + (string-append out "/lib/mlton/mlton-compile")) > + ;; PATCHES FOR /BIN/MLLEX > + (system* patchelf > + "--set-interpreter" > + ld > + (string-append out "/bin/mllex")) > + (system* patchelf > + "--set-rpath" > + gmp > + (string-append out "/bin/mllex")) > + ;; PATCHES FOR /BIN/MLYACC > + (system* patchelf > + "--set-interpreter" > + ld > + (string-append out "/bin/mlyacc")) > + (system* patchelf > + "--set-rpath" > + gmp > + (string-append out "/bin/mlyacc")) > + ;; DELETE ALL UNNEEDED COMPONENTS > + (system* rm "-rf" > + "bin/mlprof" > + "bin/mlnlffigen" > + "LICENSE" > + "Makefile" > + "CHANGELOG.adoc" > + "README.adoc" > + "share") > + ;; PATCH SHEBANG FOR BIN/MLTON > + (substitute* "bin/mlton" > + (("/usr/bin/env bash") > + bash))))))) > + (native-inputs `(("glibc" ,glibc) > + ("patchelf" ,patchelf) > + ("tar" ,tar) > + ("bash" ,bash) > + ("coreutils" ,coreutils) > + ("gzip" ,gzip) > + ("gmp" ,gmp))) > + (supported-systems '("x86_64-linux")) > + (synopsis #f) > + (description #f) > + (home-page #f) > + (license #f))) > + > +(define-public mlton-no-gcc > + (package > + (name "mlton-no-gcc") > + (version "20180207") > + (source (origin > + (method url-fetch) > + (uri (string-append "https://github.com/MLton/" name > + "/archive/on-" version > + "-release.tar.gz")) > + (sha256 > + (base32 > + "1l1flhxx8hr4n3mf87m02231r3m2f3sh28zfxma3g41jscmj21zi")))) > + (build-system gnu-build-system) > + (arguments > + `(#:parallel-build? #f ; See: https://github.com/MLton/mlton/issues/348 > + #:phases > + (modify-phases %standard-phases > + (delete 'configure) > + (replace 'install > + (lambda _ > + (invoke "make" > + (string-append "PREFIX=" (assoc-ref %outputs "out")) > + "install")))))) > + (native-inputs > + `(("mlton" ,mlton-reduced) > + ("which" ,which))) > + (propagated-inputs > + `(("gmp" ,gmp))) > + (supported-systems '("x86_64-linux")) > + (synopsis "Whole-program, optimizing Standard ML compiler") > + (description "MLton is a whole-program optimizing compiler for Standard ML. > +MLton generates standalone executables with excellent runtime performance, is > +SML '97 compliant, and has a complete basis library. MLton has source-level > +profiling, a fast C FFI, an interface to the GNU multiprecision library, and > +lots of useful libraries.") > + (home-page "http://mlton.org/") > + (license license:hpnd))) > + > +(define-public mlton > + (package (inherit mlton-no-gcc) > + (name "mlton") > + (propagated-inputs > + `(("gcc-toolchain" ,gcc-toolchain) > + ,@(package-propagated-inputs mlton-no-gcc))))) All the best, simon