about summary refs log tree commit diff
path: root/pkgs/by-name/qu/quickjs-ng/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/qu/quickjs-ng/package.nix')
-rw-r--r--pkgs/by-name/qu/quickjs-ng/package.nix59
1 files changed, 38 insertions, 21 deletions
diff --git a/pkgs/by-name/qu/quickjs-ng/package.nix b/pkgs/by-name/qu/quickjs-ng/package.nix
index 35a71244cab6..92c0aaa57b52 100644
--- a/pkgs/by-name/qu/quickjs-ng/package.nix
+++ b/pkgs/by-name/qu/quickjs-ng/package.nix
@@ -1,23 +1,30 @@
-{ lib
-, stdenv
-, cmake
-, fetchFromGitHub
-, testers
-, texinfo
+{
+  lib,
+  cmake,
+  fetchFromGitHub,
+  stdenv,
+  testers,
+  texinfo,
 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "quickjs-ng";
-  version = "0.5.0";
+  version = "0.6.1";
 
   src = fetchFromGitHub {
     owner = "quickjs-ng";
     repo = "quickjs";
     rev = "v${finalAttrs.version}";
-    hash = "sha256-4CC7IxA5t+L99H4Rvkx0xkXFHuqNP3HTmS46JEuy7Vs=";
+    hash = "sha256-7IAkmlzgiPVd8yRv7LU5a7HWCB+eQk1Ur1KwZupwty0=";
   };
 
-  outputs = [ "bin" "out" "dev" "doc" "info" ];
+  outputs = [
+    "out"
+    "bin"
+    "dev"
+    "doc"
+    "info"
+  ];
 
   nativeBuildInputs = [
     cmake
@@ -25,18 +32,28 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   cmakeFlags = [
-    "-DBUILD_SHARED_LIBS=ON"
+    (lib.cmakeBool "BUILD_SHARED_LIBS" true)
     (lib.cmakeBool "BUILD_STATIC_QJS_EXE" stdenv.hostPlatform.isStatic)
   ];
 
-  env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
-    "-Wno-error=stringop-overflow"
-  ]);
+  env.NIX_CFLAGS_COMPILE = toString (
+    lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
+      "-Wno-error=stringop-overflow"
+    ]
+  );
+
+  strictDeps = true;
+
+  postBuild = ''
+    pushd ../doc
+    makeinfo *texi
+    popd
+  '';
 
   postInstall = ''
-    (cd ../doc
-     makeinfo --output quickjs.info quickjs.texi
-     install -Dt $info/share/info/ quickjs.info)
+    pushd ../doc
+    install -Dm644 -t ''${!outputInfo}/share/info *info
+    popd
   '';
 
   passthru.tests = {
@@ -46,12 +63,12 @@ stdenv.mkDerivation (finalAttrs: {
     };
   };
 
-  meta = with lib; {
-    description = "Mighty JavaScript engine";
+  meta = {
     homepage = "https://github.com/quickjs-ng/quickjs";
-    license = licenses.mit;
-    maintainers = [ ];
-    platforms = platforms.all;
+    description = "Mighty JavaScript engine";
+    license = lib.licenses.mit;
     mainProgram = "qjs";
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = lib.platforms.all;
   };
 })