python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / interpreters / duktape / default.nix
blobc296d013e3d1486b2786814b7e363f57ad3ffe92
1 { lib, stdenv, fetchurl, validatePkgConfig }:
3 stdenv.mkDerivation rec {
4   pname = "duktape";
5   version = "2.7.0";
6   src = fetchurl {
7     url = "http://duktape.org/duktape-${version}.tar.xz";
8     sha256 = "sha256-kPjS+otVZ8aJmDDd7ywD88J5YLEayiIvoXqnrGE8KJA=";
9   };
11   # https://github.com/svaarala/duktape/issues/2464
12   LDFLAGS = [ "-lm" ];
14   nativeBuildInputs = [ validatePkgConfig ];
16   buildPhase = ''
17     make -f Makefile.sharedlibrary
18     make -f Makefile.cmdline
19   '';
21   installPhase = ''
22     install -d $out/bin
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
28   '';
30   enableParallelBuilding = true;
32   meta = with lib; {
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     mainProgram = "duk";
39     platforms = platforms.all;
40   };