nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 80 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 ocaml, 6 findlib, 7 ocamlbuild, 8 camlp4, 9 menhir, 10 menhirLib, 11 yojson, 12 ulex, 13 pprint, 14 fix, 15 functory, 16}: 17 18let 19 check-ocaml-version = lib.versionAtLeast (lib.getVersion ocaml); 20in 21 22assert check-ocaml-version "4"; 23 24stdenv.mkDerivation { 25 26 pname = "mezzo"; 27 version = "0.0.m8"; 28 29 src = fetchFromGitHub { 30 owner = "protz"; 31 repo = "mezzo"; 32 rev = "m8"; 33 sha256 = "0yck5r6di0935s3iy2mm9538jkf77ssr789qb06ms7sivd7g3ip6"; 34 }; 35 36 strictDeps = true; 37 38 nativeBuildInputs = [ 39 ocaml 40 findlib 41 ocamlbuild 42 camlp4 43 menhir 44 ]; 45 buildInputs = [ 46 yojson 47 menhirLib 48 ulex 49 pprint 50 fix 51 functory 52 ocamlbuild 53 ]; 54 55 # Sets warning 3 as non-fatal 56 prePatch = 57 lib.optionalString (check-ocaml-version "4.02") '' 58 substituteInPlace myocamlbuild.pre.ml \ 59 --replace '@1..3' '@1..2+3' 60 '' 61 # Compatibility with PPrint ≥ 20220103 62 + '' 63 substituteInPlace typing/Fact.ml --replace PPrintOCaml PPrint.OCaml 64 ''; 65 66 createFindlibDestdir = true; 67 68 postInstall = '' 69 mkdir $out/bin 70 cp mezzo $out/bin/ 71 ''; 72 73 meta = { 74 homepage = "http://protz.github.io/mezzo/"; 75 description = "Programming language in the ML tradition, which places strong emphasis on the control of aliasing and access to mutable memory"; 76 license = lib.licenses.gpl2; 77 broken = lib.versionAtLeast ocaml.version "4.06"; 78 platforms = ocaml.meta.platforms or [ ]; 79 }; 80}