{
description = "The Purpose of the Package is to provide the `cargo ros_add` command to add dependencies to `Cargo.toml` and the `package.xml`";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem =
{ pkgs, system, ... }:
{
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ (import inputs.rust-overlay) ];
};
apps = {
echo-chamber = {
type = "app";
program = "${pkgs.writers.writeNuBin "echo-chamber" ''
ls ${pkgs.rust-bin.nightly.latest.default}/bin/
''}/bin/echo-chamber";
};
test-suit = {
type = "app";
program = "${pkgs.writers.writeNuBin "test-suit" ''
$env.PATH = ($env.PATH | prepend "${pkgs.rust-bin.nightly.latest.default}/bin")
cargo test --all-targets
''}/bin/test-suit";
};
};
devShells.default = pkgs.mkShell {
packages = [
pkgs.rust-bin.nightly.latest.default
];
};
};
};
}