Loading pkgs/by-name/fl/fluffychat/vodozemac-wasm.nix +18 −11 Original line number Diff line number Diff line Loading @@ -15,13 +15,13 @@ binaryen, writableTmpDirAsHomeHook, runCommand, removeReferencesTo, }: let pubSources = fluffychat-web.pubspecLock.dependencySources; # wasm-pack doesn't take 'RUST_SRC_PATH' into consideration rustcWithLibSrc = buildPackages.rustc.override { sysroot = symlinkJoin { name = "rustc_unwrapped_with_libsrc"; paths = [ Loading @@ -32,7 +32,7 @@ let ln -s ${rustPlatform.rustLibSrc} $out/lib/rustlib/src/rust/library ''; }; }; rustcWithLibSrc = buildPackages.rustc.override { inherit sysroot; }; in # https://github.com/krille-chan/fluffychat/blob/main/scripts/prepare-web.sh Loading Loading @@ -80,6 +80,7 @@ stdenv.mkDerivation { wasm-bindgen-cli_0_2_100 binaryen writableTmpDirAsHomeHook removeReferencesTo ]; buildPhase = '' Loading @@ -103,6 +104,12 @@ stdenv.mkDerivation { runHook postInstall ''; # fix rustc leaking into closure # fluffychat-web should not reference build-time dependencies preFixup = '' find $out -name "*.wasm" -exec remove-references-to -t ${sysroot} {} + ''; env = { # Build a pub cache from fluffychat, as dart-vodozemac should be a subset # This is required because dart-vodozemac, as a pub, doesn't have a pubspec.lock Loading Loading
pkgs/by-name/fl/fluffychat/vodozemac-wasm.nix +18 −11 Original line number Diff line number Diff line Loading @@ -15,13 +15,13 @@ binaryen, writableTmpDirAsHomeHook, runCommand, removeReferencesTo, }: let pubSources = fluffychat-web.pubspecLock.dependencySources; # wasm-pack doesn't take 'RUST_SRC_PATH' into consideration rustcWithLibSrc = buildPackages.rustc.override { sysroot = symlinkJoin { name = "rustc_unwrapped_with_libsrc"; paths = [ Loading @@ -32,7 +32,7 @@ let ln -s ${rustPlatform.rustLibSrc} $out/lib/rustlib/src/rust/library ''; }; }; rustcWithLibSrc = buildPackages.rustc.override { inherit sysroot; }; in # https://github.com/krille-chan/fluffychat/blob/main/scripts/prepare-web.sh Loading Loading @@ -80,6 +80,7 @@ stdenv.mkDerivation { wasm-bindgen-cli_0_2_100 binaryen writableTmpDirAsHomeHook removeReferencesTo ]; buildPhase = '' Loading @@ -103,6 +104,12 @@ stdenv.mkDerivation { runHook postInstall ''; # fix rustc leaking into closure # fluffychat-web should not reference build-time dependencies preFixup = '' find $out -name "*.wasm" -exec remove-references-to -t ${sysroot} {} + ''; env = { # Build a pub cache from fluffychat, as dart-vodozemac should be a subset # This is required because dart-vodozemac, as a pub, doesn't have a pubspec.lock Loading