Merge pull request #469 from LnL7/cargo-workspace

introduce cargo workspace
This commit is contained in:
Graham Christensen 2020-04-24 17:24:42 -04:00 committed by GitHub
commit b4afb127df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 11 deletions

View file

@ -461,6 +461,14 @@ dependencies = [
"uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "ofborg-simple-build"
version = "0.1.0"
dependencies = [
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"ofborg 0.1.8",
]
[[package]] [[package]]
name = "openssl" name = "openssl"
version = "0.9.24" version = "0.9.24"

12
Cargo.toml Normal file
View file

@ -0,0 +1,12 @@
[workspace]
members = [
"ofborg",
"ofborg-simple-build"
]
[profile.release]
debug = true
[patch.crates-io]
#hubcaps = { path = "../hubcaps" }
#amq-proto = { path = "rust-amq-proto" }

View file

@ -0,0 +1,10 @@
[package]
name = "ofborg-simple-build"
version = "0.1.0"
authors = ["Daiderd Jordan <daiderd@gmail.com>"]
edition = "2018"
[dependencies]
ofborg = { path = "../ofborg" }
log = "0.3.8"

View file

@ -1,18 +1,22 @@
use ofborg::config; #[macro_use]
use ofborg::nix; extern crate log;
use std::env; use std::env;
use std::fs::File; use std::fs::File;
use std::io::Read; use std::io::Read;
use std::path::Path; use std::path::Path;
fn main() { use ofborg::config;
let cfg = config::load(env::args().nth(1).unwrap().as_ref()); use ofborg::nix;
fn main() {
ofborg::setup_log(); ofborg::setup_log();
log::info!("Loading config...");
let cfg = config::load(env::args().nth(1).unwrap().as_ref());
let nix = cfg.nix(); let nix = cfg.nix();
log::info!("Running build...");
match nix.safely_build_attrs( match nix.safely_build_attrs(
&Path::new("./"), &Path::new("./"),
nix::File::DefaultNixpkgs, nix::File::DefaultNixpkgs,

View file

@ -28,10 +28,3 @@ nom = "4.0.0-beta3"
sys-info = "0.5.6" sys-info = "0.5.6"
chrono = "0.4.6" chrono = "0.4.6"
separator = "0.4.1" separator = "0.4.1"
[profile.release]
debug = true
[patch.crates-io]
#hubcaps = { path = "../hubcaps" }
#amq-proto = { path = "rust-amq-proto" }