Compare commits
2 Commits
c1b38f27ed
...
35e34c27f7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35e34c27f7
|
||
|
|
6be48da010
|
@@ -2,7 +2,7 @@
|
||||
name = "squad-quote-store"
|
||||
version = "0.1.0"
|
||||
authors = ["Reed Krantz <programming@krantz.one>"]
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
||||
23
flake.lock
generated
23
flake.lock
generated
@@ -69,7 +69,8 @@
|
||||
"crane": "crane",
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
"rust-overlay": "rust-overlay",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
@@ -91,6 +92,26 @@
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770228511,
|
||||
"narHash": "sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD+Fyxk=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "337a4fe074be1042a35086f15481d763b8ddc0e7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
78
flake.nix
78
flake.nix
@@ -6,6 +6,11 @@
|
||||
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
|
||||
treefmt-nix = {
|
||||
url = "github:numtide/treefmt-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
crane.url = "github:ipetkov/crane";
|
||||
|
||||
rust-overlay = {
|
||||
@@ -17,15 +22,30 @@
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
treefmt-nix,
|
||||
crane,
|
||||
rust-overlay,
|
||||
...
|
||||
} @ inputs:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
imports = [
|
||||
treefmt-nix.flakeModule
|
||||
];
|
||||
|
||||
systems = ["aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin"];
|
||||
|
||||
perSystem = {system, ...}: let
|
||||
src = ./.;
|
||||
src = craneLib.cleanCargoSource ./.;
|
||||
|
||||
# runtime dependencies
|
||||
buildInputs = with pkgs; [
|
||||
# openssl
|
||||
];
|
||||
|
||||
# build dependencies
|
||||
nativeBuildInputs = with pkgs; [
|
||||
# pkg-config
|
||||
];
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
@@ -42,42 +62,14 @@
|
||||
# Build *just* the cargo dependencies, so we can reuse
|
||||
# all of that work (e.g. via cachix) when running in CI
|
||||
cargoArtifacts = craneLib.buildDepsOnly {
|
||||
inherit src;
|
||||
inherit src buildInputs nativeBuildInputs;
|
||||
};
|
||||
in rec {
|
||||
# Formatter for nix files, available through 'nix fmt'
|
||||
formatter = pkgs.alejandra;
|
||||
|
||||
# Your custom packages
|
||||
# Accessible through 'nix build', 'nix shell', 'nix run', etc
|
||||
packages = {
|
||||
default = craneLib.buildPackage {
|
||||
inherit src cargoArtifacts;
|
||||
|
||||
# runtime dependencies
|
||||
# buildInputs = [];
|
||||
|
||||
# build dependencies
|
||||
# nativeBuildInputs = [pkgs.pkg-config];
|
||||
};
|
||||
};
|
||||
|
||||
checks = {
|
||||
clippy = craneLib.cargoClippy {
|
||||
inherit src cargoArtifacts;
|
||||
cargoClippyExtraArgs = "-- --deny warnings";
|
||||
};
|
||||
|
||||
fmt = craneLib.cargoFmt {
|
||||
inherit src cargoArtifacts;
|
||||
};
|
||||
};
|
||||
|
||||
# Dev Shell that lets you enter an environment with all the necessary utilites
|
||||
# Available through 'nix develop'
|
||||
# Also can be activated automatically if direnv is installed on the system with 'direnv allow'
|
||||
devShells.default = craneLib.devShell {
|
||||
inherit cargoArtifacts checks;
|
||||
inherit checks;
|
||||
|
||||
# extra tooling dependencies
|
||||
packages = with pkgs; [
|
||||
@@ -87,6 +79,30 @@
|
||||
|
||||
inputsFrom = [packages.default];
|
||||
};
|
||||
|
||||
# Formatter for nix files, available through 'nix fmt'
|
||||
treefmt = {
|
||||
programs.alejandra.enable = true;
|
||||
programs.rustfmt = {
|
||||
enable = true;
|
||||
edition = (builtins.fromTOML (builtins.readFile "${src}/Cargo.toml")).package.edition;
|
||||
};
|
||||
};
|
||||
|
||||
# Your custom packages
|
||||
# Accessible through 'nix build', 'nix shell', 'nix run', etc
|
||||
packages = {
|
||||
default = craneLib.buildPackage {
|
||||
inherit src buildInputs nativeBuildInputs cargoArtifacts;
|
||||
};
|
||||
};
|
||||
|
||||
checks = {
|
||||
clippy = craneLib.cargoClippy {
|
||||
inherit src buildInputs nativeBuildInputs cargoArtifacts;
|
||||
cargoClippyExtraArgs = "-- --deny warnings";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
mod component;
|
||||
pub use component::*;
|
||||
pub use component::*;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
use dioxus_primitives::{
|
||||
ContentAlign,
|
||||
date_picker::{self, DatePickerInputProps, DatePickerProps, DateRangePickerProps},
|
||||
popover::{PopoverContentProps, PopoverTriggerProps},
|
||||
ContentAlign,
|
||||
};
|
||||
|
||||
use super::super::calendar::*;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
mod component;
|
||||
pub use component::*;
|
||||
pub use component::*;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use crate::components::{
|
||||
Input,
|
||||
date_picker::{DatePicker, DatePickerInput},
|
||||
textarea::Textarea,
|
||||
Input,
|
||||
};
|
||||
use dioxus::prelude::*;
|
||||
|
||||
use time::{macros::offset, OffsetDateTime};
|
||||
use time::{OffsetDateTime, macros::offset};
|
||||
|
||||
#[component]
|
||||
pub fn EditQuote() -> Element {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
mod component;
|
||||
pub use component::*;
|
||||
pub use component::*;
|
||||
|
||||
Reference in New Issue
Block a user