blob: 0698070342ba640711779d65c7ab7099e6775713 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
{
fetchFromGitHub,
lib,
moarvm,
perl,
stdenv,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nqp";
version = "2026.07";
# nixpkgs-update: no auto update
src = fetchFromGitHub {
owner = "Raku";
repo = "nqp";
tag = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-Uw6oOqMKf36iVANC0wjG75ry/L9iNNyvGu3+pOAM+z8=";
};
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
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
meta = {
description = "Lightweight Raku-like environment for virtual machines";
homepage = "https://github.com/Raku/nqp";
license = lib.licenses.artistic2;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
thoughtpolice
sgo
prince213
];
mainProgram = "nqp";
};
})
|