about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/wasm-pack/default.nix
blob: d9ff6f673d8759c252475f85392d22b2a96d7496 (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
{ stdenv
, fetchFromGitHub
, rustPlatform
, pkgconfig
, openssl
, curl
, Security
}:

rustPlatform.buildRustPackage rec {
  name = "wasm-pack-${version}";
  version = "0.8.1";

  src = fetchFromGitHub {
    owner = "rustwasm";
    repo = "wasm-pack";
    rev = "v${version}";
    sha256 = "1z66m16n4r16zqmnv84a5jndr5x6mdqdq4b1wq929sablwqd2rl4";
  };

  cargoSha256 = "0hp68w5mvk725gzbmlgl8j6wa1dv2fydil7jvq0f09mzxxaqrwcs";

  nativeBuildInputs = [ pkgconfig ];

  buildInputs = [ openssl ]
    ++ stdenv.lib.optionals stdenv.isDarwin [ curl Security ];


  # Tests fetch external resources and build artifacts.
  # Disabled to work with sandboxing
  doCheck = false;

  meta = with stdenv.lib; {
    description = "A utility that builds rust-generated WebAssembly package";
    homepage = https://github.com/rustwasm/wasm-pack;
    license = with licenses; [ asl20 /* or */ mit ];
    maintainers = [ maintainers.dhkl ];
    platforms = platforms.all;
  };
}