1 { lib, stdenv, fetchurl, validatePkgConfig }:
3 stdenv.mkDerivation rec {
7 url = "http://duktape.org/duktape-${version}.tar.xz";
8 sha256 = "sha256-kPjS+otVZ8aJmDDd7ywD88J5YLEayiIvoXqnrGE8KJA=";
11 # https://github.com/svaarala/duktape/issues/2464
14 nativeBuildInputs = [ validatePkgConfig ];
17 make -f Makefile.sharedlibrary
18 make -f Makefile.cmdline
23 install -m755 duk $out/bin/
24 install -d $out/lib/pkgconfig
25 install -d $out/include
26 make -f Makefile.sharedlibrary install INSTALL_PREFIX=$out
27 substituteAll ${./duktape.pc.in} $out/lib/pkgconfig/duktape.pc
30 enableParallelBuilding = true;
33 description = "An embeddable Javascript engine, with a focus on portability and compact footprint";
34 homepage = "https://duktape.org/";
35 downloadPage = "https://duktape.org/download.html";
36 license = licenses.mit;
37 maintainers = [ maintainers.fgaz ];
39 platforms = platforms.all;