From 96639e9d7e456bcee261d40b7d92c6043ea9f907 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 25 Apr 2020 13:51:14 +0200 Subject: [PATCH] work around carnix workspace issue Carnix doesn't properly handle includes for workspace members, this works around the issue by specifying what should be generated directly in Cargo.toml. https://nest.pijul.com/pmeunier/carnix/discussions/46 --- Cargo.nix | 4 ++-- ofborg-simple-build/Cargo.toml | 1 + ofborg/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.nix b/Cargo.nix index eecf7fc..5b38965 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -112,7 +112,7 @@ rec { version = "0.1.8"; authors = [ "Graham Christensen " ]; edition = "2018"; - src = include [ "Cargo.toml" "src" "test-srcs" "build.rs" ] ./.; + src = include [ "Cargo.toml" "ofborg" ] ./.; workspace_member = "ofborg"; build = "build.rs"; dependencies = mapFeatures features ([ @@ -192,7 +192,7 @@ rec { version = "0.1.0"; authors = [ "Daiderd Jordan " ]; edition = "2018"; - src = include [ "Cargo.toml" " ofborg-simple-build" ] ./.; + src = include [ "Cargo.toml" "ofborg-simple-build" ] ./.; workspace_member = "ofborg-simple-build"; dependencies = mapFeatures features ([ (cratesIO.crates."log"."${deps."ofborg_simple_build"."0.1.0"."log"}" deps) diff --git a/ofborg-simple-build/Cargo.toml b/ofborg-simple-build/Cargo.toml index b1bb6b6..5a1a241 100644 --- a/ofborg-simple-build/Cargo.toml +++ b/ofborg-simple-build/Cargo.toml @@ -2,6 +2,7 @@ name = "ofborg-simple-build" version = "0.1.0" authors = ["Daiderd Jordan "] +include = ["Cargo.toml", "ofborg-simple-build"] # TODO remove when carnix is fixed edition = "2018" [dependencies] diff --git a/ofborg/Cargo.toml b/ofborg/Cargo.toml index dd0a422..1af67f1 100644 --- a/ofborg/Cargo.toml +++ b/ofborg/Cargo.toml @@ -2,7 +2,7 @@ name = "ofborg" version = "0.1.8" authors = ["Graham Christensen "] -include = ["Cargo.toml", "src", "test-srcs", "build.rs"] +include = ["Cargo.toml", "ofborg"] # TODO remove when carnix is fixed build = "build.rs" edition = "2018"