initial commit

This commit is contained in:
Prunebutt 2025-10-13 17:32:48 +02:00
parent 6f2260e7f5
commit 1f3eb16391
4 changed files with 154 additions and 0 deletions

41
flake.nix Normal file
View file

@ -0,0 +1,41 @@
{
description = "Flake using pyproject.toml metadata";
inputs.pyproject-nix.url = "github:pyproject-nix/pyproject.nix";
inputs.pyproject-nix.inputs.nixpkgs.follows = "nixpkgs";
outputs =
{ nixpkgs, pyproject-nix, ... }:
let
inherit (nixpkgs) lib;
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
project = pyproject-nix.lib.project.loadPyproject {
projectRoot = ./.;
};
pythonAttr = "python3";
in
{
devShells = forAllSystems (system: {
default =
let
pkgs = nixpkgs.legacyPackages.${system};
python = pkgs.${pythonAttr};
pythonEnv = python.withPackages (project.renderers.withPackages { inherit python; });
in
pkgs.mkShell { packages = [ pythonEnv ]; };
});
packages = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
python = pkgs.${pythonAttr};
in
{
default = python.pkgs.buildPythonPackage (project.renderers.buildPythonPackage { inherit python; });
}
);
};
}