summaryrefslogtreecommitdiff
path: root/test/rust
diff options
context:
space:
mode:
authorKlaus T. Aehlig <aehlig@linta.de>2024-06-25 17:59:39 +0200
committerKlaus T. Aehlig <aehlig@linta.de>2024-06-25 18:29:41 +0200
commite65cf1d265210738a9b3c0b811fbfeffa0741c39 (patch)
tree3b1bfe9958b324b5bd0768b48bfa76aaaa3eecc7 /test/rust
parent628cb0ab06332086a7ea022bcebfb69d95c38068 (diff)
downloadhello-nix-e65cf1d265210738a9b3c0b811fbfeffa0741c39.tar.gz
Import rust rules and add a minimal example
Note that the PATH for rust targets also has to include that for the C compiler and hence also coreutils, as the rust compiler calls out to `cc`.
Diffstat (limited to 'test/rust')
-rw-r--r--test/rust/TARGETS8
-rw-r--r--test/rust/hello/TARGETS8
-rw-r--r--test/rust/hello/test_hello.sh3
3 files changed, 19 insertions, 0 deletions
diff --git a/test/rust/TARGETS b/test/rust/TARGETS
new file mode 100644
index 0000000..713ff64
--- /dev/null
+++ b/test/rust/TARGETS
@@ -0,0 +1,8 @@
+{ "":
+ { "type": "install"
+ , "tainted": ["test"]
+ , "dirs":
+ [ [["./", "hello", ""], "hello"]
+ ]
+ }
+}
diff --git a/test/rust/hello/TARGETS b/test/rust/hello/TARGETS
new file mode 100644
index 0000000..ab48819
--- /dev/null
+++ b/test/rust/hello/TARGETS
@@ -0,0 +1,8 @@
+{ "": {"type": "install", "tainted": ["test"], "deps": ["hello"]}
+, "hello":
+ { "type": ["@", "rules", "shell/test", "script"]
+ , "name": ["hello"]
+ , "test": ["test_hello.sh"]
+ , "deps": [["@", "src", "rust/hello", ""]]
+ }
+}
diff --git a/test/rust/hello/test_hello.sh b/test/rust/hello/test_hello.sh
new file mode 100644
index 0000000..531f888
--- /dev/null
+++ b/test/rust/hello/test_hello.sh
@@ -0,0 +1,3 @@
+set -e
+
+./hello | grep -i world