Skip to content

Instantly share code, notes, and snippets.

@ThisGuyCodes
Created January 24, 2022 06:36
Show Gist options
  • Save ThisGuyCodes/a77a240e09933fb05c7a0815b6b0cffe to your computer and use it in GitHub Desktop.
Save ThisGuyCodes/a77a240e09933fb05c7a0815b6b0cffe to your computer and use it in GitHub Desktop.
golang forced cross compiling for wasm
{ pkgs ? import <nixpkgs> {} }:
let
buildGoWasm = pkgs.buildGo117Module.override {
go = pkgs.go_1_17.overrideAttrs (_: {
GOOS = "js";
GOARCH = "wasm";
});
};
in
buildGoWasm rec {
pname = "bull";
version = "0.1.0";
src = ./.;
vendorSha256 = "sha256-dBP3Ov4zscRHy2Qib0vo9SSO8yBETrbDUG8lkKtEJ2c=";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment