shapefile-thing/flake.nix
2024-01-08 17:14:18 -08:00

43 lines
970 B
Nix

{
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
outputs = {
self,
nixpkgs,
}: let
inherit (nixpkgs) lib;
genSystems = lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
];
pkgsFor = system: import nixpkgs {inherit system;};
in {
packages = genSystems (
system: let
pkgs = pkgsFor system;
in {
default = pkgs.callPackage ./. {};
static = pkgs.pkgsStatic.callPackage ./. {
strip = true;
};
}
);
devShells = genSystems (
system: let
pkgs = pkgsFor system;
in {
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [clang-tools];
inputsFrom = [self.packages.${system}.default];
};
pyShell = pkgs.mkShell {
nativeBuildInputs = [(pkgs.python3.withPackages (ps: with ps; [geopandas]))];
};
}
);
formatter = genSystems (system: (pkgsFor system).alejandra);
};
}