;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022 John Kehayias ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages haxe) #:use-module (gnu packages) #:use-module (gnu packages apr) #:use-module (gnu packages audio) #:use-module (gnu packages bdw-gc) #:use-module (gnu packages compression) #:use-module (gnu packages databases) #:use-module (gnu packages gl) #:use-module (gnu packages graphics) #:use-module (gnu packages gtk) #:use-module (gnu packages image) #:use-module (gnu packages libevent) #:use-module (gnu packages mp3) #:use-module (gnu packages ocaml) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages sdl) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) #:use-module (gnu packages web) #:use-module (gnu packages xiph) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system dune) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils)) (define-public neko (package (name "neko") (version "2.3.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/HaxeFoundation/neko") (commit (string-append "v" (string-map (lambda (x) (if (char=? x #\.) #\- x)) version))))) (file-name (git-file-name name version)) (sha256 (base32 "1xgw646pghsjjbzd8qlaq17vq96swlrazpivrvyrhdj36vb3sci3")))) (build-system cmake-bu2021-12-13tests: static-networking: Adjust to new style....* gnu/tests/networking.scm (run-static-networking-test)[test]: Remove 'mkdir', 'chdir', and 'exit' calls'. Add 'test-runner-current' call. Ludovic Courtès 2021-12-13Merge branch 'master' into core-updates-frozenLudovic Courtès 2021-12-12tests: Replace uses of deprecated 'static-networking-service'....* gnu/tests/ganeti.scm (%ganeti-os): Replace call to 'static-networking-service' by instantiating STATIC-NETWORKING-SERVICE-TYPE. * gnu/tests/networking.scm (%test-static-networking) (%openvswitch-os, %dhcpd-os): Likewise. Ludovic Courtès 2021-12-12services: static-networking: Change interface to mimic netlink....* gnu/services/base.scm (<static-networking>)[interface, ip, netmask] [gateway]: Remove. [addresses, links, routes]: New fields. [requirement]: Default to '(udev). (<network-address>, <network-link>, <network-route>): New record types. (ensure-no-separate-netmask, %ensure-no-separate-netmask): Remove. (ipv6-address?, cidr->netmask, ip+netmask->cidr) (network-set-up/hurd, network-tear-down/hurd) (network-set-up/linux, network-tear-down/linux) (static-networking->hurd-pfinet-options): New procedures. (static-networking-shepherd-service): New procedure. (static-networking-shepherd-services): Rewrite in terms of the above. (static-networking-service): Deprecate. Adjust to new 'static-networking' API. (%base-services): Likewise. * gnu/system/install.scm (%installation-services): Likewise. * gnu/system/hurd.scm (%base-services/hurd): Likewise, and separate 'loopback' from 'networking'. * gnu/build/hurd-boot.scm (set-hurd-device-translators): Remove "servers/socket/2". * gnu/tests/networking.scm (run-openvswitch-test)["networking has started on ovs0"]: Check for 'networking instead of 'networking-ovs0, which is no longer provided. * doc/guix.texi (Networking Setup): Document the new interface. Remove documentation of 'static-networking-service'. (Virtualization Services): Change Ganeti example to use the new interface. Ludovic Courtès 2021-12-12tests: openvswitch: Check whether ovs0 is up....* gnu/tests/networking.scm (run-openvswitch-test)["ovs0 is up"]: New test. Ludovic Courtès 2021-12-12tests: Add 'static-networking' test....* gnu/tests/networking.scm (run-static-networking-test): New procedure. (%test-static-networking): New variable. Ludovic Courtès 2021-12-10Merge remote-tracking branch 'signed/master' into core-updatesMathieu Othacehe (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 (define-public hashlink (package (name "hashlink") (version "1.12") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/HaxeFoundation/hashlink") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "0i5f1mxpgjcdirx60kxrw0r0y15qh3j16a6fj8mzkq3k7j2hc982")) (modules '((guix build utils))) (snippet '(begin ;; Remove bundled libraries (mainly used for Windows build). (delete-file-recursively "include") #t)))) (build-system gnu-build-system) (arguments ;; Looks like there are tests with CMake, but there is confusion if this ;; is a supported way to build on Linux. See, e.g. ;; https://github.com/HaxeFoundation/hashlink/issues/397. Also, the ;; CMake build requires running the library manager haxelib in the build ;; process for the tests, likely requiring network access. ;; TODO: Use cmake-build-system instead and enable tests? (list #:tests? #f #:make-flags ;; The built hdll libraries need help finding libhl.so. #~(list (string-append "LIBFLAGS=-Wl,-rpath=" #$output "/lib")) #:phases #~(modify-phases %standard-phases ;; Don't try to build the (removed) bundled libraries pcre, ;; minimp3, and mikktspace. Provide the approriate paths and ;; linking options. (add-after 'unpack 'use-system-libs (lambda _ (substitute* "Makefile" (("\\$\\{PCRE\\}") "") (("-lpthread") "-lpthread -lpcre16") (("include/minimp3") (string-append #$(this-package-input "minimp3") "/include")) (("include/mikktspace ") (string-append #$(this-package-input "mikktspace") "/include ")) (("include/mikktspace/mikktspace.o") "") (("-lpng") "-lpng -lmikktspace")))) (replace 'configure (lambda* _ (setenv "CC" #$(cc-for-target)) (setenv "PREFIX" #$output))) (replace 'build (lambda* (#:key make-flags parallel-build? #:allow-other-keys) (apply invoke "make" "-j" (if parallel-build? (number->string (parallel-job-count)) "1") make-flags)))))) (inputs (list glu haxe libjpeg-turbo libpng libuv libvorbis mbedtls-apache mikktspace minimp3 openal pcre sdl2 sqlite zlib)) (native-inputs (list pkg-config)) (home-page "https://hashlink.haxe.org/") (synopsis "Virtual machine for the Haxe language") (description "HashLink (HL) is a virtual machine for the Haxe language. It can run bytecode produced by the Haxe compiler, or converted to C by HL. The HashLink runtime includes the following features: @itemize @item Fully compatible with the Haxe specification @item Support file I/O, regular expressions, network, etc. @item Unicode strings by default @item Mark-and-not-sweep Garbage Collector @item x86 and x86-64 HL/C compilation @item x86 and x86-64 HL/JIT compilation @end itemize While the standard HL runtime provides support for Haxe standard library, HashLink also provides several libraries that can optionally be used to build HL-specific applications. This includes the FMT library for compression and image support and SDL for mouse, keyboard, and game controller support, OpenGL, and more.") (license license:expat)))