nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 60 lines 1.4 kB view raw
1{ 2 lib, 3 fetchurl, 4 ocaml, 5 buildDunePackage, 6 cmdliner, 7 yojson, 8 ppxlib, 9 findlib, 10 menhir, 11 menhirLib, 12 sedlex, 13 version ? 14 if lib.versionAtLeast ocaml.version "4.13" then 15 "6.2.0" 16 else if lib.versionAtLeast ocaml.version "4.11" then 17 "6.0.1" 18 else 19 "5.8.2", 20}: 21 22buildDunePackage { 23 pname = "js_of_ocaml-compiler"; 24 inherit version; 25 minimalOCamlVersion = "4.08"; 26 27 src = fetchurl { 28 url = "https://github.com/ocsigen/js_of_ocaml/releases/download/${version}/js_of_ocaml-${version}.tbz"; 29 hash = 30 { 31 "6.2.0" = "sha256-fMZBd40bFyo1KogzPuDoxiE2WgrPzZuH44v9243Spdo="; 32 "6.1.1" = "sha256-0x2kGq5hwCqqi01QTk6TcFIz0wPNgaB7tKxe7bA9YBQ="; 33 "6.0.1" = "sha256-gT2+4rYuFUEEnqI6IOQFzyROJ+v6mFl4XPpT4obSxhQ="; 34 "5.9.1" = "sha256-aMlcYIcdjpyaVMgvNeLtUEE7y0QPIg0LNRayoe4ccwc="; 35 "5.8.2" = "sha256-ciAZS9L5sU2VgVOlogZ1A1nXtJ3hL+iNdFDThc7L8Eo="; 36 } 37 ."${version}"; 38 }; 39 40 nativeBuildInputs = [ menhir ]; 41 buildInputs = [ 42 cmdliner 43 ppxlib 44 ]; 45 46 propagatedBuildInputs = [ 47 menhirLib 48 yojson 49 findlib 50 sedlex 51 ]; 52 53 meta = { 54 description = "Compiler from OCaml bytecode to Javascript"; 55 homepage = "https://ocsigen.org/js_of_ocaml/"; 56 license = lib.licenses.gpl2; 57 maintainers = [ lib.maintainers.vbgl ]; 58 mainProgram = "js_of_ocaml"; 59 }; 60}