Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haxe: 4.3.4 -> 4.3.5 #332277

Merged
merged 2 commits into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 73 additions & 36 deletions pkgs/development/compilers/haxe/default.nix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Can we move this to pkgs/by-name/ha? They changed the repo structure a while back and are gradually migrating everything. I'm not sure if this needs to be a separate PR/Commit, so let's wait for someone else to weigh in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can migrate it in a second commit or wait for this to be automatically done at some point in the future (#211832).

Copy link
Member Author

@bwkam bwkam Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's really important, I can move it. But, I prefer the latter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it's not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then LGTM

Original file line number Diff line number Diff line change
@@ -1,44 +1,69 @@
{ lib, stdenv, fetchFromGitHub, coreutils, ocaml-ng, zlib, pcre, pcre2, neko, mbedtls_2, Security }:

{
lib,
stdenv,
fetchFromGitHub,
coreutils,
ocaml-ng,
zlib,
pcre,
pcre2,
neko,
mbedtls_2,
Security,
}:
let
ocamlDependencies = version:
if lib.versionAtLeast version "4.3"
then with ocaml-ng.ocamlPackages_4_14; [
ocaml
findlib
sedlex
xml-light
ptmap
camlp5
sha
dune_3
luv
extlib
] else with ocaml-ng.ocamlPackages_4_10; [
ocaml
findlib
sedlex
xml-light
ptmap
camlp5
sha
dune_3
luv
extlib-1-7-7
];
ocamlDependencies =
version:
if lib.versionAtLeast version "4.3" then
with ocaml-ng.ocamlPackages_4_14;
[
ocaml
findlib
sedlex
xml-light
ptmap
camlp5
sha
dune_3
luv
extlib
]
else
with ocaml-ng.ocamlPackages_4_10;
[
ocaml
findlib
sedlex
xml-light
ptmap
camlp5
sha
dune_3
luv
extlib-1-7-7
];

defaultPatch = ''
substituteInPlace extra/haxelib_src/src/haxelib/client/Main.hx \
--replace '"neko"' '"${neko}/bin/neko"'
'';

generic = { hash, version, prePatch ? defaultPatch }:
generic =
{
hash,
version,
prePatch ? defaultPatch,
}:
stdenv.mkDerivation {
pname = "haxe";
inherit version;

buildInputs = [ zlib neko ]
++ (if lib.versionAtLeast version "4.3" then [pcre2] else [pcre])
buildInputs =
[
zlib
neko
]
++ (if lib.versionAtLeast version "4.3" then [ pcre2 ] else [ pcre ])
++ lib.optional (lib.versionAtLeast version "4.1") mbedtls_2
++ lib.optional (lib.versionAtLeast version "4.1" && stdenv.isDarwin) Security
++ ocamlDependencies version;
Expand All @@ -53,7 +78,10 @@ let

inherit prePatch;

buildFlags = [ "all" "tools" ];
buildFlags = [
"all"
"tools"
];

installPhase = ''
install -vd "$out/bin" "$out/lib/haxe/std"
Expand Down Expand Up @@ -111,12 +139,21 @@ let
meta = with lib; {
description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
homepage = "https://haxe.org";
license = with licenses; [ gpl2Plus mit ]; # based on upstream opam file
maintainers = [ maintainers.marcweber maintainers.locallycompact maintainers.logo ];
license = with licenses; [
gpl2Plus
mit
]; # based on upstream opam file
maintainers = [
maintainers.marcweber
maintainers.locallycompact
maintainers.logo
maintainers.bwkam
];
platforms = platforms.linux ++ platforms.darwin;
};
};
in {
in
{
haxe_4_0 = generic {
version = "4.0.5";
hash = "sha256-Ck/py+tZS7dBu/uikhSLKBRNljpg2h5PARX0Btklozg=";
Expand All @@ -126,7 +163,7 @@ in {
hash = "sha256-QP5/jwexQXai1A5Iiwiyrm+/vkdAc+9NVGt+jEQz2mY=";
};
haxe_4_3 = generic {
version = "4.3.4";
hash = "sha256-XGV4VG8nUofHGjHbtrLA+2kIpnnPqw5IlcNrP3EsL+Q=";
version = "4.3.5";
hash = "sha256-vms7FoOL8cDPorHd/EJq8HEHGRX1JfL8EZmDtxW9lOw=";
};
}
Loading