diff --git a/.gitignore b/.gitignore index e19c2d4..66ba7bd 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ __pycache__ *.sqlite3 media dist +result diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..48c695b --- /dev/null +++ b/flake.lock @@ -0,0 +1,80 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1673800717, + "narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "poetry2nix": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1673926875, + "narHash": "sha256-QOsT76Al0Igpo0u5vtQJuDSOxrocX3sTD523pLPEklc=", + "owner": "nix-community", + "repo": "poetry2nix", + "rev": "a5c454a834cd290dd4d33102ab8b4aa37d850e65", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "poetry2nix", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "poetry2nix": "poetry2nix" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..9661191 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + description = "Continuous integration service running Dolphin FIFO logs to find graphics rendering regressions."; + + inputs.flake-utils.url = "github:numtide/flake-utils"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; + inputs.poetry2nix.url = "github:nix-community/poetry2nix"; + inputs.poetry2nix.inputs.nixpkgs.follows = "nixpkgs"; + + outputs = { self, nixpkgs, flake-utils, poetry2nix }: { + overlay = nixpkgs.lib.composeManyExtensions [ + poetry2nix.overlay + (final: prev: { + fifoci-runner = prev.poetry2nix.mkPoetryApplication { + src = prev.poetry2nix.cleanPythonSources { src = ./.; }; + projectDir = fifoci/runner; + + sourceRoot = "source/fifoci/runner"; + }; + }) + ]; + } // (flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + overlays = [ self.overlay ]; + }; + in rec { + packages = { inherit (pkgs) fifoci-runner; }; + defaultPackage = pkgs.fifoci-runner; + + devShells.default = with pkgs; mkShell { + buildInputs = [ python3Packages.poetry ]; + }; + } + )); +}