Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/ofborg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 329a08f53d12
Choose a base ref
...
head repository: NixOS/ofborg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b4afb127df44
Choose a head ref
  • 3 commits
  • 5 files changed
  • 2 contributors

Commits on Apr 24, 2020

  1. init cargo workspace

    Enables splittig up the code a bit more, and hopefully helps keep the
    compilation time down.
    LnL7 committed Apr 24, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    primeos Michael Weiss
    Copy the full SHA
    1c0c5e3 View commit details
  2. move simple-build to a separate project

    This is mostly intended as an example and since this is only useful for
    testing it should be relatively safe.
    LnL7 committed Apr 24, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    primeos Michael Weiss
    Copy the full SHA
    7ccb494 View commit details
  3. Merge pull request #469 from LnL7/cargo-workspace

    introduce cargo workspace
    grahamc authored Apr 24, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    primeos Michael Weiss
    Copy the full SHA
    b4afb12 View commit details
Showing with 38 additions and 11 deletions.
  1. +8 −0 {ofborg → }/Cargo.lock
  2. +12 −0 Cargo.toml
  3. +10 −0 ofborg-simple-build/Cargo.toml
  4. +8 −4 ofborg/src/bin/simple-build.rs → ofborg-simple-build/src/main.rs
  5. +0 −7 ofborg/Cargo.toml
8 changes: 8 additions & 0 deletions ofborg/Cargo.lock → Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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" }
10 changes: 10 additions & 0 deletions ofborg-simple-build/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
use ofborg::config;
use ofborg::nix;
#[macro_use]
extern crate log;

use std::env;
use std::fs::File;
use std::io::Read;
use std::path::Path;

fn main() {
let cfg = config::load(env::args().nth(1).unwrap().as_ref());
use ofborg::config;
use ofborg::nix;

fn main() {
ofborg::setup_log();

log::info!("Loading config...");
let cfg = config::load(env::args().nth(1).unwrap().as_ref());
let nix = cfg.nix();

log::info!("Running build...");
match nix.safely_build_attrs(
&Path::new("./"),
nix::File::DefaultNixpkgs,
7 changes: 0 additions & 7 deletions ofborg/Cargo.toml
Original file line number Diff line number Diff line change
@@ -28,10 +28,3 @@ nom = "4.0.0-beta3"
sys-info = "0.5.6"
chrono = "0.4.6"
separator = "0.4.1"

[profile.release]
debug = true

[patch.crates-io]
#hubcaps = { path = "../hubcaps" }
#amq-proto = { path = "rust-amq-proto" }