fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild }:
2
3if lib.versionOlder ocaml.version "4.08"
4then throw "wasm is not available for OCaml ${ocaml.version}"
5else
6
7stdenv.mkDerivation rec {
8 pname = "ocaml${ocaml.version}-wasm";
9 version = "2.0.1";
10
11 src = fetchFromGitHub {
12 owner = "WebAssembly";
13 repo = "spec";
14 rev = "opam-${version}";
15 hash = "sha256-5eo8MIui2GxRS5X9az0NlLGZfxi5KGsTI/EaP6m/zts=";
16 };
17
18 nativeBuildInputs = [ ocaml findlib ocamlbuild ];
19 strictDeps = true;
20
21 # x86_64-unknown-linux-musl-ld: -r and -pie may not be used together
22 hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
23
24 makeFlags = [ "-C" "interpreter" ];
25
26 createFindlibDestdir = true;
27
28 postInstall = ''
29 mkdir $out/bin
30 cp -L interpreter/wasm $out/bin
31 '';
32
33 meta = {
34 description = "An executable and OCaml library to run, read and write Web Assembly (wasm) files and manipulate their AST";
35 mainProgram = "wasm";
36 license = lib.licenses.asl20;
37 maintainers = [ lib.maintainers.vbgl ];
38 homepage = "https://github.com/WebAssembly/spec/tree/master/interpreter";
39 inherit (ocaml.meta) platforms;
40 };
41}