flake.nix: package log parsing script
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
result
|
15
flake.nix
15
flake.nix
@@ -17,12 +17,25 @@
|
|||||||
devShells = forAllSystems (system: pkgs: {
|
devShells = forAllSystems (system: pkgs: {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
ruff
|
||||||
(python3.withPackages (ppkgs: with ppkgs; [
|
(python3.withPackages (ppkgs: with ppkgs; [
|
||||||
tqdm
|
|
||||||
psycopg2-binary
|
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")
|
||||||
|
]);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user