flake.nix: package log parsing script

This commit is contained in:
2025-08-22 16:43:12 +02:00
parent 0a9b149d7b
commit 49e82eff6e
2 changed files with 15 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
result

View File

@@ -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")
]);
});
};
}