python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / ocaml-modules / ppx_tools / default.nix
blobcc525d1d1e95b3ac54c434b298fd35754a4c3491
1 { lib, stdenv, fetchFromGitHub, buildDunePackage, ocaml, findlib, cppo }:
3 let param =
4   let v6_6 = {
5     version = "6.6";
6     sha256 = "sha256-QhuaQ9346a3neoRM4GrOVzjR8fg9ysMZR1VzNgyIQtc=";
7     nativeBuildInputs = [cppo];
8     buildInputs = [cppo];
9   }; in
11   "4.02" = {
12     version = "5.0+4.02.0";
13     sha256 = "16drjk0qafjls8blng69qiv35a84wlafpk16grrg2i3x19p8dlj8"; };
14   "4.03" = {
15     version = "5.0+4.03.0";
16     sha256 = "061v1fl5z7z3ywi4ppryrlcywnvnqbsw83ppq72qmkc7ma4603jg"; };
17   "4.04" = {
18     version = "unstable-20161114";
19     rev = "49c08e2e4ea8fef88692cd1dcc1b38a9133f17ac";
20     sha256 = "0ywzfkf5brj33nwh49k9if8x8v433ral25f3nbklfc9vqr06zrfl"; };
21   "4.05" = {
22     version = "5.0+4.05.0";
23     sha256 = "1jvvhk6wnkvm7b9zph309ihsc0hyxfpahmxxrq19vx8c674jsdm4"; };
24   "4.06" = {
25     version = "5.1+4.06.0";
26     sha256 = "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"; };
27   "4.07" = {
28     version = "5.1+4.06.0";
29     sha256 = "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"; };
30   "4.08" = v6_6;
31   "4.09" = v6_6;
32   "4.10" = v6_6;
33   "4.11" = v6_6;
34   "4.12" = v6_6;
35   "4.13" = v6_6;
36   "4.14" = v6_6;
37 }.${ocaml.meta.branch};
40 let src = fetchFromGitHub {
41       owner = "alainfrisch";
42       repo = pname;
43       rev = param.rev or param.version;
44       inherit (param) sha256;
45     };
46     pname = "ppx_tools";
47     meta = with lib; {
48       description = "Tools for authors of ppx rewriters";
49       homepage = "https://www.lexifi.com/ppx_tools";
50       license = licenses.mit;
51       maintainers = with maintainers; [ vbgl ];
52     };
54 if lib.versionAtLeast param.version "6.0"
55 then
56   buildDunePackage {
57     inherit pname src meta;
58     inherit (param) version buildInputs nativeBuildInputs;
60     strictDeps = true;
61   }
62 else
63   stdenv.mkDerivation {
64     name = "ocaml${ocaml.version}-${pname}-${param.version}";
66     inherit src;
68     nativeBuildInputs = [ ocaml findlib ];
70     strictDeps = true;
72     createFindlibDestdir = true;
74     dontStrip = true;
76     meta = meta // { inherit (ocaml.meta) platforms; };
77   }