about summary refs log tree commit diff
path: root/pkgs/development/tools/wizer/default.nix
blob: f79c96f54518480697562f571f9ec01636281308 (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
{ lib, stdenv, rustPlatform, fetchCrate }:

rustPlatform.buildRustPackage rec {
  pname = "wizer";
  version = "1.4.0";

  src = fetchCrate {
    inherit pname version;

    sha256 = "sha256-3Hc3KKqtbZtvD+3lb/W7+AyrwPukJyxpUe94KGQlzBI=";
  };

  cargoSha256 = "sha256-zv36/W7dNpIupYn8TS+NaF7uX+BVjrI6AW6Hrlqr8Xg=";

  cargoBuildFlags = [ "--bin" pname ];

  buildFeatures = [ "env_logger" "structopt" ];

  # Setting $HOME to a temporary directory is necessary to prevent checks from failing, as
  # the test suite creates a cache directory at $HOME/Library/Caches/BytecodeAlliance.wasmtime.
  preCheck = ''
    export HOME=$(mktemp -d)
  '';

  meta = with lib; {
    description = "The WebAssembly pre-initializer";
    homepage = "https://github.com/bytecodealliance/wizer";
    license = licenses.asl20;
    maintainers = with maintainers; [ lucperkins ];
    broken = stdenv.isx86_64 && stdenv.isDarwin;
  };
}