2024-03-24 07:26:53 +00:00
|
|
|
{
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
|
|
|
|
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
poetry2nix,
|
|
|
|
}: let
|
|
|
|
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
|
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
|
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
|
|
|
in {
|
|
|
|
packages = forAllSystems (system: let
|
|
|
|
inherit (poetry2nix.lib.mkPoetry2Nix {pkgs = pkgs.${system};}) mkPoetryApplication;
|
|
|
|
in {
|
|
|
|
default = mkPoetryApplication {
|
|
|
|
projectDir = self;
|
|
|
|
preferWheels = true;
|
2024-03-24 08:23:07 +00:00
|
|
|
extras = [];
|
2024-03-24 07:26:53 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
devShells = forAllSystems (system: let
|
|
|
|
inherit (poetry2nix.lib.mkPoetry2Nix {pkgs = pkgs.${system};}) mkPoetryEnv;
|
|
|
|
in {
|
|
|
|
default = pkgs.${system}.mkShellNoCC {
|
|
|
|
packages = with pkgs.${system}; [
|
2024-03-24 11:57:49 +00:00
|
|
|
(mkPoetryEnv rec {
|
2024-03-24 07:26:53 +00:00
|
|
|
projectDir = self;
|
|
|
|
preferWheels = true;
|
2024-03-24 08:23:07 +00:00
|
|
|
extras = ["*"];
|
2024-03-24 11:57:49 +00:00
|
|
|
editablePackageSources = {speedtest_logging = projectDir;};
|
2024-03-24 07:26:53 +00:00
|
|
|
})
|
|
|
|
poetry
|
|
|
|
];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|