Add fastf1 python dependency

This commit is contained in:
2024-09-22 22:00:38 +02:00
parent b4c459ffe7
commit 2e685ed646

View File

@ -5,19 +5,81 @@
inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.devshell.url = "github:numtide/devshell"; inputs.devshell.url = "github:numtide/devshell";
outputs = { self, nixpkgs, flake-utils, devshell }: outputs = {
flake-utils.lib.eachDefaultSystem (system: self,
let nixpkgs,
flake-utils,
devshell,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
overlays = [ devshell.overlays.default ]; overlays = [devshell.overlays.default];
}; };
myPython = pkgs.python311.withPackages (p: with p; [ timple = pkgs.python311Packages.buildPythonPackage rec {
pname = "timple";
version = "0.1.8";
src = pkgs.python311Packages.fetchPypi {
inherit pname version;
hash = "sha256-u8EgMA8BA6OpPlSg0ASRxLcIcv5psRIEcBpIicagXw8=";
};
doCheck = false;
pyproject = false;
# Build time deps
nativeBuildInputs = with pkgs.python311Packages; [
setuptools
];
# Run time deps
dependencies = with pkgs.python311Packages; [
matplotlib
numpy
];
};
fastf1 = pkgs.python311Packages.buildPythonPackage rec {
pname = "fastf1";
version = "3.4.0";
src = pkgs.python311Packages.fetchPypi {
inherit pname version;
hash = "sha256-rCjJaM0W2m9Yk3dhHkMOdIqPiKtVqoXuELBasmA9ybA=";
};
doCheck = false;
pyproject = true;
# Build time deps
nativeBuildInputs = with pkgs.python311Packages; [
hatchling
hatch-vcs
];
# Run time deps
dependencies = with pkgs.python311Packages; [
matplotlib
numpy
pandas
python-dateutil
requests
requests-cache
scipy
rapidfuzz
websockets
timple
];
};
myPython = pkgs.python311.withPackages (p:
with p; [
# Basic # Basic
rich rich
numpy
# Web # Web
flask flask
@ -25,7 +87,21 @@
sqlalchemy sqlalchemy
requests requests
# Test
pytest pytest
fastf1
# TODO: For some reason, listing those under fastf1.dependencies doesn't work???
matplotlib
numpy
pandas
python-dateutil
requests-cache
scipy
rapidfuzz
websockets
timple
]); ]);
in { in {
devShell = pkgs.devshell.mkShell { devShell = pkgs.devshell.mkShell {