From: "ashish.is--- via Guix-patches" via <guix-patches@gnu.org>
To: 72621@debbugs.gnu.org
Cc: Ashish SHUKLA <ashish.is@lostca.se>,
Guillaume Le Vaillant <glv@posteo.net>,
Katherine Cox-Buday <cox.katherine.e+guix@gmail.com>,
Munyoki Kilyungi <me@bonfacemunyoki.com>,
Sharlatan Hellseher <sharlatanus@gmail.com>,
jgart <jgart@dismail.de>
Subject: [bug#72621] [PATCH] gnu: Add clasp.
Date: Wed, 14 Aug 2024 12:46:18 +0000 [thread overview]
Message-ID: <e3e60078b0b434dfe097c0f27309889a5951e5a5.1723639578.git.ashish.is@lostca.se> (raw)
From: Ashish SHUKLA <ashish.is@lostca.se>
* 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(+)
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 <awkravchuk@gmail.com>
;;; Copyright © 2024 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2024 bigbug <bigbookofbug@proton.me>
+;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
;;;
;;; 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")
base-commit: ca5ff8aa8b50ac317003d76cc4ea2a621d5a3819
--
2.46.0
next reply other threads:[~2024-08-14 12:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 12:46 ashish.is--- via Guix-patches via [this message]
2024-08-15 11:12 ` [bug#72621] [PATCH] gnu: Add clasp Aleksej via Guix-patches via
2024-08-15 12:29 ` bug#72621: " Guillaume Le Vaillant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e3e60078b0b434dfe097c0f27309889a5951e5a5.1723639578.git.ashish.is@lostca.se \
--to=guix-patches@gnu.org \
--cc=72621@debbugs.gnu.org \
--cc=ashish.is@lostca.se \
--cc=cox.katherine.e+guix@gmail.com \
--cc=glv@posteo.net \
--cc=jgart@dismail.de \
--cc=me@bonfacemunyoki.com \
--cc=sharlatanus@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).