unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: John Kehayias via Guix-patches via <guix-patches@gnu.org>
To: "56806@debbugs.gnu.org" <56806@debbugs.gnu.org>
Subject: [bug#56806] [PATCH 8/9] gnu: Add haxe.
Date: Thu, 28 Jul 2022 04:11:23 +0000	[thread overview]
Message-ID: <oLQQNxDCp_ElslhdzjxXn1hXKwKrIds1udg7TExbM2rFbMTObjVkVS2mQY_7_wbcK-3r_3AO-wrlEbX9ekCeLpHb2htf1fY4UJaJKAL8RSs=@protonmail.com> (raw)
In-Reply-To: <9PX8REXHYFolHkT-TXF_SZcRFDEe1-1KwK9riBoz1tnsKV2raznmLO3YTlzbpdyJ9dBOqnpcaUomHmLfOWjytFrkLEvIW_upqCAA_-byN50=@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 13 bytes --]

Empty Message

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0008-gnu-Add-haxe.patch --]
[-- Type: text/x-patch; name=0008-gnu-Add-haxe.patch, Size: 4182 bytes --]

From 0f26e1d05ffa9c108e026cc68dfeef25ec76a239 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Wed, 27 Jul 2022 23:43:32 -0400
Subject: [PATCH 8/9] gnu: Add haxe.

* gnu/packages/haxe.scm (haxelib-src): New variable.
(haxe): New variable.
---
 gnu/packages/haxe.scm | 84 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

diff --git a/gnu/packages/haxe.scm b/gnu/packages/haxe.scm
index 6d8d9caca1..95de4c5e4b 100644
--- a/gnu/packages/haxe.scm
+++ b/gnu/packages/haxe.scm
@@ -105,3 +105,87 @@ (define-public neko
 the VM, or as a Neko library to perform compile-and-run funtions for
 interactive languages.")
     (license license:expat)))
+
+(define haxelib-src
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+          (url "https://github.com/HaxeFoundation/haxelib")
+          ;; This should match the haxelib submodule in haxe.
+          (commit "4b27f91d8a4ff279d9903091680fee2c93a0d574")
+          ;; This repo includes some Haxe libs as well.
+          (recursive? #t)))
+    (sha256
+     (base32
+      "0mwrm6gxgclwziiprfiswmjbz6z3dnvdwl8gq3gaym18pvx4p3ny"))))
+
+(define-public haxe
+  (package
+    (name "haxe")
+    (version "4.2.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/HaxeFoundation/haxe")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0pl8vpyb7gl2yqjg85yc4zxq9c3ipvw4yrrpliaxs25ynrj3l51n"))))
+    (build-system dune-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               ;; Needs the haxelib sources for haxelib client
+               (add-after 'unpack 'copy-haxelib-src
+                 (lambda _
+                   (copy-recursively #$haxelib-src
+                                     "extra/haxelib_src")))
+               ;; Change the default directory for the haxelib package
+               ;; manager to be something writeable for a user.
+               (add-after 'copy-haxelib-src 'change-default-dir
+                 (lambda _
+                   (substitute* "extra/haxelib_src/src/haxelib/client/Main.hx"
+                     (("'/usr/lib/haxe/\\$REPNAME'")
+                      "Path.addTrailingSlash( getHomePath() ) + '.haxe/$REPNAME'"))))
+               (add-after 'unpack 'prefix
+                 (lambda _
+                   (substitute* "Makefile"
+                     (("/usr/local")
+                      (string-append #$output)))))
+               ;; Haxe uses a straight forward make, dune runtest, and make
+               ;; install process.
+               (replace 'build
+                 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
+                   (invoke "make" "-j" (if parallel-build?
+                                           (number->string (parallel-job-count))
+                                           "1"))))
+               (replace 'check
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     (invoke "dune" "runtest"))))
+               (replace 'install
+                 (lambda _
+                   (invoke "make" "install"))))))
+    (inputs (list libuv
+                  mbedtls-apache
+                  neko
+                  ocaml-extlib
+                  ocaml-luv
+                  ocaml-ptmap
+                  ocaml-sedlex
+                  ocaml-sha
+                  ocaml-xml-light
+                  pcre
+                  zlib))
+    (native-inputs (list ocaml-findlib camlp5))
+    (home-page "https://haxe.org/")
+    (synopsis "Multi-target universal programming language")
+    (description
+     "Haxe is a toolkit based on a modern, high level, static-typed
+programming language, a cross-compiler, a complete cross-platform standard
+library and ways to access each platform's native capabilities.  This package
+includes the compiler and library manager.")
+    (license (list license:gpl2+     ; the compiler itself
+                   license:expat)))) ; the standard library
+
-- 
2.37.1


  parent reply	other threads:[~2022-07-28  4:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28  4:06 [bug#56806] [PATCH 0/9] Add the Haxe language and tools John Kehayias via Guix-patches via
2022-07-28  4:08 ` [bug#56806] [PATCH 1/9] gnu: Add ocaml-luv John Kehayias via Guix-patches via
2022-07-28  4:09 ` [bug#56806] [PATCH 2/9] gnu: Add ocaml-ptmap John Kehayias via Guix-patches via
2022-07-28  4:09 ` [bug#56806] [PATCH 3/9] gnu: Add ocaml-sha John Kehayias via Guix-patches via
2022-07-28  4:10 ` [bug#56806] [PATCH 4/9] gnu: Add ocaml-xml-light John Kehayias via Guix-patches via
2022-07-28  4:10 ` [bug#56806] [PATCH 5/9] gnu: Add mikktspace John Kehayias via Guix-patches via
2022-07-28  4:10 ` [bug#56806] [PATCH 6/9] gnu: Add minimp3 John Kehayias via Guix-patches via
2022-07-28  4:10 ` [bug#56806] [PATCH 7/9] gnu: Add neko John Kehayias via Guix-patches via
2022-07-28  4:11 ` John Kehayias via Guix-patches via [this message]
2022-07-28  4:11 ` [bug#56806] [PATCH 9/9] gnu: Add hashlink John Kehayias via Guix-patches via
2022-08-03  6:53 ` bug#56806: [PATCH 0/9] Add the Haxe language and tools 宋文武 via Guix-patches via
2022-08-03 18:04   ` [bug#56806] " John Kehayias via Guix-patches via

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='oLQQNxDCp_ElslhdzjxXn1hXKwKrIds1udg7TExbM2rFbMTObjVkVS2mQY_7_wbcK-3r_3AO-wrlEbX9ekCeLpHb2htf1fY4UJaJKAL8RSs=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=56806@debbugs.gnu.org \
    --cc=john.kehayias@protonmail.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).