There was an error while loading. Please reload this page.
1 parent 6888dc0 commit c54b05aCopy full SHA for c54b05a
1 file changed
nix/crate-overrides.nix
@@ -1,11 +1,24 @@
1
-{ self, ... }:
+{ lib, self, ... }:
2
{
3
flake.overlays.crateOverrides = final: prev: {
4
defaultCrateOverrides = prev.defaultCrateOverrides
5
// self.tools.${prev.system}.crateOverrides;
6
};
7
perSystem = { pkgs, ... }: {
8
tools.crateOverrides = {
9
+ wasm-crate = attrs: {
10
+ target = lib.systems.examples.wasm32-unknown-none;
11
+ globalRustcOpts = [ "-C" "panic=abort" ];
12
+ postInstall = (attrs.postInstall or "") + ''
13
+ mkdir -p $out
14
+ cp -r target/lib/*.wasm $out/
15
+ '';
16
+ };
17
+ unstable-opts-crate = attrs: {
18
+ extraRustcOpts = (attrs.extraRustcOpts or []) ++ [
19
+ "-Z" "unstable-options"
20
+ ];
21
22
openssl-sys = attrs: {
23
nativeBuildInputs = [ pkgs.pkg-config ];
24
buildInputs = [ pkgs.openssl ];
0 commit comments