{ inputs = { rust-overlay.url = "github:oxalica/rust-overlay"; }; outputs = { self, nixpkgs, rust-overlay, }: let overlays = [(import rust-overlay)]; system = "x86_64-linux"; pkgs = import nixpkgs { inherit system overlays; }; asmjs-rust-bin = pkgs.rust-bin.stable.latest.default.override { targets = ["asmjs-unknown-emscripten"]; }; rustPlatform = pkgs.makeRustPlatform { cargo = asmjs-rust-bin; rustc = asmjs-rust-bin; }; in { packages.x86_64-linux.default = rustPlatform.buildRustPackage rec { name = "web"; src = ./.; cargoLock = { lockFile = ./Cargo.lock; }; doCheck = false; HOME = "$TMPDIR"; buildPhase = '' cargo build --target asmjs-unknown-emscripten --release ''; nativeBuildInputs = [pkgs.SDL2 pkgs.SDL2_gfx pkgs.emscripten]; RUST_BACKTRACE = "full"; buildInputs = [pkgs.python3Packages.requests]; }; }; }