From 3ee0f7be0c7d066e76a9dbbe4bf0ca87d1d68d16 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 3 May 2026 19:44:42 +0000 Subject: [PATCH 1/3] python3Packages.pamela: cleanup, fix darwin compat --- .../python-modules/pamela/default.nix | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/pamela/default.nix b/pkgs/development/python-modules/pamela/default.nix index 328865d0836f..dc801c163d64 100644 --- a/pkgs/development/python-modules/pamela/default.nix +++ b/pkgs/development/python-modules/pamela/default.nix @@ -1,26 +1,39 @@ { lib, + stdenv, buildPythonPackage, fetchPypi, pkgs, + + # build-system + setuptools, + setuptools-scm, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "pamela"; version = "1.2.0"; - format = "setuptools"; + pyproject = true; + __structuredAttrs = true; src = fetchPypi { - inherit pname version; + inherit (finalAttrs) pname version; hash = "sha256-DqbiqZ3e2Md4OkoG8tMfW9ytiU15EB6PCTIuOHo0qs8="; }; - postUnpack = '' - substituteInPlace $sourceRoot/pamela.py --replace \ - 'find_library("pam")' \ - '"${lib.getLib pkgs.pam}/lib/libpam.so"' + postPatch = '' + substituteInPlace pamela.py \ + --replace-fail \ + 'find_library("pam")' \ + '"${lib.getLib pkgs.pam}/lib/libpam${stdenv.hostPlatform.extensions.sharedLibrary}"' ''; + build-system = [ + setuptools + setuptools-scm + ]; + + # No tests doCheck = false; meta = { @@ -28,4 +41,4 @@ buildPythonPackage rec { homepage = "https://github.com/minrk/pamela"; license = lib.licenses.mit; }; -} +}) From e51d560682670eda28f1a1b72dc53ed29bfb6fec Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 3 May 2026 18:31:00 +0000 Subject: [PATCH 2/3] python3Packages.jupyterhub: 5.4.4 -> 5.4.5 --- .../python-modules/jupyterhub/default.nix | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/jupyterhub/default.nix b/pkgs/development/python-modules/jupyterhub/default.nix index 6f6456e96af6..b7b9109a7278 100644 --- a/pkgs/development/python-modules/jupyterhub/default.nix +++ b/pkgs/development/python-modules/jupyterhub/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, fetchNpmDeps, @@ -44,22 +45,25 @@ requests-mock, versionCheckHook, virtualenv, + # darwin-only + writableTmpDirAsHomeHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "jupyterhub"; - version = "5.4.4"; + version = "5.4.5"; pyproject = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "jupyterhub"; repo = "jupyterhub"; - tag = version; - hash = "sha256-c7xbZvq43YT8EE3rnuJDotIsD/pEgnQvJX8U46q6yq0="; + tag = finalAttrs.version; + hash = "sha256-MdwH9IAV12GqmWc0tfCUi2NA5sT0BFlwCr20JVRzduU="; }; npmDeps = fetchNpmDeps { - inherit src; + inherit (finalAttrs) src; hash = "sha256-64FRdLHBpnywpCLjsMoXmWp/tK00+QwNIR9yAoQFIbg="; }; @@ -114,22 +118,16 @@ buildPythonPackage rec { mock nbclassic playwright - # require pytest-asyncio<0.23 - # https://github.com/jupyterhub/jupyterhub/pull/4663 - (pytest-asyncio.overrideAttrs ( - final: prev: { - version = "0.21.2"; - src = fetchFromGitHub { - inherit (prev.src) owner repo; - tag = "v${final.version}"; - hash = "sha256-AVVvdo/CDF9IU6l779sLc7wKz5h3kzMttdDNTPLYxtQ="; - }; - } - )) + pytest-asyncio pytestCheckHook requests-mock versionCheckHook virtualenv + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # PermissionError: [Errno 13] Permission denied: + # '/private/tmp/temp_user_1/Library/Jupyter/runtime/jpserver-45402-open.html' + writableTmpDirAsHomeHook ]; disabledTests = [ @@ -165,15 +163,17 @@ buildPythonPackage rec { "jupyterhub/tests/test_user.py" ]; + __darwinAllowLocalNetworking = true; + meta = { description = "Serves multiple Jupyter notebook instances"; homepage = "https://github.com/jupyterhub/jupyterhub"; - changelog = "https://github.com/jupyterhub/jupyterhub/blob/${version}/docs/source/reference/changelog.md"; + changelog = "https://github.com/jupyterhub/jupyterhub/blob/${finalAttrs.src.tag}/docs/source/reference/changelog.md"; license = lib.licenses.bsd3; teams = [ lib.teams.jupyter ]; badPlatforms = [ # E OSError: dlopen(/nix/store/43zml0mlr17r5jsagxr00xxx91hz9lky-openpam-20170430/lib/libpam.so, 6): image not found - lib.systems.inspect.patterns.isDarwin + # lib.systems.inspect.patterns.isDarwin ]; }; -} +}) From b8b52d6c73904738672dbf43b3cec08e4e1ea270 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 3 May 2026 21:08:43 +0000 Subject: [PATCH 3/3] python3Packages.batchspawner: cleanup, fix on darwin --- .../python-modules/batchspawner/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/batchspawner/default.nix b/pkgs/development/python-modules/batchspawner/default.nix index a2b8d7cae909..d580f493c553 100644 --- a/pkgs/development/python-modules/batchspawner/default.nix +++ b/pkgs/development/python-modules/batchspawner/default.nix @@ -16,15 +16,16 @@ pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "batchspawner"; version = "1.3.0"; pyproject = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "jupyterhub"; repo = "batchspawner"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-Z7kB8b7s11wokTachLI/N+bdUV+FfCRTemL1KYQpzio="; }; @@ -54,12 +55,14 @@ buildPythonPackage rec { pythonImportsCheck = [ "batchspawner" ]; + __darwinAllowLocalNetworking = true; + meta = { description = "Spawner for Jupyterhub to spawn notebooks using batch resource managers"; mainProgram = "batchspawner-singleuser"; homepage = "https://github.com/jupyterhub/batchspawner"; - changelog = "https://github.com/jupyterhub/batchspawner/blob/v${version}/CHANGELOG.md"; + changelog = "https://github.com/jupyterhub/batchspawner/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.bsd3; maintainers = [ ]; }; -} +})