about summary refs log tree commit diff
path: root/pkgs/by-name/wa
diff options
context:
space:
mode:
authorJonas Heinrich2024-09-05 08:32:42 +0200
committerJonas Heinrich2024-09-05 08:34:13 +0200
commitef0d15f8d3f5f8c11ba4af0faddbf78d43383a41 (patch)
treebd37226889647837830a1b14c452856cef94881f /pkgs/by-name/wa
parent579b775ed887fb55b72e9043ca1ae5371a9f12cb (diff)
wasm-bingen-cli: 0.2.92 -> 0.2.93
Diffstat (limited to 'pkgs/by-name/wa')
-rw-r--r--pkgs/by-name/wa/wasm-bindgen-cli/package.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/by-name/wa/wasm-bindgen-cli/package.nix b/pkgs/by-name/wa/wasm-bindgen-cli/package.nix
new file mode 100644
index 000000000000..517b2813478f
--- /dev/null
+++ b/pkgs/by-name/wa/wasm-bindgen-cli/package.nix
@@ -0,0 +1,49 @@
+{
+  lib,
+  rustPlatform,
+  fetchCrate,
+  nix-update-script,
+  nodejs_latest,
+  pkg-config,
+  openssl,
+  stdenv,
+  curl,
+  darwin,
+  version ? "0.2.93",
+  hash ? "sha256-DDdu5mM3gneraM85pAepBXWn3TMofarVR4NbjMdz3r0=",
+  cargoHash ? "sha256-birrg+XABBHHKJxfTKAMSlmTVYLmnmqMDfRnmG6g/YQ=",
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "wasm-bindgen-cli";
+  inherit version hash cargoHash;
+
+  src = fetchCrate { inherit pname version hash; };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs =
+    [ openssl ]
+    ++ lib.optionals stdenv.isDarwin [
+      curl
+      darwin.apple_sdk.frameworks.Security
+    ];
+
+  nativeCheckInputs = [ nodejs_latest ];
+
+  # tests require it to be ran in the wasm-bindgen monorepo
+  doCheck = false;
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = {
+    homepage = "https://rustwasm.github.io/docs/wasm-bindgen/";
+    license = with lib.licenses; [
+      asl20 # or
+      mit
+    ];
+    description = "Facilitating high-level interactions between wasm modules and JavaScript";
+    maintainers = with lib.maintainers; [ rizary ];
+    mainProgram = "wasm-bindgen";
+  };
+}