From patchwork Wed Aug 14 12:46:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "ashish.is--- via Guix-patches\" via" X-Patchwork-Id: 30051 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 54DF027BBE2; Wed, 14 Aug 2024 13:50:53 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 266B727BBE9 for ; Wed, 14 Aug 2024 13:50:52 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seDSR-0001Q8-EW; Wed, 14 Aug 2024 08:50:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seDSO-0001FH-Mi for guix-patches@gnu.org; Wed, 14 Aug 2024 08:50:28 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seDSO-0005Bc-CW for guix-patches@gnu.org; Wed, 14 Aug 2024 08:50:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=kijoNRDpniv5te+OwZCr79CieyEYKueedpN9uay62DU=; b=R8Bybzp5OT8tW/7DF01gkAFk4XQ+lvX43ZHcKMTK4EjbtLm9phfxdN2Xztz6TbJo/1PCnaJHwSDaFGSK21y8TSD9gHKf6M2eHQjdDBMUoX2reYTr5ZVBWse9drFEMp5hbSDRs7hl+UxMGFU7De8i7SGsr843TiIruccalW9h7ub6QDEj+DVaXER1h0nHo8rDcBr+hry4Bw5lKWudTc2uoN6yt74143X1wW0Qxsv1/zKNb5BiDnjOmgDvMNc2eFlZ+tK17QgoNbSazgal9tgcRM2dQcjpej7KYzUwgJUw25nG1lNKWFfgceU2zKNRhLLkHwL1/wpYbxDrwRkhYVGFXg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1seDSv-0003HF-TK; Wed, 14 Aug 2024 08:51:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72621] [PATCH] gnu: Add clasp. Resent-From: ashish.is@lostca.se Original-Sender: "Debbugs-submit" Resent-CC: glv@posteo.net, cox.katherine.e+guix@gmail.com, me@bonfacemunyoki.com, sharlatanus@gmail.com, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Wed, 14 Aug 2024 12:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72621 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72621@debbugs.gnu.org Cc: Ashish SHUKLA , Guillaume Le Vaillant , Katherine Cox-Buday , Munyoki Kilyungi , Sharlatan Hellseher , jgart X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Guillaume Le Vaillant , Katherine Cox-Buday , Munyoki Kilyungi , Sharlatan Hellseher , jgart Received: via spool by submit@debbugs.gnu.org id=B.172363980912521 (code B ref -1); Wed, 14 Aug 2024 12:51:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Aug 2024 12:50:09 +0000 Received: from localhost ([127.0.0.1]:46459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seDS5-0003Ft-DV for submit@debbugs.gnu.org; Wed, 14 Aug 2024 08:50:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:40750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seDS2-0003Fk-Fl for submit@debbugs.gnu.org; Wed, 14 Aug 2024 08:50:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seDRT-0000Vb-3z for guix-patches@gnu.org; Wed, 14 Aug 2024 08:49:31 -0400 Received: from anamika.lostca.se ([65.21.75.227]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seDRP-0004mc-5H for guix-patches@gnu.org; Wed, 14 Aug 2024 08:49:29 -0400 Received: from localhost.localdomain (poincare.inet6.in [IPv6:2a0a:4cc0:1:12d4::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: abbe) by anamika.lostca.se (Postfix) with ESMTPSA id 9D330223A6; Wed, 14 Aug 2024 12:49:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lostca.se; s=anamika; t=1723639764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kijoNRDpniv5te+OwZCr79CieyEYKueedpN9uay62DU=; b=P0tinR5Nk+gELjh2CCSCndcRMdnqY4qhM/sGnnxmdiB+D+Fk6DjpOeOX44AIb7eWmpk4CB tfGN+zgZHOZyO1Y8k/qu4nRdO8cYCDPqc8RGgnjqWHCppQ0DwOGFJTJiWqX0nYbH2jr5Bz gHBGK/SRsFkyiQehLqiVeYy01h0dS48= Date: Wed, 14 Aug 2024 12:46:18 +0000 Message-ID: X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Received-SPF: pass client-ip=65.21.75.227; envelope-from=ashish.is@lostca.se; helo=anamika.lostca.se X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Reply-to: ashish.is@lostca.se X-ACL-Warn: , "ashish.is--- via Guix-patches" X-Patchwork-Original-From: "ashish.is--- via Guix-patches" via From: "ashish.is--- via Guix-patches\" via" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Ashish SHUKLA * gnu/packages/lisp.scm (clasp-cl): New variable. Change-Id: I1d1dbc358c0e05577d3d535600c2f9863ad29fad --- Hi, This patch adds Clasp Common Lisp implementation[0] to Guix. Most of it is inspired/based off the work in nixpkgs[1]. References: [0] https://clasp-developers.github.io/ [1] https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/clasp/default.nix Thanks! gnu/packages/lisp.scm | 72 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) base-commit: ca5ff8aa8b50ac317003d76cc4ea2a621d5a3819 diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 97f7dd357b..b41a66e4a9 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2023 Andrew Kravchuk ;;; Copyright © 2024 Andreas Enge ;;; Copyright © 2024 bigbug +;;; Copyright © 2024 Ashish SHUKLA ;;; ;;; This file is part of GNU Guix. ;;; @@ -367,6 +368,77 @@ (define-public ccl interface.") (license license:asl2.0))) +(define-public clasp-cl + (package + (name "clasp") + (version "2.6.0") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/clasp-developers/clasp/releases/download/" + version "/clasp-" version ".tar.gz")) + (sha256 (base32 "10jjhcid6qp64gx29iyy5rqqijwy8hrvx66f0xabdj8w3007ky39")))) + (build-system gnu-build-system) + (inputs (list boost fmt gmp libelf libunwind clang-15 llvm-15 + `(,gcc "lib"))) + (native-inputs (list sbcl ninja pkg-config binutils-gold)) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'check) + (add-after 'unpack 'patch-koga + (lambda* _ + (call-with-port (open-file "src/koga/units.lisp" "a") + (lambda (p) + (display "(defmethod configure-unit (c (u (eql :git))))\n" p))))) + (add-before 'configure 'set-configure-environment + (lambda* _ + (setenv "SOURCE_DATE_EPOCH" "1") + (setenv "ASDF_OUTPUT_TRANSLATIONS" + (string-append (getenv "PWD") + ":" + (getenv "PWD") + "/__fasls")))) + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (clang (assoc-ref inputs "clang")) + (ld-flags + (string-join + (apply append + (map (lambda (f) + (list "-L" f "-rpath" f)) + (string-split (getenv "LIBRARY_PATH") #\:))) + ","))) + (invoke "sbcl" + "--script" + "./koga" + "--skip-sync" + "--build-mode=bytecode-faso" + (string-append "--cc=" clang "/bin/clang") + (string-append "--cxx=" clang "/bin/clang++") + (string-append "--ldflags=-Wl," ld-flags) + "--reproducible-build" + "--package-path=/" + (string-append "--bin-path=" out "/bin") + (string-append "--lib-path=" out "/lib") + (string-append "--share-path=" out "/share"))))) + (replace 'build + (lambda* _ + (invoke "ninja" "-C" "build"))) + (replace 'install + (lambda* _ + (invoke "ninja" "-C" "build" "install")))))) + (home-page "https://clasp-developers.github.io/") + (synopsis "Common Lisp implementation based on LLVM and C++.") + (description "Clasp is a new Common Lisp implementation that seamlessly + interoperates with C++ libraries and programs using LLVM for compilation to + native code. This allows Clasp to take advantage of a vast array of + preexisting libraries and programs, such as out of the scientific computing + ecosystem. Embedding them in a Common Lisp environment allows you to make use + of rapid prototyping, incremental development, and other capabilities that + make it a powerful language.") + (license license:lgpl2.1))) + (define-public cl-asdf (package (name "cl-asdf")