Files
minecraft-heatmap/flake.nix

48 lines
1.2 KiB
Nix
Raw Normal View History

2025-08-14 16:31:01 +02:00
{
inputs.nixpkgs.url = "nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }: let
inherit (nixpkgs) lib;
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
"armv7l-linux"
];
forAllSystems = f: lib.genAttrs systems (system: f system nixpkgs.legacyPackages.${system});
in {
devShells = forAllSystems (system: pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
2025-08-22 16:43:12 +02:00
ruff
2025-08-14 16:31:01 +02:00
(python3.withPackages (ppkgs: with ppkgs; [
psycopg2-binary
]))
];
};
});
2025-08-22 16:43:12 +02:00
2025-08-22 18:43:45 +02:00
overlays.default = final: prev: {
inherit (self.packages.${final.system}) mclog2psql;
};
nixosModules.default = ./module.nix;
2025-08-22 16:43:12 +02:00
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")
]);
});
2025-08-14 16:31:01 +02:00
};
}