41 lines
1.4 KiB
Nix
41 lines
1.4 KiB
Nix
{
|
|
description = "Private, self-hosted period tracker with cycle predictions";
|
|
|
|
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 { };
|
|
flowtrack = self.packages.${system}.default;
|
|
});
|
|
|
|
nixosModules.default = import ./module.nix self;
|
|
nixosModules.flowtrack = self.nixosModules.default;
|
|
|
|
checks = forAllSystems (system:
|
|
let pkgs = import nixpkgs { inherit system; };
|
|
in {
|
|
inherit (self.packages.${system}) default;
|
|
tests = pkgs.runCommand "flowtrack-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
|
|
node --check static/app.js
|
|
node --check static/cycle.js
|
|
node --check static/sw.js
|
|
node --check notify.js
|
|
node tests/test_cycle.js
|
|
node --disable-warning=ExperimentalWarning tests/test_push.js
|
|
touch $out
|
|
'';
|
|
});
|
|
};
|
|
}
|