From 2e8a5f682f1a28b353c0996869b5932a693783b7 Mon Sep 17 00:00:00 2001 From: daspk04 Date: Sun, 19 Apr 2026 18:01:16 -0500 Subject: [PATCH 1/4] python3packages.sqlalchemy-adapter: init at 1.9.0 --- .../sqlalchemy-adapter/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/sqlalchemy-adapter/default.nix diff --git a/pkgs/development/python-modules/sqlalchemy-adapter/default.nix b/pkgs/development/python-modules/sqlalchemy-adapter/default.nix new file mode 100644 index 000000000000..0a2cbe6f46ff --- /dev/null +++ b/pkgs/development/python-modules/sqlalchemy-adapter/default.nix @@ -0,0 +1,49 @@ +{ + lib, + fetchFromGitHub, + buildPythonPackage, + + pycasbin, + sqlalchemy, + setuptools, + + pytestCheckHook, +}: +buildPythonPackage (finalAttrs: { + pname = "sqlalchemy-adapter"; + version = "1.9.0"; + pyproject = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "officialpycasbin"; + repo = "sqlalchemy-adapter"; + tag = "v${finalAttrs.version}"; + hash = "sha256-FjxRSJ+3IIdtKkpZvkL/KzH7gn4IJjCTchABglfcyQ4="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + pycasbin + sqlalchemy + ]; + + pythonImportsCheck = [ + "sqlalchemy_adapter" + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + meta = { + description = "SQLAlchemy Adapter for PyCasbin"; + homepage = "https://github.com/officialpycasbin/sqlalchemy-adapter"; + changelog = "https://github.com/apache/casbin-python-sqlalchemy-adapter/blob/${finalAttrs.src.tag}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ daspk04 ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2602606f955b..fa9bb11f7be5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18422,6 +18422,8 @@ self: super: with self; { sqlalchemy = callPackage ../development/python-modules/sqlalchemy { }; + sqlalchemy-adapter = callPackage ../development/python-modules/sqlalchemy-adapter { }; + sqlalchemy-citext = callPackage ../development/python-modules/sqlalchemy-citext { }; sqlalchemy-cockroachdb = callPackage ../development/python-modules/sqlalchemy-cockroachdb { }; From 50eed9773439b1cb72f35d010c82ed5726ec29bf Mon Sep 17 00:00:00 2001 From: daspk04 Date: Sun, 19 Apr 2026 18:02:32 -0500 Subject: [PATCH 2/4] python3packages.types-paramiko: init at 4.0.0.20250822 --- .../python-modules/types-paramiko/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/types-paramiko/default.nix diff --git a/pkgs/development/python-modules/types-paramiko/default.nix b/pkgs/development/python-modules/types-paramiko/default.nix new file mode 100644 index 000000000000..3a5525a8ce3c --- /dev/null +++ b/pkgs/development/python-modules/types-paramiko/default.nix @@ -0,0 +1,37 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + cryptography, +}: +buildPythonPackage (finalAttrs: { + pname = "types-paramiko"; + version = "4.0.0.20250822"; + pyproject = true; + __structuredAttrs = true; + + src = fetchPypi { + pname = "types_paramiko"; + inherit (finalAttrs) version; + hash = "sha256-G1awy9Puw9L9EjyesnBOYSt3fhWhdwWoBCeeplJeDFM="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + cryptography + ]; + + # Modules doesn't have tests + doCheck = false; + + pythonImportsCheck = [ "paramiko-stubs" ]; + + meta = { + description = "Typing stubs for paramiko"; + homepage = "https://github.com/python/typeshed"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ daspk04 ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fa9bb11f7be5..5807b8c03188 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -20387,6 +20387,8 @@ self: super: with self; { types-openpyxl = callPackage ../development/python-modules/types-openpyxl { }; + types-paramiko = callPackage ../development/python-modules/types-paramiko { }; + types-pillow = callPackage ../development/python-modules/types-pillow { }; types-protobuf = callPackage ../development/python-modules/types-protobuf { }; From 06877b0aaeb3fee9cbf44a3008a82ef61246245e Mon Sep 17 00:00:00 2001 From: daspk04 Date: Sun, 19 Apr 2026 18:33:26 -0500 Subject: [PATCH 3/4] skypilot: 0.8.1 -> 0.12.0 --- pkgs/by-name/sk/skypilot/package.nix | 253 +++++++++++++++++++++++---- 1 file changed, 223 insertions(+), 30 deletions(-) diff --git a/pkgs/by-name/sk/skypilot/package.nix b/pkgs/by-name/sk/skypilot/package.nix index 33092f7aa1dd..80319b78edfb 100644 --- a/pkgs/by-name/sk/skypilot/package.nix +++ b/pkgs/by-name/sk/skypilot/package.nix @@ -1,48 +1,240 @@ { lib, + pkgs, fetchFromGitHub, python3Packages, + buildNpmPackage, + writableTmpDirAsHomeHook, }: - -python3Packages.buildPythonApplication (finalAttrs: { +let pname = "skypilot"; - version = "0.8.1"; + version = "0.12.0"; src = fetchFromGitHub { owner = "skypilot-org"; repo = "skypilot"; - tag = "v${finalAttrs.version}"; - hash = "sha256-jLjYsBkb5Tba3q/mdqCWK04FLg0pEdHyZH3vuMIP6tg="; + tag = "v${version}"; + hash = "sha256-zxkduComvFuSbWnWSw1PYalGdVhiwCIjElXEg7VPw88="; }; + dashboard = buildNpmPackage { + inherit pname version src; + + sourceRoot = "${src.name}/sky/dashboard"; + npmDepsHash = "sha256-8uZzkDJkaDPFXXsGy29jkaw6g8bPe3drbboYHHa6YuU="; + + installPhase = '' + mkdir -p $out + cp -r out/* $out/ + ''; + }; +in +python3Packages.buildPythonApplication (finalAttrs: { + inherit pname version src; + pyproject = true; + pythonRelaxDeps = true; - build-system = with python3Packages; [ setuptools ]; + nativeBuildInputs = [ + writableTmpDirAsHomeHook + ]; - # when updating, please ensure package version constraints stipulaed - # in setup.py are met - propagatedBuildInputs = with python3Packages; [ - cachetools - click - colorama - cryptography - filelock - jinja2 - jsonschema - networkx - packaging - pandas - pendulum - prettytable - psutil - python-dotenv - pyyaml - pulp - requests - rich - tabulate - typing-extensions - wheel + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; + + postPatch = '' + substituteInPlace sky/setup_files/dependencies.py --replace-fail 'casbin' 'pycasbin' + substituteInPlace pyproject.toml --replace-fail 'buildkite-test-collector' "" + ''; + + build-system = with python3Packages; [ + setuptools + setuptools-scm + ]; + + # https://github.com/skypilot-org/skypilot/blob/master/sky/setup_files/dependencies.py + dependencies = + with python3Packages; + [ + aiohttp + aiofiles + aiosqlite + alembic + asyncpg + bcrypt + cachetools + click + colorama + cryptography + filelock + fastapi + gitpython + httpx + ijson + jinja2 + jsonschema + networkx + packaging + pandas + paramiko + passlib + pendulum + pip + prettytable + prometheus-client + psutil + psycopg2-binary + pycasbin + pydantic + pyjwt + python-dotenv + pyyaml + python-multipart + pulp + requests + rich + setproctitle + sqlalchemy + sqlalchemy-adapter + tabulate + types-paramiko + typing-extensions + uvicorn + wheel + ] + ++ aiohttp.optional-dependencies.speedups + ++ fastapi.optional-dependencies.all + ++ uvicorn.optional-dependencies.standard; + + optional-dependencies = + with python3Packages; + lib.fix (self: { + + all = with self; [ + aws + azure + cloudfare + docker + fluidstack + gcp + ibm + kubernates + lambda + paperspace + ray + remote + server + scp + ssh + vsphere + ]; + + aws = [ + awscli + boto3 + botocore + colorama + ]; + + azure = [ + azure-cli + azure-core + azure-identity + azure-mgmt-compute + azure-mgmt-network + azure-storage-blob + msgraph-sdk + ] + ++ self.ray; + + cloudfare = self.aws; + + # cudo = [cudo-compute]; + # + # do = [pydo azure-core azure-common]; + + docker = [ docker ]; + + fluidstack = [ ]; + + gcp = [ + google-api-python-client + google-cloud-storage + pyopenssl + ]; + + ibm = [ + ibm-cloud-sdk-core + # ibm-cos-sdk + # ibm-platform-services + # ibm-vpc + ] + ++ self.ray; + + kubernetes = [ + kubernetes + websockets + ]; + + lambda = [ ]; + + # nebius = [ + # nebius + # ] + # ++ self.aws; + + paperspace = [ ]; + + ray = [ ray ] ++ ray.optional-dependencies.default; + + remote = [ + grpcio + protobuf + ]; + + # runpod = [ runpod ]; + + server = [ + pycasbin + passlib + pyjwt + sqlalchemy-adapter + ]; + + scp = self.ray; + + ssh = self.kubernetes; + + # vast = [vastai-sdk]; + + vsphere = [ + pyvmomi + # vsphere-automation-sdk + ]; + }); + + postInstall = '' + mkdir -p $out/${python3Packages.python.sitePackages}/sky/dashboard/out + cp -r ${dashboard}/* $out/${python3Packages.python.sitePackages}/sky/dashboard/out/ + ''; + + # Excluding the tests as it fails with error: + # Message: 'Config loaded from /build/source/examples/admin_policy/restful_policy.yaml:\nadmin_policy: http://localhost:8080\n' + #Arguments: () + #--- Logging error --- + #Traceback (most recent call last): + # File "/nix/store/pzdalg368npikvpq4ncz2saxnz19v53k-python3-3.13.12/lib/python3.13/logging/__init__.py", line 1154, in emit + # stream.write(msg + self.terminator) + # ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ + #ValueError: I/O operation on closed file. + # nativeCheckInputs = with python3Packages; [ + # pytestCheckHook + # boto3 + # pytest-env + # pytest-xdist + # ]; + + pythonImportsCheck = [ + "sky" ]; meta = { @@ -53,6 +245,7 @@ python3Packages.buildPythonApplication (finalAttrs: { managed execution. ''; homepage = "https://github.com/skypilot-org/skypilot"; + changelog = "https://github.com/skypilot-org/skypilot/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ seanrmurphy ]; mainProgram = "sky"; From be48fe65306b17ff5712f2f8f0e3fdf30c97ac90 Mon Sep 17 00:00:00 2001 From: daspk04 Date: Sun, 19 Apr 2026 18:34:00 -0500 Subject: [PATCH 4/4] skypilot: add daspk04 to maintainers --- pkgs/by-name/sk/skypilot/package.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/sk/skypilot/package.nix b/pkgs/by-name/sk/skypilot/package.nix index 80319b78edfb..d48db1649d1a 100644 --- a/pkgs/by-name/sk/skypilot/package.nix +++ b/pkgs/by-name/sk/skypilot/package.nix @@ -247,7 +247,10 @@ python3Packages.buildPythonApplication (finalAttrs: { homepage = "https://github.com/skypilot-org/skypilot"; changelog = "https://github.com/skypilot-org/skypilot/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ seanrmurphy ]; + maintainers = with lib.maintainers; [ + seanrmurphy + daspk04 + ]; mainProgram = "sky"; }; })