43 lines
970 B
Nix
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);
|
||
|
};
|
||
|
}
|