Big FMT job

main
Michal 2 years ago
parent f0a7012b50
commit 96b9f2f652

@ -5,36 +5,40 @@
naersk.url = "github:nix-community/naersk"; naersk.url = "github:nix-community/naersk";
}; };
outputs = { self, nixpkgs, utils, naersk }: outputs = {
utils.lib.eachDefaultSystem (system: self,
let nixpkgs,
pkgs = nixpkgs.legacyPackages."${system}"; utils,
naersk-lib = naersk.lib."${system}"; naersk,
in rec }:
{ utils.lib.eachDefaultSystem (system: let
packages.malachite = naersk-lib.buildPackage { pkgs = nixpkgs.legacyPackages."${system}";
pname = "mlc"; naersk-lib = naersk.lib."${system}";
root = ./.; in rec
}; {
packages.malachite = naersk-lib.buildPackage {
packages.default = packages.malachite; pname = "mlc";
root = ./.;
};
apps.malachite = utils.lib.mkApp { packages.default = packages.malachite;
drv = packages.malachite;
};
apps.default = apps.malachite;
devShells.default = pkgs.mkShell { apps.malachite = utils.lib.mkApp {
nativeBuildInputs = with pkgs; [ drv = packages.malachite;
rustc };
cargo
rustfmt
cargo-audit
clippy
];
};
formatter = pkgs.alejandra; apps.default = apps.malachite;
});
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
rustc
cargo
rustfmt
cargo-audit
clippy
];
};
formatter = pkgs.alejandra;
});
} }

@ -17,7 +17,6 @@ pub struct Args {
/// Excludes packages from given operation, if applicable /// Excludes packages from given operation, if applicable
#[clap(short = 'x', long = "exclude", action = ArgAction::Append, takes_value = true)] #[clap(short = 'x', long = "exclude", action = ArgAction::Append, takes_value = true)]
pub exclude: Vec<String>, pub exclude: Vec<String>,
} }
#[derive(Debug, Clone, Subcommand)] #[derive(Debug, Clone, Subcommand)]

@ -13,4 +13,4 @@ pub fn clean() {
for dir in dirs { for dir in dirs {
std::fs::remove_dir_all(dir).unwrap(); std::fs::remove_dir_all(dir).unwrap();
} }
} }

@ -1,6 +1,7 @@
use crate::{info, workspace};
use std::process::Command; use std::process::Command;
use crate::{info, workspace};
pub fn clone() { pub fn clone() {
// Read config struct from mlc.toml // Read config struct from mlc.toml
let config = workspace::read_cfg(); let config = workspace::read_cfg();

@ -1,11 +1,11 @@
pub use build::*; pub use build::*;
pub use clean::*;
pub use clone::*; pub use clone::*;
pub use config::*; pub use config::*;
pub use pull::*; pub use pull::*;
pub use clean::*;
mod build; mod build;
mod clean;
mod clone; mod clone;
mod config; mod config;
mod pull; mod pull;
mod clean;

@ -1,8 +1,8 @@
use crate::{crash, internal::AppExitCode};
use std::env; use std::env;
use std::process::Command; use std::process::Command;
use crate::info; use crate::info;
use crate::{crash, internal::AppExitCode};
fn do_the_pulling(repos: Vec<String>) { fn do_the_pulling(repos: Vec<String>) {
for repo in repos { for repo in repos {

Loading…
Cancel
Save