Nix
AWSim ships a flake.nix with a package build and a development shell.
Prerequisites
- Nix with flakes enabled. Add
experimental-features = nix-command flakesto~/.config/nix/nix.conf.
Build
bash
nix buildThe binary is at ./result/bin/awsim.
Run without Cloning
bash
nix run github:QaidVoid/awsimDevelopment Shell
bash
nix developThe dev shell includes:
rustc,cargo,clippy,rustfmt,rust-analyzerpkg-config,opensslbun(for the UI)- macOS:
SecurityandSystemConfigurationframeworks
Once inside the shell, build normally:
bash
cargo build --releaseFlake Outputs
| Output | Description |
|---|---|
packages.default | The awsim binary |
devShells.default | Development environment |
The package build uses rustPlatform.buildRustPackage with Cargo.lock for reproducibility.
NixOS Module
A NixOS module is not yet included. You can run AWSim as a systemd service using the built package:
nix
# configuration.nix
{ config, pkgs, ... }:
let
awsim = (builtins.getFlake "github:QaidVoid/awsim").packages.${pkgs.system}.default;
in {
systemd.services.awsim = {
description = "AWSim local AWS emulator";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${awsim}/bin/awsim --data-dir /var/lib/awsim";
Restart = "on-failure";
StateDirectory = "awsim";
};
};
}