1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2024-12-14 11:47:31 +00:00
flake-parts/examples/project-commands/flake.nix

38 lines
1.1 KiB
Nix
Raw Normal View History

2023-06-23 17:31:43 +00:00
{
description = "Description for the project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
mission-control.url = "github:Platonic-Systems/mission-control";
flake-root.url = "github:srid/flake-root";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.mission-control.flakeModule
inputs.flake-root.flakeModule
];
systems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, ... }: {
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ avro-tools ];
inputsFrom = [ config.mission-control.devShell config.flake-root.devShell ];
};
mission-control = {
wrapperName = "run";
scripts = {
build = {
description = "convert files from .avdl to .avsc";
exec = ''
avro-tools idl2schemata "$FLAKE_ROOT/Hello.avdl" .
'';
category = "Development";
};
};
};
};
};
}