nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 menhir,
6 odoc,
7 buildDunePackage,
8}:
9buildDunePackage rec {
10 pname = "wasm";
11 version = "2.0.2";
12
13 minimalOCamlVersion = "4.12";
14
15 src = fetchFromGitHub {
16 owner = "WebAssembly";
17 repo = "spec";
18 tag = "opam-${version}";
19 hash = "sha256-RbVGW6laC3trP6IhtA2tLrAYVbx0Oucox9FgoEvs6LQ=";
20 };
21
22 postUnpack = ''
23 cd "$sourceRoot/interpreter"
24 export sourceRoot=$PWD
25 '';
26
27 nativeBuildInputs = [
28 menhir
29 odoc
30 ];
31
32 meta = {
33 description = "Library to read and write WebAssembly (Wasm) files and manipulate their AST";
34 mainProgram = "wasm";
35 license = lib.licenses.asl20;
36 maintainers = [ lib.maintainers.vbgl ];
37 homepage = "https://github.com/WebAssembly/spec/tree/main/interpreter";
38 };
39}