guildhall/flake.nix

37 lines
1.2 KiB
Nix
Raw Permalink Normal View History

{
description = "Guildhall: a co-op idle game for a small group of friends";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
outputs = { self, nixpkgs }:
let
forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ];
in
{
packages = forAllSystems (system:
let pkgs = import nixpkgs { inherit system; };
in {
default = pkgs.callPackage ./package.nix { };
guildhall = self.packages.${system}.default;
});
nixosModules.default = import ./module.nix self;
nixosModules.guildhall = self.nixosModules.default;
checks = forAllSystems (system:
let pkgs = import nixpkgs { inherit system; };
in {
inherit (self.packages.${system}) default;
tests = pkgs.runCommand "guildhall-tests" { nativeBuildInputs = [ pkgs.python3 pkgs.nodejs ]; } ''
cp -r ${self} source
chmod -R u+w source
cd source
python3 -m unittest discover -s tests -v
python3 -m py_compile app.py game.py combat.py
node --check static/app.js
touch $out
'';
});
};
}