1 { lib, stdenv, fetchurl }:
3 stdenv.mkDerivation rec {
7 url = "http://duktape.org/duktape-${version}.tar.xz";
8 sha256 = "19szwxzvl2g65fw95ggvb8h0ma5bd9vvnnccn59hwnc4dida1x4n";
12 substituteInPlace Makefile.sharedlibrary \
13 --replace 'gcc' '${stdenv.cc.targetPrefix}cc' \
14 --replace 'g++' '${stdenv.cc.targetPrefix}c++'
15 substituteInPlace Makefile.cmdline \
16 --replace 'gcc' '${stdenv.cc.targetPrefix}cc' \
17 --replace 'g++' '${stdenv.cc.targetPrefix}c++'
20 make -f Makefile.sharedlibrary
21 make -f Makefile.cmdline
25 install -m755 duk $out/bin/
27 install -d $out/include
28 make -f Makefile.sharedlibrary install INSTALL_PREFIX=$out
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 ];
38 platforms = platforms.all;