summaryrefslogtreecommitdiff
path: root/nix-dependencies/dependencies.nix
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 /nix-dependencies/dependencies.nix
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 'nix-dependencies/dependencies.nix')
-rw-r--r--nix-dependencies/dependencies.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nix-dependencies/dependencies.nix b/nix-dependencies/dependencies.nix
index 99280cc..a328ddd 100644
--- a/nix-dependencies/dependencies.nix
+++ b/nix-dependencies/dependencies.nix
@@ -6,6 +6,7 @@
, grpc
, clang
, fmt
+, rustc
# for tests
, gnugrep
@@ -44,6 +45,7 @@ stdenv.mkDerivation rec {
test=$(jo PATH=$(jo -a ${gnugrep}/bin ${unixtools.xxd}/bin)) \
PKGCONFIG=$(jo pkg-config=${pkg-config}/bin/pkg-config \
PKG_CONFIG_PATH=$(jo -a $PKG_CONFIG_PATH)) \
+ RUST=$(jo PATH=$(jo -a ${rustc}/bin ${clang}/bin ${coreutils}/bin /bin)) \
) > config.json
cat config.json
jo "just files"=$(jo config=$(jo -a $(jo root=system path=$out/share/config.json))) > rc.json