Unverified Commit 5b77c618 authored by Stig's avatar Stig Committed by GitHub
Browse files

rakudo: 2025.06 -> 2025.12 (#453309)

parents d7547a7e 81c6b1cd
Loading
Loading
Loading
Loading
+13 −25
Original line number Diff line number Diff line
{
  stdenv,
  fetchFromGitHub,
  perl,
  icu,
  zlib,
  gmp,
  lib,
  nqp,
  removeReferencesTo,
  perl,
  stdenv,
  versionCheckHook,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "rakudo";
  version = "2025.06.1";
  version = "2025.12";

  # nixpkgs-update: no auto update
  src = fetchFromGitHub {
    owner = "rakudo";
    repo = "rakudo";
    rev = version;
    hash = "sha256-cofiX6VHHeki8GQcMamDyPYoVMUKiuhKVz8Gh8L9qu0=";
    tag = finalAttrs.version;
    fetchSubmodules = true;
    hash = "sha256-rCLlLxFexk2fzuuSMrJjbwhgU+HgJNX6Ect6uCsuJmo=";
  };

  nativeBuildInputs = [ removeReferencesTo ];

  buildInputs = [
    icu
    zlib
    gmp
    perl
  ];
  configureScript = "perl ./Configure.pl";
  configureScript = "${lib.getExe perl} ./Configure.pl";
  configureFlags = [
    "--backends=moar"
    "--with-nqp=${nqp}/bin/nqp"
    "--with-nqp=${lib.getExe nqp}"
  ];

  disallowedReferences = [ stdenv.cc.cc ];
  postFixup = ''
    remove-references-to -t ${stdenv.cc.cc} "$(readlink -f $out/share/perl6/runtime/dynext/libperl6_ops_moar${stdenv.hostPlatform.extensions.sharedLibrary})"
  '';
  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];

  meta = {
    description = "Raku implementation on top of Moar virtual machine";
@@ -52,5 +39,6 @@ stdenv.mkDerivation rec {
      sgo
      prince213
    ];
    mainProgram = "rakudo";
  };
}
})
+27 −16
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  lib,
  perl,
  pkg-config,
  stdenv,
  versionCheckHook,
  zstd,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "moarvm";
  version = "2025.06";
  version = "2025.12";

  # nixpkgs-update: no auto update
  src = fetchFromGitHub {
    owner = "moarvm";
    repo = "moarvm";
    rev = version;
    hash = "sha256-QtJ8cLAbsFJ26wkfQCbIMVU1ArWlAXjsQ/RJbQ0wRNo=";
    owner = "MoarVM";
    repo = "MoarVM";
    tag = finalAttrs.version;
    fetchSubmodules = true;
    hash = "sha256-hftskJ+5p/XHahAJTG28ifWkExb8Z8u7J5CeoQooUYE=";
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ zstd ];

  postPatch = ''
    patchShebangs .
    substituteInPlace Configure.pl \
      --replace-fail 'my @check_tools = qw/ar cc ld/;' 'my @check_tools = ();'
  ''
  + lib.optionalString stdenv.hostPlatform.isDarwin ''
    substituteInPlace Configure.pl \
      --replace '`/usr/bin/arch`' '"${stdenv.hostPlatform.darwinArch}"' \
      --replace '/usr/bin/arch' "$(type -P true)" \
      --replace '/usr/' '/nope/'
      --replace-fail '`/usr/bin/arch`' '"${stdenv.hostPlatform.darwinArch}"' \
      --replace-fail '/usr/bin/arch' "$(type -P true)" \
      --replace-fail '/usr/' '/nope/'
    substituteInPlace 3rdparty/dyncall/configure \
      --replace '`sw_vers -productVersion`' '"11.0"'
      --replace-fail '`sw_vers -productVersion`' '"11.0"'
  '';

  buildInputs = [ perl ];
  doCheck = false; # MoarVM does not come with its own test suite
  configureScript = "${lib.getExe perl} ./Configure.pl";
  configureFlags = [
    "--pkgconfig=${lib.getExe pkg-config}"
  ];

  configureScript = "${perl}/bin/perl ./Configure.pl";
  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];

  meta = {
    description = "VM with adaptive optimization and JIT compilation, built for Rakudo";
@@ -47,4 +58,4 @@ stdenv.mkDerivation rec {
    mainProgram = "moar";
    platforms = lib.platforms.unix;
  };
}
})
+17 −18
Original line number Diff line number Diff line
{
  stdenv,
  fetchFromGitHub,
  perl,
  lib,
  moarvm,
  perl,
  stdenv,
  versionCheckHook,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "nqp";
  version = "2025.06.1";
  version = "2025.12";

  # nixpkgs-update: no auto update
  src = fetchFromGitHub {
    owner = "raku";
    owner = "Raku";
    repo = "nqp";
    rev = version;
    hash = "sha256-zM3JilRBbx2r8s+dj9Yn8m2SQfQFnn1bxOUiz3Q7FT8=";
    tag = finalAttrs.version;
    fetchSubmodules = true;
    hash = "sha256-Ofu6mf2Vx7a1OrqWLnVvgnChWHFK+cSr803VZY2TYC8=";
  };

  buildInputs = [ perl ];

  configureScript = "${perl}/bin/perl ./Configure.pl";
  configureScript = "${lib.getExe perl} ./Configure.pl";
  configureFlags = [
    "--backends=moar"
    "--with-moar=${lib.getExe moarvm}"
  ];

  # Fix for issue where nqp expects to find files from moarvm in the same output:
  # https://github.com/Raku/nqp/commit/e6e069507de135cc71f77524455fc6b03b765b2f
  #
  preBuild = ''
    share_dir="share/nqp/lib/MAST"
    mkdir -p $out/$share_dir
    ln -fs ${moarvm}/$share_dir/{Nodes,Ops}.nqp $out/$share_dir
  '';

  configureFlags = [
    "--backends=moar"
    "--with-moar=${moarvm}/bin/moar"
  ];

  doCheck = true;
  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];

  meta = {
    description = "Lightweight Raku-like environment for virtual machines";
@@ -49,5 +47,6 @@ stdenv.mkDerivation rec {
      sgo
      prince213
    ];
    mainProgram = "nqp";
  };
}
})