38 lines
1007 B
Nix
38 lines
1007 B
Nix
{
|
|
description = "Development flake for this python project";
|
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
python = pkgs.python312;
|
|
pythonPackages = pkgs.python312Packages;
|
|
|
|
projectDependencies = with pythonPackages; [
|
|
];
|
|
|
|
in {
|
|
devShells.default = pkgs.mkShell {
|
|
nativeBuildInputs = [ pkgs.bashInteractive ];
|
|
buildInputs = with pkgs; [
|
|
# Core python dependencies
|
|
python
|
|
pythonPackages.pip
|
|
pythonPackages.virtualenv
|
|
# IDE tools
|
|
pythonPackages.isort
|
|
nodePackages.pyright
|
|
# Development tools
|
|
black
|
|
pythonPackages.ipython
|
|
pythonPackages.pytest
|
|
pythonPackages.setuptools
|
|
] ++ projectDependencies;
|
|
|
|
};
|
|
});
|
|
}
|