about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/interpreters/wasmer/default.nix
blob: 60ce4d89f19cdd31cc5b86710c9b272b5ec91f5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ lib
, rustPlatform
, fetchFromGitHub
, cmake
, llvmPackages
, pkg-config
}:

rustPlatform.buildRustPackage rec {
  pname = "wasmer";
  version = "0.17.0";

  src = fetchFromGitHub {
    owner = "wasmerio";
    repo = pname;
    rev = version;
    sha256 = "05g4h0xkqd14wnmijiiwmhk6l909fjxr6a2zplrjfxk5bypdalpm";
    fetchSubmodules = true;
  };

  cargoSha256 = "1ssmgx9fjvkq7ycyzjanqmlm5b80akllq6qyv3mj0k5fvs659wcq";

  nativeBuildInputs = [ cmake pkg-config ];

  # Since wasmer 0.17 no backends are enabled by default. Backends are now detected
  # using the [makefile](https://github.com/wasmerio/wasmer/blob/master/Makefile).
  # Enabling cranelift as this used to be the old default. At least one backend is
  # needed for the run subcommand to work.
  cargoBuildFlags = [ "--features 'backend-cranelift'" ];

  LIBCLANG_PATH = "${llvmPackages.libclang}/lib";

  meta = with lib; {
    description = "The Universal WebAssembly Runtime";
    longDescription = ''
      Wasmer is a standalone WebAssembly runtime for running WebAssembly outside
      of the browser, supporting WASI and Emscripten. Wasmer can be used
      standalone (via the CLI) and embedded in different languages, running in
      x86 and ARM devices.
    '';
    homepage = "https://wasmer.io/";
    license = licenses.mit;
    maintainers = with maintainers; [ Br1ght0ne ];
  };
}