feat: patent retrival and semi-processed

This commit is contained in:
2025-12-08 19:33:02 -05:00
parent b51f0596a3
commit 63a9889e5b
21 changed files with 301 additions and 54 deletions
+37 -32
View File
@@ -1,9 +1,8 @@
# flake.nix
{
description = "A Python development environment";
description = "Python dev env (NixOS 25.11) using project-local venv";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; # Pin to the nixos-25.11 channel
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
flake-utils.url = "github:numtide/flake-utils";
};
@@ -12,39 +11,45 @@
let
pkgs = nixpkgs.legacyPackages.${system};
# Define Python version and packages
pythonVersion = "python311"; # You can change this to python310, python312, etc.
pythonEnv = pkgs.${pythonVersion}; # Get the specific Python environment
pythonPackages = ps: with ps; [
# Core Python
#pkgs.${pythonVersion}
pythonEnv.pkgs.pip
pythonEnv.pkgs.setuptools
pythonEnv.pkgs.wheel
# Example useful packages (uncomment and add as needed)
# black # Code formatter
# ruff # Fast Python linter
# mypy # Static type checker
# ipython # Enhanced interactive Python shell
# venvwrapper # Virtual environment manager (can be useful even with Nix)
];
in
{
# Pick your Python version here
python = pkgs.python311; # or python312, etc.
in {
devShells.default = pkgs.mkShell {
name = "python-dev-shell";
name = "python-venv-shell";
packages = pythonPackages pkgs;
packages = [
python
pkgs.python311Packages.virtualenv # gives `virtualenv` tool
];
# Environment variables you might want to set
shellHook = ''
echo "Welcome to the Python development shell!"
export NIX_PROJECT_SHELL="SPARC"
echo "== Nix dev shell (Python $(python --version 2>&1)) =="
# Create a venv in .venv if it doesn't exist yet
if [ ! -d ".venv" ]; then
echo "Creating local virtualenv in .venv ..."
python -m venv .venv
fi
# Activate the venv
echo "Activating .venv"
. .venv/bin/activate
# Tell you what Python/pip you're using
echo "Using python: $(which python)"
echo "Using pip: $(which pip)"
# Install / update deps from requirements.txt *into .venv*
if [ -f "requirements.txt" ]; then
echo "Installing dependencies from requirements.txt into .venv ..."
pip install -r requirements.txt
else
echo "No requirements.txt found in $(pwd)"
fi
# Prompt tweak so you can see when venv is active
export PS1="(SPARC-venv) $PS1"
'';
};
}
);
});
}