2023-05-24 13:37:59 +00:00
|
|
|
{ stdenv, fetchFromGitHub, perl, lib, moarvm }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nqp";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "2023.06";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "raku";
|
|
|
|
repo = "nqp";
|
|
|
|
rev = version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-VfSVNEBRW6Iz3qUeICFXu3pp92NGgAkOrThXF8a/82A=";
|
2023-05-24 13:37:59 +00:00
|
|
|
fetchSubmodules = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ perl ];
|
|
|
|
|
|
|
|
configureScript = "${perl}/bin/perl ./Configure.pl";
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--backends=moar"
|
|
|
|
"--with-moar=${moarvm}/bin/moar"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Not Quite Perl -- a lightweight Raku-like environment for virtual machines";
|
2021-12-30 13:39:12 +00:00
|
|
|
homepage = "https://github.com/Raku/nqp";
|
|
|
|
license = licenses.artistic2;
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ thoughtpolice vrthra sgo ];
|
|
|
|
};
|
|
|
|
}
|