2023-04-22 18:47:11 +08:00
|
|
|
{
|
|
|
|
description = "A basic Rust devshell for NixOS users developing Leptos";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
overlays = [ (import rust-overlay) ];
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system overlays;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
with pkgs;
|
|
|
|
{
|
|
|
|
devShells.default = mkShell {
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
pkg-config
|
|
|
|
cacert
|
2023-09-23 23:10:24 +08:00
|
|
|
cargo-make
|
|
|
|
trunk
|
2023-08-22 07:31:37 +08:00
|
|
|
(rust-bin.selectLatestNightlyWith( toolchain: toolchain.default.override {
|
2023-04-22 18:47:11 +08:00
|
|
|
extensions= [ "rust-src" "rust-analyzer" ];
|
|
|
|
targets = [ "wasm32-unknown-unknown" ];
|
|
|
|
}))
|
2023-12-14 22:42:07 +08:00
|
|
|
] ++ pkgs.lib.optionals pkg.stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
2023-04-22 18:47:11 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
shellHook = ''
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|