blob: 305a4e666c423a18ed188b879658344fb31e4804 (
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
46
|
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
darwin,
cmake,
pkg-config,
zstd,
}:
rustPlatform.buildRustPackage rec {
pname = "wasm-pack";
version = "0.13.0";
src = fetchFromGitHub {
owner = "rustwasm";
repo = "wasm-pack";
rev = "refs/tags/v${version}";
hash = "sha256-NEujk4ZPQ2xHWBCVjBCD7H6f58P4KrwCNoDHKa0d5JE=";
};
cargoHash = "sha256-pFKGQcWW1/GaIIWMyWBzts4w1hMu27hTG/uUMjkfDMo=";
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security ++ [ zstd ];
# Most tests rely on external resources and build artifacts.
# Disabling check here to work with build sandboxing.
doCheck = false;
meta = with lib; {
description = "Utility that builds rust-generated WebAssembly package";
mainProgram = "wasm-pack";
homepage = "https://github.com/rustwasm/wasm-pack";
license = with licenses; [
asl20 # or
mit
];
maintainers = [ maintainers.dhkl ];
};
}
|