From patchwork Thu Jul 28 04:11:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 41029 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 9023327BBEB; Thu, 28 Jul 2022 05:12:54 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,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 920E527BBEA for ; Thu, 28 Jul 2022 05:12:53 +0100 (BST) Received: from localhost ([::1]:43466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGutI-0002Wx-PE for patchwork@mira.cbaines.net; Thu, 28 Jul 2022 00:12:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGusV-0002Vz-1X for guix-patches@gnu.org; Thu, 28 Jul 2022 00:12:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39356) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGusU-0002BM-DK for guix-patches@gnu.org; Thu, 28 Jul 2022 00:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGusU-0005h4-9W for guix-patches@gnu.org; Thu, 28 Jul 2022 00:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56806] [PATCH 8/9] gnu: Add haxe. References: <9PX8REXHYFolHkT-TXF_SZcRFDEe1-1KwK9riBoz1tnsKV2raznmLO3YTlzbpdyJ9dBOqnpcaUomHmLfOWjytFrkLEvIW_upqCAA_-byN50=@protonmail.com> In-Reply-To: <9PX8REXHYFolHkT-TXF_SZcRFDEe1-1KwK9riBoz1tnsKV2raznmLO3YTlzbpdyJ9dBOqnpcaUomHmLfOWjytFrkLEvIW_upqCAA_-byN50=@protonmail.com> Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Jul 2022 04:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "56806@debbugs.gnu.org" <56806@debbugs.gnu.org> Received: via spool by 56806-submit@debbugs.gnu.org id=B56806.165898149621823 (code B ref 56806); Thu, 28 Jul 2022 04:12:02 +0000 Received: (at 56806) by debbugs.gnu.org; 28 Jul 2022 04:11:36 +0000 Received: from localhost ([127.0.0.1]:57333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGus3-0005fv-Jw for submit@debbugs.gnu.org; Thu, 28 Jul 2022 00:11:36 -0400 Received: from mail-4316.protonmail.ch ([185.70.43.16]:42641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGus1-0005ff-J8 for 56806@debbugs.gnu.org; Thu, 28 Jul 2022 00:11:34 -0400 Date: Thu, 28 Jul 2022 04:11:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658981487; x=1659240687; bh=No8bdNJVg0Vhaxszk+7P9wBnHYX8XWLBMxtGhZD4UuQ=; h=Date:To:From:Reply-To:Subject:Message-ID:Feedback-ID:From:To:Cc: Date:Subject:Reply-To:Feedback-ID:Message-ID; b=kk4e7pVURu6G4HnWRwMQ08oKhsqtvQDXqklK4Tir3PVS6MMhCJGZh6hnr8f3OG4s2 dz2c5mEt/MAih6ovwu5ORBpZIHtXhIVRRaYecG+i2hzL/0VNNVlisaWv5MCbtYVciL pm+xcwJZ848RlZcrprxha1Asf6EtmliEKSAe3gih8jjDQGmTEkeMtfLYZsbNTlpns/ PcIKKB2ZZi1fJQYY4HwDj08dFuhHWkMwq4Yu3bepY/oPy1Mjs/ilcsqHEnznIRoKk0 iNiJbm83TlJaYyIQG17qzaP+zJSqcqleC4gpsbOURny8ts9cRdrLMlBNWqBGbuzOCr jzets4CWMCwRQ== Message-ID: Feedback-ID: 7805494:user:proton MIME-Version: 1.0 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias X-getmail-retrieved-from-mailbox: Patches Empty Message From 0f26e1d05ffa9c108e026cc68dfeef25ec76a239 Mon Sep 17 00:00:00 2001 From: John Kehayias 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