diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b2be92b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result diff --git a/flake.nix b/flake.nix index 3849f0f..056575b 100644 --- a/flake.nix +++ b/flake.nix @@ -17,12 +17,25 @@ devShells = forAllSystems (system: pkgs: { default = pkgs.mkShell { packages = with pkgs; [ + ruff (python3.withPackages (ppkgs: with ppkgs; [ - tqdm psycopg2-binary ])) ]; }; }); + + packages = forAllSystems (system: pkgs: { + default = self.packages.${system}.mclog2psql; + mclog2psql = pkgs.writers.writePython3Bin "mclog2psql" { + libraries = [ pkgs.python3Packages.psycopg2 ]; + flakeIgnore = [ "E265" "E501" ]; + } (lib.pipe ./mclog2psql/main.py [ + builtins.readFile + (lib.splitString "\n") + (lib.filter (line: !lib.hasPrefix "#!" line)) + (lib.concatStringsSep "\n") + ]); + }); }; }