nixos-config/devcontainers/rust-backend.nix

33 lines
572 B
Nix
Raw Normal View History

2024-10-26 10:35:21 +00:00
{ dockerTools, buildEnv, rustc, cargo, rust-bindgen, rust-analyzer, nodejs, bash
, meson, ninja, pkg-config }:
dockerTools.buildImage {
name = "rust-backend";
copyToRoot = buildEnv {
name = "rust-backend-root";
paths = [
bash
cargo
rust-bindgen
rust-analyzer
rustc
nodejs
meson
ninja
pkg-config
];
pathsToLink = [ "/bin" "/etc" "/lib" "/share" ];
};
runAsRoot = ''
mkdir -p /data
'';
config = {
Cmd = [ "/bin/bash" ];
WorkingDir = "/data";
Volumes."/data" = { };
};
}