initial commit
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
{
|
||||
description = "RadiantWave kiosk application (SDL3, C++17)";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
}:
|
||||
nixpkgs.lib.recursiveUpdate
|
||||
(
|
||||
# nixpkgs dropped x86_64-darwin support, so this is the full set of
|
||||
# supported systems: Intel/ARM Linux and Apple Silicon macOS.
|
||||
flake-utils.lib.eachSystem
|
||||
[
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
]
|
||||
(
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
# The app itself is proprietary; let it build without the
|
||||
# global `allowUnfree = true` in the user's config.
|
||||
config.allowUnfreePredicate = pkg:
|
||||
(nixpkgs.lib.getName pkg) == "radiantwave";
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.default = pkgs.callPackage ./nix/package.nix { };
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
inputsFrom = [ self.packages.${system}.default ];
|
||||
packages = [ pkgs.cc ];
|
||||
shellHook = ''
|
||||
echo "RadiantWave dev shell"
|
||||
echo " Configure: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug"
|
||||
echo " Build: cmake --build build"
|
||||
echo " Run: ./build/radiantwave"
|
||||
echo " Tests: ./build/test_assets && ./build/test_<name>"
|
||||
'';
|
||||
};
|
||||
|
||||
# `nix flake check` builds this, which runs the offline test suite.
|
||||
checks.default = self.packages.${system}.default;
|
||||
}
|
||||
)
|
||||
)
|
||||
{
|
||||
nixosModules.default = import ./nixos/module.nix self;
|
||||
|
||||
nixosConfigurations.test-vm = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
|
||||
self.nixosModules.default
|
||||
./nixos/vm.nix
|
||||
];
|
||||
};
|
||||
|
||||
packages.x86_64-linux.test-vm =
|
||||
self.nixosConfigurations.test-vm.config.system.build.vm;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user