[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#72925] [PATCH v8] gnu: add jpm package
From: |
Omar Bassam |
Subject: |
[bug#72925] [PATCH v8] gnu: add jpm package |
Date: |
Fri, 4 Oct 2024 18:57:36 +0300 |
* gnu/packages/lisp.scm (jpm): New Variable
Change-Id: I92cf244ab23062ae3448099506d1b068394d7094
---
gnu/packages/lisp.scm | 72 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 6c16d8ab71..ee9913f14e 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -29,6 +29,7 @@
;;; Copyright © 2024 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2024 bigbug <bigbookofbug@proton.me>
;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
+;;; Copyright © 2024 Omar Bassam <omar.bassam88@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -70,6 +71,7 @@ (define-module (gnu packages lisp)
#:use-module (gnu packages bdw-gc)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
+ #:use-module (gnu packages certs)
#:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
#:use-module (gnu packages curl)
@@ -917,6 +919,76 @@ (define-public janet
assembler, PEG) is less than 1MB.")
(license license:expat)))
+(define-public jpm
+ (package
+ (name "jpm")
+ (version "1.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/janet-lang/jpm.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "05rdxigmiy7vf93s16a8n2029lq33073jccz1rjl4iisxj6piw4l"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "configs/linux_config.janet"
+ (("/usr/local")
+ #$output)
+ (("\"cc\"")
+ (string-append "\""
+ (assoc-ref inputs "gcc-toolchain")
+ "/bin/gcc" "\""))
+ (("\"c++\"")
+ (string-append "\""
+ (assoc-ref inputs "gcc-toolchain")
+ "/bin/g++" "\""))
+ (("\"git\"")
+ (string-append "\""
+ #$git "/bin/git" "\""))
+ (("\"curl\"")
+ (string-append "\""
+ #$curl "/bin/curl" "\"")))
+ (substitute* "jpm/shutil.janet"
+ (("cp")
+ (string-append #$coreutils "/bin/cp")))
+ (setenv "PREFIX"
+ #$output)))
+ (replace 'install
+ (lambda _
+ (for-each (lambda (dir)
+ (mkdir-p (string-append #$output "/" dir)))
+ '("lib/janet/jpm" "share/man/man1"))
+ (invoke "janet" "bootstrap.janet"
+ "configs/linux_config.janet")
+ (wrap-program (string-append #$output "/bin/jpm")
+ `("JANET_HEADERPATH" ":" =
+ (,(string-append #$janet "/include/janet")))
+ `("JANET_LIBPATH" ":" =
+ (,(string-append #$janet "/lib")))))))))
+ (inputs (list bash-minimal janet))
+ (propagated-inputs (list janet
+ coreutils
+ git
+ curl
+ nss-certs
+ ;; Lazily resolve the gcc-toolchain to avoid
+ ;; a circular dependency.
+ (module-ref (resolve-interface '(gnu packages
+ commencement))
+ 'gcc-toolchain)))
+ (home-page "https://janet-lang.org/")
+ (synopsis "Janet Project Manager for the Janet programming language")
+ (description "JPM is the Janet Project Manager tool. It is for automating
+builds and downloading dependencies of Janet projects.")
+ (license license:expat)))
+
(define-public lisp-repl-core-dumper
(package
(name "lisp-repl-core-dumper")
base-commit: ebb715aabfc4e59ed14b964ac7fdd2a9f9f44526
--
2.45.2
- [bug#72925] [PATCH v8] gnu: add jpm package,
Omar Bassam <=