From c6b35f8f2e83621b4e53ab999e5b5bf146a73aa0 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 26 Jun 2024 15:46:09 +0200 Subject: Add minimal example using cargo ... including a test (for which we add python3 as test dependency). --- etc/defaults/rust/TARGETS | 42 +----------------------------------------- etc/defaults/rust/nix.TARGETS | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 41 deletions(-) create mode 100644 etc/defaults/rust/nix.TARGETS (limited to 'etc/defaults') diff --git a/etc/defaults/rust/TARGETS b/etc/defaults/rust/TARGETS index fbd1a69..fe4de0a 100644 --- a/etc/defaults/rust/TARGETS +++ b/etc/defaults/rust/TARGETS @@ -1,43 +1,3 @@ { "defaults": - { "type": "configure" - , "target": "defaults (unconfigured)" - , "arguments_config": ["TOOLCHAIN_CONFIG"] - , "config": - { "type": "let*" - , "bindings": - [ [ "toolchain" - , { "type": "lookup" - , "map": - { "type": "var" - , "name": "TOOLCHAIN_CONFIG" - , "default": {"type": "empty_map"} - } - , "key": "RUST" - , "default": {"type": "empty_map"} - } - ] - , [ "RUSTC" - , { "type": "lookup" - , "map": {"type": "var", "name": "toolchain"} - , "key": "RUSTC" - , "default": "rustc" - } - ] - , [ "PATH" - , { "type": "lookup" - , "map": {"type": "var", "name": "toolchain"} - , "key": "PATH" - , "default": [] - } - ] - ] - , "body": {"type": "env", "vars": ["RUSTC", "PATH"]} - } - } -, "defaults (unconfigured)": - { "type": "defaults" - , "arguments_config": ["RUSTC", "PATH"] - , "RUSTC": [{"type": "var", "name": "RUSTC"}] - , "PATH": {"type": "var", "name": "PATH"} - } + {"type": "defaults", "base": [["@", "orig-rules", "rust", "defaults"]]} } diff --git a/etc/defaults/rust/nix.TARGETS b/etc/defaults/rust/nix.TARGETS new file mode 100644 index 0000000..fbd1a69 --- /dev/null +++ b/etc/defaults/rust/nix.TARGETS @@ -0,0 +1,43 @@ +{ "defaults": + { "type": "configure" + , "target": "defaults (unconfigured)" + , "arguments_config": ["TOOLCHAIN_CONFIG"] + , "config": + { "type": "let*" + , "bindings": + [ [ "toolchain" + , { "type": "lookup" + , "map": + { "type": "var" + , "name": "TOOLCHAIN_CONFIG" + , "default": {"type": "empty_map"} + } + , "key": "RUST" + , "default": {"type": "empty_map"} + } + ] + , [ "RUSTC" + , { "type": "lookup" + , "map": {"type": "var", "name": "toolchain"} + , "key": "RUSTC" + , "default": "rustc" + } + ] + , [ "PATH" + , { "type": "lookup" + , "map": {"type": "var", "name": "toolchain"} + , "key": "PATH" + , "default": [] + } + ] + ] + , "body": {"type": "env", "vars": ["RUSTC", "PATH"]} + } + } +, "defaults (unconfigured)": + { "type": "defaults" + , "arguments_config": ["RUSTC", "PATH"] + , "RUSTC": [{"type": "var", "name": "RUSTC"}] + , "PATH": {"type": "var", "name": "PATH"} + } +} -- cgit v1.2.3