zilch/lang/rust/default.nix

23 lines
785 B
Nix

{ chickenPackages, libsodium, callPackage, xxd }:
(callPackage ../../lib/build-chicken-parallel {}) {
name = "zilch-lang-rust";
src = ./.;
buildInputs = with chickenPackages.chickenEggs; [
chickenPackages.chicken
r7rs
json
srfi-152
srfi-113
srfi-207
(callPackage ../../core {})
xxd
];
overrides.preBuild = ''
(cat ${./helpers/src/bin/buildscript-runner.rs}; printf '\0') | xxd -i -n runner_source > runner_source.h
(cat ${./helpers/src/bin/rustc-wrapper.rs}; printf '\0') | xxd -i -n rustc_wrap_source > rustc_wrap_source.h
(cat ${./helpers/src/bin/cfg-reader.rs}; printf '\0') | xxd -i -n cfgfetch_source > cfgfetch_source.h
(cat ${./helpers/src/bin/false.rs}; printf '\0') | xxd -i -n false_source > false_source.h
'';
}