Use nightly in flake.nix build derivations

main
Elnu 1 year ago
parent f5ab2ba353
commit ec75d13175

@ -26,6 +26,20 @@ Updating `cargoHash`:
pkgs = import nixpkgs {
inherit system overlays;
};
# nightly is required for function signal syntax in leptos
# https://leptos-rs.github.io/leptos/02_getting_started.html
rust-bin = pkgs.rust-bin.nightly.latest.minimal;
rust-binWasm = rust-bin.override {
targets = [ "wasm32-unknown-unknown" ];
};
rustPlatform = pkgs.makeRustPlatform {
cargo = rust-bin;
rustc = rust-bin;
};
rustPlatformWasm = pkgs.makeRustPlatform {
cargo = rust-binWasm;
rustc = rust-binWasm;
};
rustSettings = with pkgs; {
src = ./.;
cargoHash = nixpkgs.lib.fakeHash;
@ -38,10 +52,7 @@ Updating `cargoHash`:
in {
devShells.${system}.default = with pkgs; mkShell {
packages = [
# nightly is required for function signal syntax in leptos
# https://leptos-rs.github.io/leptos/02_getting_started.html
(pkgs.rust-bin.nightly.latest.default.override {
targets = [ "wasm32-unknown-unknown" ];
(rust-binWasm.override {
extensions = [ "rust-src" ];
})
bacon
@ -49,9 +60,8 @@ Updating `cargoHash`:
inputsFrom = with self.packages.${system}; [ dyesub-tool dyesub-cli ];
};
packages.${system} = {
# TODO: use nightly
default = self.packages.${system}.dyesub-cli;
dyesub-cli = pkgs.rustPlatform.buildRustPackage (rustSettings // {
dyesub-cli = rustPlatform.buildRustPackage (rustSettings // {
pname = "dyesub-cli";
version = "0.1.0";
buildAndTestSubdir = "dyesub-cli";
@ -60,7 +70,7 @@ Updating `cargoHash`:
description = "A tool for generating dye sublimation transfer sheet SVGs for Japanese thumb shift keycaps.";
};
});
dyesub-tool = pkgs.rustPlatform.buildRustPackage (rustSettings // {
dyesub-tool = rustPlatformWasm.buildRustPackage (rustSettings // {
pname = "dyesub-tool";
version = "0.1.0";
buildAndTestSubdir = "dyesub-tool";

Loading…
Cancel
Save