2021-12-30 13:39:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-05-24 13:37:59 +00:00
|
|
|
, fetchFromGitHub
|
2021-12-30 13:39:12 +00:00
|
|
|
, perl
|
|
|
|
, CoreServices
|
|
|
|
, ApplicationServices
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "moarvm";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "2024.06";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
# nixpkgs-update: no auto update
|
2023-05-24 13:37:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "moarvm";
|
|
|
|
repo = "moarvm";
|
|
|
|
rev = version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-y+xtJ4YbzPr1168tu+148Co7Ke/iC68aOQBwTINlp2Y=";
|
2023-05-24 13:37:59 +00:00
|
|
|
fetchSubmodules = true;
|
2021-12-30 13:39:12 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
2024-09-26 11:04:55 +00:00
|
|
|
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
2021-12-06 16:07:01 +00:00
|
|
|
substituteInPlace Configure.pl \
|
|
|
|
--replace '`/usr/bin/arch`' '"${stdenv.hostPlatform.darwinArch}"' \
|
|
|
|
--replace '/usr/bin/arch' "$(type -P true)" \
|
|
|
|
--replace '/usr/' '/nope/'
|
|
|
|
substituteInPlace 3rdparty/dyncall/configure \
|
2024-02-07 01:22:34 +00:00
|
|
|
--replace '`sw_vers -productVersion`' '"11.0"'
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = [ perl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ApplicationServices ];
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false; # MoarVM does not come with its own test suite
|
|
|
|
|
|
|
|
configureScript = "${perl}/bin/perl ./Configure.pl";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "VM with adaptive optimization and JIT compilation, built for Rakudo";
|
2021-12-30 13:39:12 +00:00
|
|
|
homepage = "https://moarvm.org";
|
|
|
|
license = licenses.artistic2;
|
2024-07-27 06:49:29 +00:00
|
|
|
maintainers = with maintainers; [ thoughtpolice sgo ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "moar";
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|