2019-04-01 02:48:12 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, pkgconfig
|
|
|
|
, openssl
|
2019-08-08 03:52:01 +01:00
|
|
|
, curl
|
|
|
|
, Security
|
2019-04-01 02:48:12 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "wasm-pack";
|
2019-04-01 02:48:12 +01:00
|
|
|
version = "0.8.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rustwasm";
|
|
|
|
repo = "wasm-pack";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1z66m16n4r16zqmnv84a5jndr5x6mdqdq4b1wq929sablwqd2rl4";
|
|
|
|
};
|
|
|
|
|
2019-05-03 21:04:37 +01:00
|
|
|
cargoSha256 = "0hp68w5mvk725gzbmlgl8j6wa1dv2fydil7jvq0f09mzxxaqrwcs";
|
2019-04-01 02:48:12 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
2019-08-08 03:52:01 +01:00
|
|
|
buildInputs = [ openssl ]
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ curl Security ];
|
|
|
|
|
2019-04-01 02:48:12 +01:00
|
|
|
|
|
|
|
# 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;
|
|
|
|
};
|
|
|
|
}
|