Compare commits
2 Commits
94bad8e89f
...
cf1b732808
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf1b732808
|
||
|
|
301179ee4e
|
@@ -19,47 +19,29 @@
|
|||||||
|
|
||||||
perSystem = {pkgs, ...}: let
|
perSystem = {pkgs, ...}: let
|
||||||
craneLib = crane.mkLib pkgs;
|
craneLib = crane.mkLib pkgs;
|
||||||
src = ./.;
|
src = craneLib.cleanCargoSource ./.;
|
||||||
|
|
||||||
|
# runtime dependencies
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
# openssl
|
||||||
|
];
|
||||||
|
|
||||||
|
# build dependencies
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
# pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
# Build *just* the cargo dependencies, so we can reuse
|
# Build *just* the cargo dependencies, so we can reuse
|
||||||
# all of that work (e.g. via cachix) when running in CI
|
# all of that work (e.g. via cachix) when running in CI
|
||||||
cargoArtifacts = craneLib.buildDepsOnly {
|
cargoArtifacts = craneLib.buildDepsOnly {
|
||||||
inherit src;
|
inherit src buildInputs nativeBuildInputs;
|
||||||
};
|
};
|
||||||
in rec {
|
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
|
# Dev Shell that lets you enter an environment with all the necessary utilites
|
||||||
# Available through 'nix develop'
|
# Available through 'nix develop'
|
||||||
# Also can be activated automatically if direnv is installed on the system with 'direnv allow'
|
# Also can be activated automatically if direnv is installed on the system with 'direnv allow'
|
||||||
devShells.default = craneLib.devShell {
|
devShells.default = craneLib.devShell {
|
||||||
inherit cargoArtifacts checks;
|
inherit checks;
|
||||||
|
|
||||||
# extra tooling dependencies
|
# extra tooling dependencies
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
@@ -68,6 +50,28 @@
|
|||||||
|
|
||||||
inputsFrom = [packages.default];
|
inputsFrom = [packages.default];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# 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 buildInputs nativeBuildInputs cargoArtifacts;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
checks = {
|
||||||
|
clippy = craneLib.cargoClippy {
|
||||||
|
inherit src buildInputs nativeBuildInputs cargoArtifacts;
|
||||||
|
cargoClippyExtraArgs = "-- --deny warnings";
|
||||||
|
};
|
||||||
|
|
||||||
|
fmt = craneLib.cargoFmt {
|
||||||
|
inherit src buildInputs nativeBuildInputs;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,10 @@ use clap::Parser;
|
|||||||
use tracing::{Level, event};
|
use tracing::{Level, event};
|
||||||
|
|
||||||
mod args;
|
mod args;
|
||||||
use args::CommandArgs;
|
use args::{ActionType, CommandArgs};
|
||||||
|
|
||||||
mod config;
|
mod config;
|
||||||
|
|
||||||
use crate::args::ActionType;
|
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
let args = CommandArgs::parse();
|
let args = CommandArgs::parse();
|
||||||
|
|||||||
Reference in New Issue
Block a user