Clean up flake.nix

main
Elnu 1 year ago
parent 42d12b6888
commit e2310a6554

@ -32,18 +32,14 @@ Updating `cargoHash`:
}; };
# nightly is required for function signal syntax in leptos # nightly is required for function signal syntax in leptos
# https://leptos-rs.github.io/leptos/02_getting_started.html # https://leptos-rs.github.io/leptos/02_getting_started.html
rust-bin = pkgs.rust-bin.nightly.latest.minimal; rust = pkgs.rust-bin.nightly.latest;
rust-binWasm = rust-bin.override { # binary for output binary derivations
targets = [ "wasm32-unknown-unknown" ]; # (doesn't include dev tooling e.g. clippy)
}; rust-bin = rust.minimal;
rustPlatform = pkgs.makeRustPlatform { rustPlatform = pkgs.makeRustPlatform {
cargo = rust-bin; cargo = rust-bin;
rustc = rust-bin; rustc = rust-bin;
}; };
rustPlatformWasm = pkgs.makeRustPlatform {
cargo = rust-binWasm;
rustc = rust-binWasm;
};
rustSettings = with pkgs; { rustSettings = with pkgs; {
src = ./.; src = ./.;
cargoHash = nixpkgs.lib.fakeHash; cargoHash = nixpkgs.lib.fakeHash;
@ -56,8 +52,9 @@ Updating `cargoHash`:
in { in {
devShells.${system}.default = with pkgs; mkShell { devShells.${system}.default = with pkgs; mkShell {
packages = [ packages = [
(rust-binWasm.override { (rust.default.override {
extensions = [ "rust-src" ]; extensions = [ "rust-src" ];
targets = [ "wasm32-unknown-unknown" ];
}) })
bacon bacon
]; ];
@ -75,7 +72,7 @@ Updating `cargoHash`:
}; };
}); });
dyesub-tool = let dyesub-tool = let
rustToolchain = pkgs.rust-bin.nightly.latest.minimal.override { rustToolchain = rust.minimal.override {
targets = [ "wasm32-unknown-unknown" ]; targets = [ "wasm32-unknown-unknown" ];
}; };
craneLib = ((crane.mkLib pkgs).overrideToolchain rustToolchain).overrideScope' (final: prev: { craneLib = ((crane.mkLib pkgs).overrideToolchain rustToolchain).overrideScope' (final: prev: {

Loading…
Cancel
Save