Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
75 lines
1.3 KiB
Nix
75 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
cmake,
|
|
fetchFromGitHub,
|
|
stdenv,
|
|
testers,
|
|
texinfo,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "quickjs-ng";
|
|
version = "0.10.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "quickjs-ng";
|
|
repo = "quickjs";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-WtjHyqxibP6bAO9HsXuqAW/Y1qgt/Tpj401CIk4bY7o=";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"bin"
|
|
"dev"
|
|
"doc"
|
|
"info"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
texinfo
|
|
];
|
|
|
|
cmakeFlags = [
|
|
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
|
|
(lib.cmakeBool "BUILD_STATIC_QJS_EXE" stdenv.hostPlatform.isStatic)
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString (
|
|
lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
|
|
"-Wno-error=stringop-overflow"
|
|
]
|
|
);
|
|
|
|
strictDeps = true;
|
|
|
|
postBuild = ''
|
|
pushd ../docs
|
|
makeinfo *texi
|
|
popd
|
|
'';
|
|
|
|
postInstall = ''
|
|
pushd ../docs
|
|
install -Dm644 -t ''${!outputInfo}/share/info *info
|
|
popd
|
|
'';
|
|
|
|
passthru.tests = {
|
|
version = testers.testVersion {
|
|
package = finalAttrs.finalPackage;
|
|
command = "qjs --help || true";
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://github.com/quickjs-ng/quickjs";
|
|
description = "Mighty JavaScript engine";
|
|
license = lib.licenses.mit;
|
|
mainProgram = "qjs";
|
|
maintainers = [ ];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
})
|