nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 45 lines 1.2 kB view raw
1{ lib, stdenv 2, fetchFromGitHub 3, rustPlatform 4, pkg-config 5, libressl 6, curl 7, Security 8}: 9 10rustPlatform.buildRustPackage rec { 11 pname = "wasm-pack"; 12 version = "0.10.2"; 13 14 src = fetchFromGitHub { 15 owner = "rustwasm"; 16 repo = "wasm-pack"; 17 rev = "v${version}"; 18 sha256 = "sha256-nhO/SLeJTq2viDqsJCRNLbgjyDKRli3RWExUNzKT9ug="; 19 }; 20 21 cargoSha256 = "sha256-6qrCHpg92IRPsf/dK6xcLGX8BLmqox3vgLRqsV4ubsY="; 22 23 nativeBuildInputs = [ pkg-config ]; 24 25 buildInputs = [ 26 # LibreSSL works around segfault issues caused by OpenSSL being unable to 27 # gracefully exit while doing work. 28 # See: https://github.com/rustwasm/wasm-pack/issues/650 29 libressl 30 ] ++ lib.optionals stdenv.isDarwin [ curl Security ]; 31 32 # Needed to get openssl-sys to use pkg-config. 33 OPENSSL_NO_VENDOR = 1; 34 35 # Most tests rely on external resources and build artifacts. 36 # Disabling check here to work with build sandboxing. 37 doCheck = false; 38 39 meta = with lib; { 40 description = "A utility that builds rust-generated WebAssembly package"; 41 homepage = "https://github.com/rustwasm/wasm-pack"; 42 license = with licenses; [ asl20 /* or */ mit ]; 43 maintainers = [ maintainers.dhkl ]; 44 }; 45}