shapefile-thing/flake.nix
2024-04-16 10:26:02 -07:00

38 lines
861 B
Nix

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