From 3c08c1332494166beb96bf73b90da8417d9ed28a Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Sun, 26 May 2024 00:39:08 +0800 Subject: [PATCH 01/23] python3Packages.qrcode-terminal: init at 0.8 --- .../qrcode-terminal/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/qrcode-terminal/default.nix diff --git a/pkgs/development/python-modules/qrcode-terminal/default.nix b/pkgs/development/python-modules/qrcode-terminal/default.nix new file mode 100644 index 000000000000..2ec58510c707 --- /dev/null +++ b/pkgs/development/python-modules/qrcode-terminal/default.nix @@ -0,0 +1,38 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + qrcode, + pillow, +}: +buildPythonPackage rec { + pname = "qrcode-terminal"; + version = "0.8"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-Hitp5mK5NG6Y3ZWYMDPp1Dz/BkPYr9oSYF9RVCjmZsA="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + qrcode + pillow + ]; + + # have no test + doCheck = false; + + pythonImportsCheck = [ "qrcode_terminal" ]; + + meta = { + description = "Display QRCode in Terminal"; + homepage = "https://github.com/alishtory/qrcode-terminal"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ moraxyc ]; + mainProgram = "qrcode-terminal-py"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2134664da533..ad305c652a4e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12891,6 +12891,8 @@ self: super: with self; { qrcode = callPackage ../development/python-modules/qrcode { }; + qrcode-terminal = callPackage ../development/python-modules/qrcode-terminal { }; + qreactor = callPackage ../development/python-modules/qreactor { }; qscintilla-qt5 = pkgs.libsForQt5.callPackage ../development/python-modules/qscintilla-qt5 { From 46d0b37373766fd16896bae06f7306b18c2ec626 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Sun, 26 May 2024 00:39:51 +0800 Subject: [PATCH 02/23] python3Packages.bilibili-api-python: init at 16.2.0 --- .../bilibili-api-python/default.nix | 76 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 78 insertions(+) create mode 100644 pkgs/development/python-modules/bilibili-api-python/default.nix diff --git a/pkgs/development/python-modules/bilibili-api-python/default.nix b/pkgs/development/python-modules/bilibili-api-python/default.nix new file mode 100644 index 000000000000..259c912438c4 --- /dev/null +++ b/pkgs/development/python-modules/bilibili-api-python/default.nix @@ -0,0 +1,76 @@ +{ + aiohttp, + apscheduler, + beautifulsoup4, + brotli, + buildPythonPackage, + colorama, + fetchPypi, + httpx, + lib, + lxml, + pillow, + pycryptodomex, + pyyaml, + qrcode, + qrcode-terminal, + requests, + rsa, + setuptools, + setuptools-scm, + tqdm, + yarl, +}: +buildPythonPackage rec { + pname = "bilibili-api-python"; + version = "16.2.0"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-ecv9lzp2L13seBosahgnglaZP8YZCD/13nlTPP8LCs0="; + }; + + postPatch = '' + # The upstream uses requirements.txt, which overly strict version constraints. + substituteInPlace requirements.txt \ + --replace-fail "~=" ">=" + ''; + + build-system = [ + setuptools-scm + setuptools + ]; + + dependencies = [ + aiohttp + beautifulsoup4 + colorama + lxml + pyyaml + brotli + httpx + qrcode + requests + apscheduler + rsa + pillow + tqdm + yarl + pycryptodomex + qrcode-terminal + ]; + + # tests require network + doCheck = false; + + pythonImportsCheck = [ "bilibili_api" ]; + + meta = { + changelog = "https://github.com/Nemo2011/bilibili-api/releases/tag/${version}"; + description = "A python module providing convenient integration for various Bilibili API along with some additional common features"; + homepage = "https://nemo2011.github.io/bilibili-api"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ moraxyc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ad305c652a4e..961372a1e91d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1523,6 +1523,8 @@ self: super: with self; { biliass = callPackage ../development/python-modules/biliass { }; + bilibili-api-python = callPackage ../development/python-modules/bilibili-api-python { }; + billiard = callPackage ../development/python-modules/billiard { }; bimmer-connected = callPackage ../development/python-modules/bimmer-connected { }; From 37a42999fc81d7784dadecaf42d0ca94e47d3998 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Sun, 19 May 2024 23:43:45 +0800 Subject: [PATCH 03/23] python3Packages.llmx: init at 0.0.21a0 close #289897 --- .../python-modules/llmx/default.nix | 73 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 75 insertions(+) create mode 100644 pkgs/development/python-modules/llmx/default.nix diff --git a/pkgs/development/python-modules/llmx/default.nix b/pkgs/development/python-modules/llmx/default.nix new file mode 100644 index 000000000000..d5ddcfdaec42 --- /dev/null +++ b/pkgs/development/python-modules/llmx/default.nix @@ -0,0 +1,73 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools-scm, + setuptools, + pythonOlder, + pydantic, + openai, + tiktoken, + diskcache, + cohere, + google-auth, + typer, + pyyaml, + transformers, + fastapi, + uvicorn, + accelerate, +}: + +buildPythonPackage rec { + pname = "llmx"; + version = "0.0.21a0"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-OEo6wIaDTktzAsP0rOmhxjFSHygTR/EpcRI6AXsu+6M="; + }; + + disabled = pythonOlder "3.9"; + + build-system = [ + setuptools + setuptools-scm + ]; + + dependencies = [ + pydantic + openai + tiktoken + diskcache + cohere + google-auth + typer + pyyaml + ]; + + passthru.optional-dependencies = { + web = [ + fastapi + uvicorn + ]; + transformers = [ + accelerate + transformers + ] ++ transformers.optional-dependencies.torch; + }; + + # Tests of llmx try to access openai, google, etc. + doCheck = false; + + pythonImportsCheck = [ "llmx" ]; + + meta = with lib; { + description = "Library for LLM Text Generation"; + homepage = "https://github.com/victordibia/llmx"; + mainProgram = "llmx"; + license = licenses.mit; + maintainers = with maintainers; [ moraxyc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b772f9d51e7d..7b75a886712a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6943,6 +6943,8 @@ self: super: with self; { llm = callPackage ../development/python-modules/llm { }; + llmx = callPackage ../development/python-modules/llmx { }; + llvmlite = callPackage ../development/python-modules/llvmlite { # llvmlite always requires a specific version of llvm. llvm = pkgs.llvm_14; From 846ed7f3e0ee8e17e6c38a00638317e5c8be2c9c Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 26 May 2024 18:29:31 +0900 Subject: [PATCH 04/23] python311Packages.jupyter-client: 8.6.1 -> 8.6.2 Changelog: https://github.com/jupyter/jupyter_client/blob/v8.6.2/CHANGELOG.md --- .../development/python-modules/jupyter-client/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/jupyter-client/default.nix b/pkgs/development/python-modules/jupyter-client/default.nix index 0a43bcf920a7..bd5d8f298456 100644 --- a/pkgs/development/python-modules/jupyter-client/default.nix +++ b/pkgs/development/python-modules/jupyter-client/default.nix @@ -14,18 +14,18 @@ buildPythonPackage rec { pname = "jupyter-client"; - version = "8.6.1"; + version = "8.6.2"; pyproject = true; src = fetchPypi { pname = "jupyter_client"; inherit version; - hash = "sha256-6EJRXiurjhkYbYn9/qer0V453VgflOOZ8A4q9aFlLT8="; + hash = "sha256-K9oU1V7lulhVKoxTrkPSFa2YaIU0iSE/N9oGDO1U2N8="; }; - nativeBuildInputs = [ hatchling ]; + build-system = [ hatchling ]; - propagatedBuildInputs = [ + dependencies = [ jupyter-core python-dateutil pyzmq From 3bd44b0c64778ae117674a504efc0dd3313b8d17 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 26 May 2024 23:15:42 +0900 Subject: [PATCH 05/23] python311Packages.jupyter-client: add teams.jupyter as maintainers --- pkgs/development/python-modules/jupyter-client/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/jupyter-client/default.nix b/pkgs/development/python-modules/jupyter-client/default.nix index bd5d8f298456..82778299c799 100644 --- a/pkgs/development/python-modules/jupyter-client/default.nix +++ b/pkgs/development/python-modules/jupyter-client/default.nix @@ -43,5 +43,6 @@ buildPythonPackage rec { homepage = "https://github.com/jupyter/jupyter_client"; changelog = "https://github.com/jupyter/jupyter_client/blob/v${version}/CHANGELOG.md"; license = lib.licenses.bsd3; + maintainers = lib.teams.jupyter.members; }; } From f2a445353e4416935567c3d9da5dc7b5f60975e5 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 26 May 2024 18:29:55 +0900 Subject: [PATCH 06/23] python311Packages.jupyterhub: 4.1.5 -> 5.0.0 Changelog: https://github.com/jupyterhub/jupyterhub/blob/5.0.0/docs/source/reference/changelog.md --- .../python-modules/jupyterhub/default.nix | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/jupyterhub/default.nix b/pkgs/development/python-modules/jupyterhub/default.nix index 7a08e773646d..c95ccdba0cba 100644 --- a/pkgs/development/python-modules/jupyterhub/default.nix +++ b/pkgs/development/python-modules/jupyterhub/default.nix @@ -9,6 +9,7 @@ configurable-http-proxy, cryptography, entrypoints, + fetchFromGitHub, fetchPypi, fetchzip, importlib-metadata, @@ -27,6 +28,7 @@ pamela, playwright, prometheus-client, + pydantic, pytest-asyncio, pytestCheckHook, python-dateutil, @@ -67,14 +69,14 @@ in buildPythonPackage rec { pname = "jupyterhub"; - version = "4.1.5"; + version = "5.0.0"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-Y7ofxxhDbBUZRqWKO0A+xP6LP2JPsZW8HY5ww5sz4ZQ="; + hash = "sha256-YoR7OLGk9Pb/oPXzVfQRSoYbFrxF3lWg+4LfQo2kO3U="; }; # Most of this only applies when building from source (e.g. js/css assets are @@ -130,6 +132,7 @@ buildPythonPackage rec { packaging pamela prometheus-client + pydantic requests selenium sqlalchemy @@ -148,7 +151,18 @@ buildPythonPackage rec { mock jupyterlab playwright - pytest-asyncio + # 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; + rev = "refs/tags/v${final.version}"; + hash = "sha256-AVVvdo/CDF9IU6l779sLc7wKz5h3kzMttdDNTPLYxtQ="; + }; + } + )) pytestCheckHook requests-mock virtualenv From 8bef19fcbaba48915860093453c26dd1d2c1bb2e Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 26 May 2024 19:37:40 +0900 Subject: [PATCH 07/23] python311Packages.jupyterhub: refactor --- .../python-modules/jupyterhub/default.nix | 157 +++++++----------- 1 file changed, 57 insertions(+), 100 deletions(-) diff --git a/pkgs/development/python-modules/jupyterhub/default.nix b/pkgs/development/python-modules/jupyterhub/default.nix index c95ccdba0cba..543564b606ea 100644 --- a/pkgs/development/python-modules/jupyterhub/default.nix +++ b/pkgs/development/python-modules/jupyterhub/default.nix @@ -8,21 +8,18 @@ certipy, configurable-http-proxy, cryptography, - entrypoints, fetchFromGitHub, - fetchPypi, - fetchzip, + fetchNpmDeps, + idna, importlib-metadata, jinja2, jsonschema, - jupyter-telemetry, + jupyter-events, jupyterlab, - jupyter-core, - jupyter-server, mock, nbclassic, - nodePackages, - notebook, + nodejs, + npmHooks, oauthlib, packaging, pamela, @@ -35,121 +32,83 @@ pythonOlder, requests, requests-mock, - selenium, + setuptools, + setuptools-scm, sqlalchemy, tornado, traitlets, virtualenv, }: -let - # js/css assets that setup.py tries to fetch via `npm install` when building - # from source. https://github.com/jupyterhub/jupyterhub/blob/master/package.json - bootstrap = fetchzip { - url = "https://registry.npmjs.org/bootstrap/-/bootstrap-3.4.1.tgz"; - sha256 = "1ywmxqdccg0mgx0xknrn1hlrfnhcwphc12y9l91zizx26fqfmzgc"; - }; - font-awesome = fetchzip { - url = "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz"; - sha256 = "1xnxbdlfdd60z5ix152m8r2kk9dkwlqwpypky1mm3dv64ajnzdbk"; - }; - jquery = fetchzip { - url = "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz"; - sha256 = "0yi9ql493din1qa1s923nd5zvd0klk1sx00xj1wx2yambmq86vm9"; - }; - moment = fetchzip { - url = "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz"; - sha256 = "0ifzzla4zffw23g3xvhwx3fj3jny6cjzxfzl1x0317q8wa0c7w5i"; - }; - requirejs = fetchzip { - url = "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz"; - sha256 = "165hkli3qcd59cjqvli9r5f92i0h7czkmhcg1cgwamw2d0b7xibz"; - }; -in - buildPythonPackage rec { pname = "jupyterhub"; version = "5.0.0"; - format = "setuptools"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; - src = fetchPypi { - inherit pname version; - hash = "sha256-YoR7OLGk9Pb/oPXzVfQRSoYbFrxF3lWg+4LfQo2kO3U="; + src = fetchFromGitHub { + owner = "jupyterhub"; + repo = "jupyterhub"; + rev = "refs/tags/${version}"; + hash = "sha256-YGDbyWe3JSXbluOX6qyLqzl92Z/f5sD/5TPc2LR7W80="; }; - # Most of this only applies when building from source (e.g. js/css assets are - # pre-built and bundled in the official release tarball on pypi). - # - # Stuff that's always needed: - # * At runtime, we need configurable-http-proxy, so we substitute the store - # path. - # - # Other stuff that's only needed when building from source: - # * js/css assets are fetched from npm. - # * substitute store path for `lessc` commmand. - # * set up NODE_PATH so `lessc` can find `less-plugin-clean-css`. - # * don't run `npm install`. - preBuild = '' - export NODE_PATH=${nodePackages.less-plugin-clean-css}/lib/node_modules + npmDeps = fetchNpmDeps { + inherit src; + hash = "sha256-7G/Y2yaMi9cyf20/o8rLXKIE6SdZ74HSWJ3Wfypl4Cc="; + }; - substituteInPlace jupyterhub/proxy.py --replace \ + postPatch = '' + substituteInPlace jupyterhub/proxy.py --replace-fail \ "'configurable-http-proxy'" \ "'${configurable-http-proxy}/bin/configurable-http-proxy'" - substituteInPlace jupyterhub/tests/test_proxy.py --replace \ + substituteInPlace jupyterhub/tests/test_proxy.py --replace-fail \ "'configurable-http-proxy'" \ "'${configurable-http-proxy}/bin/configurable-http-proxy'" - - substituteInPlace setup.py --replace \ - "'npm'" "'true'" - - declare -A deps - deps[bootstrap]=${bootstrap} - deps[font-awesome]=${font-awesome} - deps[jquery]=${jquery} - deps[moment]=${moment} - deps[requirejs]=${requirejs} - - mkdir -p share/jupyter/hub/static/components - for dep in "''${!deps[@]}"; do - if [ ! -e share/jupyter/hub/static/components/$dep ]; then - cp -r ''${deps[$dep]} share/jupyter/hub/static/components/$dep - fi - done ''; - propagatedBuildInputs = [ - alembic - async-generator - certipy - python-dateutil - entrypoints - jinja2 - jupyter-telemetry - oauthlib - packaging - pamela - prometheus-client - pydantic - requests - selenium - sqlalchemy - tornado - traitlets - jupyter-core - jupyter-server - ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]; + nativeBuildInputs = [ + nodejs + npmHooks.npmConfigHook + ]; + + build-system = [ + setuptools + setuptools-scm + ]; + + dependencies = + [ + alembic + certipy + idna + jinja2 + jupyter-events + oauthlib + packaging + pamela + prometheus-client + pydantic + python-dateutil + requests + sqlalchemy + tornado + traitlets + ] + ++ lib.optionals (pythonOlder "3.10") [ + async-generator + importlib-metadata + ]; nativeCheckInputs = [ beautifulsoup4 cryptography - notebook jsonschema - nbclassic - mock jupyterlab + mock + nbclassic playwright # require pytest-asyncio<0.23 # https://github.com/jupyterhub/jupyterhub/pull/4663 @@ -169,9 +128,7 @@ buildPythonPackage rec { ]; preCheck = '' - substituteInPlace jupyterhub/tests/test_spawner.py --replace \ - "'jupyterhub-singleuser'" "'$out/bin/jupyterhub-singleuser'" - export PATH="$PATH:$out/bin"; + export PATH=$out/bin:$PATH; ''; disabledTests = [ @@ -209,7 +166,7 @@ buildPythonPackage rec { meta = with lib; { description = "Serves multiple Jupyter notebook instances"; - homepage = "https://jupyter.org/"; + homepage = "https://github.com/jupyterhub/jupyterhub"; changelog = "https://github.com/jupyterhub/jupyterhub/blob/${version}/docs/source/reference/changelog.md"; license = licenses.bsd3; maintainers = teams.jupyter.members; From d7cf5a7f731bc3d0df9410bb51359022acce42d4 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 26 May 2024 18:30:03 +0900 Subject: [PATCH 08/23] python311Packages.jupyterlab: 4.2.0 -> 4.2.1 Changelog: https://github.com/jupyterlab/jupyterlab/blob/v4.2.1/CHANGELOG.md --- pkgs/development/python-modules/jupyterlab/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/jupyterlab/default.nix b/pkgs/development/python-modules/jupyterlab/default.nix index 7668dae613fd..166a1bb82b3f 100644 --- a/pkgs/development/python-modules/jupyterlab/default.nix +++ b/pkgs/development/python-modules/jupyterlab/default.nix @@ -21,22 +21,22 @@ buildPythonPackage rec { pname = "jupyterlab"; - version = "4.2.0"; + version = "4.2.1"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-NW6SBaaiq2icR8j+SRnbpsB243bQPya6rcBXSMJDXdU="; + hash = "sha256-oQ+3EIWmkAggxi1DMkAFBGQC/8jw/eaWED43I4qDlQc="; }; - nativeBuildInputs = [ + build-system = [ hatch-jupyter-builder hatchling ]; - propagatedBuildInputs = [ + dependencies = [ async-lru httpx packaging From 5ec93285fd9580df6d6880dc5c51d159db977658 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 26 May 2024 18:30:09 +0900 Subject: [PATCH 09/23] python311Packages.jupyterlab-server: 2.27.1 -> 2.27.2 Changelog: https://github.com/jupyterlab/jupyterlab_server/blob/v2.27.2/CHANGELOG.md --- .../python-modules/jupyterlab-server/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/jupyterlab-server/default.nix b/pkgs/development/python-modules/jupyterlab-server/default.nix index 7aab011ea3b1..8926c561e8ef 100644 --- a/pkgs/development/python-modules/jupyterlab-server/default.nix +++ b/pkgs/development/python-modules/jupyterlab-server/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { pname = "jupyterlab-server"; - version = "2.27.1"; + version = "2.27.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -30,16 +30,16 @@ buildPythonPackage rec { src = fetchPypi { pname = "jupyterlab_server"; inherit version; - hash = "sha256-CXtaxwm2dscoSsnF43PxGTClYfUs1ahuT8flqcioYx0="; + hash = "sha256-FcuzSdxF6VTgm6z4G5+byxCBX/Zg+yA07NdBfbOn6ic="; }; postPatch = '' sed -i "/timeout/d" pyproject.toml ''; - nativeBuildInputs = [ hatchling ]; + build-system = [ hatchling ]; - propagatedBuildInputs = [ + dependencies = [ babel jinja2 json5 @@ -49,7 +49,7 @@ buildPythonPackage rec { requests ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]; - passthru.optional-dependencies = { + optional-dependencies = { openapi = [ openapi-core ruamel-yaml @@ -61,7 +61,7 @@ buildPythonPackage rec { pytestCheckHook requests-mock strict-rfc3339 - ] ++ passthru.optional-dependencies.openapi; + ] ++ optional-dependencies.openapi; preCheck = '' export HOME=$(mktemp -d) From 153047f419e75f793752300352f94afa1d1c000b Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 26 May 2024 18:30:28 +0900 Subject: [PATCH 10/23] python311Packages.nbclassic: 1.0.0 -> 1.1.0 --- pkgs/development/python-modules/nbclassic/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/nbclassic/default.nix b/pkgs/development/python-modules/nbclassic/default.nix index 6b9cfcd9ba6a..bd676abbac62 100644 --- a/pkgs/development/python-modules/nbclassic/default.nix +++ b/pkgs/development/python-modules/nbclassic/default.nix @@ -27,14 +27,14 @@ buildPythonPackage rec { pname = "nbclassic"; - version = "1.0.0"; + version = "1.1.0"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-CuEesjGUVdgFWWvzIDNs2pVUtB2Zq5o8Mb+BgL/6MOM="; + hash = "sha256-d7d7qF+emI+brYXfNFtRTp5kx/DoIpkqsd9KeKxk/B4="; }; propagatedBuildInputs = [ From 5f554e685382c4e24e9ea7f4855602debd3b0c59 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 26 May 2024 23:28:18 +0900 Subject: [PATCH 11/23] python311Packages.nbclassic: refactor --- .../python-modules/nbclassic/default.nix | 37 +++++-------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/pkgs/development/python-modules/nbclassic/default.nix b/pkgs/development/python-modules/nbclassic/default.nix index bd676abbac62..71cf418e13a2 100644 --- a/pkgs/development/python-modules/nbclassic/default.nix +++ b/pkgs/development/python-modules/nbclassic/default.nix @@ -1,34 +1,24 @@ { lib, - argon2-cffi, buildPythonPackage, fetchPypi, + babel, ipykernel, ipython-genutils, - jinja2, - jupyter-client, - jupyter-core, + jupyter-packaging, jupyter-server, - nbconvert, - nbformat, nest-asyncio, notebook-shim, - prometheus-client, pytest-jupyter, pytest-tornasync, pytestCheckHook, pythonOlder, - pyzmq, - send2trash, - terminado, - tornado, - traitlets, }: buildPythonPackage rec { pname = "nbclassic"; version = "1.1.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -37,24 +27,17 @@ buildPythonPackage rec { hash = "sha256-d7d7qF+emI+brYXfNFtRTp5kx/DoIpkqsd9KeKxk/B4="; }; - propagatedBuildInputs = [ - argon2-cffi + build-system = [ + babel + jupyter-packaging + jupyter-server + ]; + + dependencies = [ ipykernel ipython-genutils - jinja2 - jupyter-client - jupyter-core - jupyter-server - nbconvert - nbformat nest-asyncio notebook-shim - prometheus-client - pyzmq - send2trash - terminado - tornado - traitlets ]; nativeCheckInputs = [ From 1ad3022dd542ffb0990452c502c42fdb216cc67b Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 30 May 2024 17:08:18 +0200 Subject: [PATCH 12/23] knightos-scas: fix build on darwin --- pkgs/development/tools/knightos/scas/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/tools/knightos/scas/default.nix b/pkgs/development/tools/knightos/scas/default.nix index 221c5a0d12d5..e05953e87ec7 100644 --- a/pkgs/development/tools/knightos/scas/default.nix +++ b/pkgs/development/tools/knightos/scas/default.nix @@ -24,6 +24,11 @@ stdenv.mkDerivation rec { depsBuildBuild = lib.optionals isCrossCompiling [ buildPackages.knightos-scas ]; nativeBuildInputs = [ asciidoc libxslt.bin cmake ]; + + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ + "-Wno-error=implicit-function-declaration" + ]); + postInstall = '' cd .. make DESTDIR=$out install_man From 43b710215d004d8f5b3a872ad1e8fa17879ce57f Mon Sep 17 00:00:00 2001 From: "Matthieu C." <886074+teto@users.noreply.github.com> Date: Fri, 31 May 2024 15:52:30 +0200 Subject: [PATCH 13/23] hurl: add shell completions they were introduced in 4.3 --- pkgs/tools/networking/hurl/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/tools/networking/hurl/default.nix b/pkgs/tools/networking/hurl/default.nix index cd474a3e6f64..bb40d40896a7 100644 --- a/pkgs/tools/networking/hurl/default.nix +++ b/pkgs/tools/networking/hurl/default.nix @@ -39,6 +39,13 @@ rustPlatform.buildRustPackage rec { postInstall = '' installManPage docs/manual/hurl.1 docs/manual/hurlfmt.1 + installShellCompletion --cmd hurl \ + --bash completions/hurl.bash \ + --zsh completions/_hurl \ + --fish completions/hurl.fish + + installShellCompletion --cmd hurlfmt \ + --zsh completions/_hurlfmt ''; meta = with lib; { From e8ebedab9c0c1db034e005b51c5cc5cb007f995c Mon Sep 17 00:00:00 2001 From: "Matthieu C." <886074+teto@users.noreply.github.com> Date: Fri, 31 May 2024 16:04:08 +0200 Subject: [PATCH 14/23] hurl: moved to pkgs/by-name --- .../networking/hurl/default.nix => by-name/hu/hurl/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{tools/networking/hurl/default.nix => by-name/hu/hurl/package.nix} (100%) diff --git a/pkgs/tools/networking/hurl/default.nix b/pkgs/by-name/hu/hurl/package.nix similarity index 100% rename from pkgs/tools/networking/hurl/default.nix rename to pkgs/by-name/hu/hurl/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2e023ef95976..598f74de52fa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9011,8 +9011,6 @@ with pkgs; hue-plus = libsForQt5.callPackage ../applications/misc/hue-plus { }; - hurl = callPackage ../tools/networking/hurl { }; - hubicfuse = callPackage ../tools/filesystems/hubicfuse { }; humanfriendly = with python3Packages; toPythonApplication humanfriendly; From 6a88c78a443a23a97e9f9c41fb710887f291bf9a Mon Sep 17 00:00:00 2001 From: emilylange Date: Fri, 31 May 2024 20:36:06 +0200 Subject: [PATCH 15/23] chromedriver: 125.0.6422.78 -> 125.0.6422.141 --- .../networking/browsers/chromium/upstream-info.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.nix b/pkgs/applications/networking/browsers/chromium/upstream-info.nix index facc0227abd0..1388ac5437e2 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.nix +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.nix @@ -1,11 +1,11 @@ { stable = { chromedriver = { - hash_darwin = "sha256-1gi+hWrVL+mBB8pHMXnX/8kzRCQqGuut/+wO/9yBABs="; + hash_darwin = "sha256-Zz2U5zQWScID7rAE6FmTADecs4zR430KZVen+hsl+KI="; hash_darwin_aarch64 = - "sha256-skYFjXBvv+2u/K770Dd3uxFYFer6GGx/EgWfAgzE9pI="; - hash_linux = "sha256-67rXlDJeDSpcpEhNQq0rVS2bSWPy3GXVnTo6dwKAnZU="; - version = "125.0.6422.78"; + "sha256-NhnJdnrzTj8gQiyp4PzmXHx6ltsxUVrz0AL9x8nGibA="; + hash_linux = "sha256-iyhxx7KIpGPMYgf/I1hLUK8M49kWmgTy+UOXf5WBEWY="; + version = "125.0.6422.141"; }; deps = { gn = { From a329a6cdb65cec65bdaa68f90d0bbd4d71e72e0b Mon Sep 17 00:00:00 2001 From: emilylange Date: Fri, 31 May 2024 20:37:00 +0200 Subject: [PATCH 16/23] chromium: 125.0.6422.112 -> 125.0.6422.141 https://chromereleases.googleblog.com/2024/05/stable-channel-update-for-desktop_30.html This update includes 11 security fixes. CVEs: CVE-2024-5493 CVE-2024-5494 CVE-2024-5495 CVE-2024-5496 CVE-2024-5497 CVE-2024-5498 CVE-2024-5499 --- .../networking/browsers/chromium/upstream-info.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.nix b/pkgs/applications/networking/browsers/chromium/upstream-info.nix index 1388ac5437e2..99b7e4d8cd73 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.nix +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.nix @@ -15,8 +15,8 @@ version = "2024-04-10"; }; }; - hash = "sha256-EA8TzemtndFb8qAp4XWNjwWmNRz/P4Keh3k1Cn9qLEU="; - version = "125.0.6422.112"; + hash = "sha256-8Qe1hgDEjvdAf2ao4CIieC7l2pTSIPLTZb+vdctUEo0="; + version = "125.0.6422.141"; }; ungoogled-chromium = { deps = { From 34b9d656bdf1fd0a8edf9b08ba2313f3ad84ee7d Mon Sep 17 00:00:00 2001 From: isabel Date: Fri, 31 May 2024 19:47:49 +0100 Subject: [PATCH 17/23] auto-cpufreq: 1.9.9 -> 2.3.0 --- pkgs/tools/system/auto-cpufreq/default.nix | 73 +++++- .../auto-cpufreq/fix-version-output.patch | 22 +- .../prevent-install-and-copy.patch | 241 +++++++++--------- .../system/auto-cpufreq/prevent-update.patch | 184 +++++++++---- 4 files changed, 331 insertions(+), 189 deletions(-) diff --git a/pkgs/tools/system/auto-cpufreq/default.nix b/pkgs/tools/system/auto-cpufreq/default.nix index 4c15908eab19..4121096359c8 100644 --- a/pkgs/tools/system/auto-cpufreq/default.nix +++ b/pkgs/tools/system/auto-cpufreq/default.nix @@ -1,17 +1,43 @@ -{ lib, python3Packages, fetchFromGitHub, substituteAll }: - +{ + lib, + python3Packages, + fetchFromGitHub, + substituteAll, + gobject-introspection, + wrapGAppsHook3, + gtk3, +}: python3Packages.buildPythonPackage rec { pname = "auto-cpufreq"; - version = "1.9.9"; + version = "2.3.0"; + format = "pyproject"; src = fetchFromGitHub { owner = "AdnanHodzic"; - repo = pname; + repo = "auto-cpufreq"; rev = "v${version}"; - sha256 = "sha256-D/5pwE2V+yXj92ECOUcl/dajMDbvVdz9YNJrl2Pzvts="; + hash = "sha256-Bet/WOVveLIA+0Mvly4AsielR+r/AJXIgHdWrtc7i/U="; }; - propagatedBuildInputs = with python3Packages; [ setuptools-git-versioning click distro psutil ]; + nativeBuildInputs = [ + gobject-introspection + wrapGAppsHook3 + ]; + + buildInputs = [ + gtk3 + python3Packages.poetry-core + ]; + + propagatedBuildInputs = with python3Packages; [ + click + distro + psutil + pygobject3 + poetry-dynamic-versioning + setuptools + pyinotify + ]; doCheck = false; pythonImportsCheck = [ "auto_cpufreq" ]; @@ -29,21 +55,46 @@ python3Packages.buildPythonPackage rec { ./prevent-update.patch ]; + postPatch = '' + substituteInPlace auto_cpufreq/core.py \ + --replace-fail '/opt/auto-cpufreq/override.pickle' /var/run/override.pickle + substituteInPlace scripts/org.auto-cpufreq.pkexec.policy \ + --replace-fail "/opt/auto-cpufreq/venv/bin/auto-cpufreq" $out/bin/auto-cpufreq + substituteInPlace auto_cpufreq/gui/app.py auto_cpufreq/gui/objects.py \ + --replace-fail "/usr/local/share/auto-cpufreq/images/icon.png" $out/share/pixmaps/auto-cpufreq.png + substituteInPlace auto_cpufreq/gui/app.py \ + --replace-fail "/usr/local/share/auto-cpufreq/scripts/style.css" $out/share/auto-cpufreq/scripts/style.css + ''; + postInstall = '' # copy script manually cp ${src}/scripts/cpufreqctl.sh $out/bin/cpufreqctl.auto-cpufreq + # copy css file + mkdir -p $out/share/auto-cpufreq/scripts + cp scripts/style.css $out/share/auto-cpufreq/scripts/style.css + # systemd service mkdir -p $out/lib/systemd/system cp ${src}/scripts/auto-cpufreq.service $out/lib/systemd/system + + # desktop icon + mkdir -p $out/share/applications + mkdir $out/share/pixmaps + cp scripts/auto-cpufreq-gtk.desktop $out/share/applications + cp images/icon.png $out/share/pixmaps/auto-cpufreq.python3Packages + + # polkit policy + mkdir -p $out/share/polkit-1/actions + cp scripts/org.auto-cpufreq.pkexec.policy $out/share/polkit-1/actions ''; - meta = with lib; { - mainProgram = "${pname}"; + meta = { + mainProgram = "auto-cpufreq"; homepage = "https://github.com/AdnanHodzic/auto-cpufreq"; description = "Automatic CPU speed & power optimizer for Linux"; - license = licenses.lgpl3Plus; - platforms = platforms.linux; - maintainers = [ maintainers.Technical27 ]; + license = lib.licenses.lgpl3Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ Technical27 ]; }; } diff --git a/pkgs/tools/system/auto-cpufreq/fix-version-output.patch b/pkgs/tools/system/auto-cpufreq/fix-version-output.patch index fad9f091da40..be21ca889081 100644 --- a/pkgs/tools/system/auto-cpufreq/fix-version-output.patch +++ b/pkgs/tools/system/auto-cpufreq/fix-version-output.patch @@ -1,19 +1,17 @@ diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py -index 99397a9..f3ef28f 100755 +index 58cedb7..89e77a4 100755 --- a/auto_cpufreq/core.py +++ b/auto_cpufreq/core.py -@@ -144,26 +144,10 @@ except PermissionError: - +@@ -136,26 +136,8 @@ except PermissionError: + # display running version of auto-cpufreq def app_version(): -+ print("auto-cpufreq version: @version@") -+ print("Git commit: v@version@") - +- - print("auto-cpufreq version: ", end="") - +- - # snap package - if os.getenv("PKG_MARKER") == "SNAP": -- print(getoutput("echo \(Snap\) $SNAP_VERSION")) +- print(getoutput(r"echo \(Snap\) $SNAP_VERSION")) - # aur package - elif dist_name in ["arch", "manjaro", "garuda"]: - aur_pkg_check = call("pacman -Qs auto-cpufreq > /dev/null", shell=True) @@ -28,6 +26,8 @@ index 99397a9..f3ef28f 100755 - except Exception as e: - print(repr(e)) - pass - def verify_update(): - # Specify the repository and package name - # IT IS IMPORTANT TO THAT IF THE REPOSITORY STRUCTURE IS CHANGED, THE FOLLOWING FUNCTION NEEDS TO BE UPDATED ACCORDINGLY \ No newline at end of file ++ print("auto-cpufreq version: @version@") ++ print("Git commit: v@version@") + + def check_for_update(): + # returns True if a new release is available from the GitHub repo diff --git a/pkgs/tools/system/auto-cpufreq/prevent-install-and-copy.patch b/pkgs/tools/system/auto-cpufreq/prevent-install-and-copy.patch index 9b5bffb5591e..2b3c9de1b6b0 100644 --- a/pkgs/tools/system/auto-cpufreq/prevent-install-and-copy.patch +++ b/pkgs/tools/system/auto-cpufreq/prevent-install-and-copy.patch @@ -1,123 +1,8 @@ -diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py -index 99397a9..48a377a 100755 ---- a/auto_cpufreq/core.py -+++ b/auto_cpufreq/core.py -@@ -350,30 +334,13 @@ def get_current_gov(): - - - def cpufreqctl(): -- """ -- deploy cpufreqctl script -- """ -- -- # detect if running on a SNAP -- if os.getenv("PKG_MARKER") == "SNAP": -- pass -- else: -- # deploy cpufreqctl.auto-cpufreq script -- if not os.path.isfile("/usr/local/bin/cpufreqctl.auto-cpufreq"): -- shutil.copy(SCRIPTS_DIR / "cpufreqctl.sh", "/usr/local/bin/cpufreqctl.auto-cpufreq") -+ # scripts are already in the correct place -+ pass - - - def cpufreqctl_restore(): -- """ -- remove cpufreqctl.auto-cpufreq script -- """ -- # detect if running on a SNAP -- if os.getenv("PKG_MARKER") == "SNAP": -- pass -- else: -- if os.path.isfile("/usr/local/bin/cpufreqctl.auto-cpufreq"): -- os.remove("/usr/local/bin/cpufreqctl.auto-cpufreq") -- -+ # no need to restore -+ pass - - def footer(l=79): - print("\n" + "-" * l + "\n") -@@ -400,30 +367,8 @@ def remove_complete_msg(): - - - def deploy_daemon(): -- print("\n" + "-" * 21 + " Deploying auto-cpufreq as a daemon " + "-" * 22 + "\n") -- -- # deploy cpufreqctl script func call -- cpufreqctl() -- -- # turn off bluetooth on boot -- bluetooth_disable() -- -- auto_cpufreq_stats_path.touch(exist_ok=True) -- -- print("\n* Deploy auto-cpufreq install script") -- shutil.copy(SCRIPTS_DIR / "auto-cpufreq-install.sh", "/usr/local/bin/auto-cpufreq-install") -- -- print("\n* Deploy auto-cpufreq remove script") -- shutil.copy(SCRIPTS_DIR / "auto-cpufreq-remove.sh", "/usr/local/bin/auto-cpufreq-remove") -- -- # output warning if gnome power profile is running -- gnome_power_detect_install() -- gnome_power_svc_disable() -- -- # output warning if TLP service is detected -- tlp_service_detect() -- -- call("/usr/local/bin/auto-cpufreq-install", shell=True) -+ # prevent needless copying and system changes -+ pass - - - def deploy_daemon_performance(): -@@ -463,40 +408,7 @@ def deploy_daemon_performance(): - - # remove auto-cpufreq daemon - def remove_daemon(): -- -- # check if auto-cpufreq is installed -- if not os.path.exists("/usr/local/bin/auto-cpufreq-remove"): -- print("\nauto-cpufreq daemon is not installed.\n") -- sys.exit(1) -- -- print("\n" + "-" * 21 + " Removing auto-cpufreq daemon " + "-" * 22 + "\n") -- -- # turn on bluetooth on boot -- bluetooth_enable() -- -- # output warning if gnome power profile is stopped -- gnome_power_rm_reminder() -- gnome_power_svc_enable() -- -- # run auto-cpufreq daemon remove script -- call("/usr/local/bin/auto-cpufreq-remove", shell=True) -- -- # remove auto-cpufreq-remove -- os.remove("/usr/local/bin/auto-cpufreq-remove") -- -- # delete override pickle if it exists -- if os.path.exists(governor_override_state): -- os.remove(governor_override_state) -- -- # delete stats file -- if auto_cpufreq_stats_path.exists(): -- if auto_cpufreq_stats_file is not None: -- auto_cpufreq_stats_file.close() -- -- auto_cpufreq_stats_path.unlink() -- -- # restore original cpufrectl script -- cpufreqctl_restore() -+ pass - - - def gov_check(): - -diff --git a/bin/auto-cpufreq b/bin/auto-cpufreq -index b89d925..b73974c 100755 ---- a/bin/auto-cpufreq -+++ b/bin/auto-cpufreq -@@ -189,41 +189,9 @@ +diff --git a/auto_cpufreq/bin/auto_cpufreq.py b/auto_cpufreq/bin/auto_cpufreq.py +index 4343b8d..dc286f6 100755 +--- a/auto_cpufreq/bin/auto_cpufreq.py ++++ b/auto_cpufreq/bin/auto_cpufreq.py +@@ -199,41 +199,9 @@ def main(config, daemon, debug, update, install, remove, live, log, monitor, sta print("https://github.com/AdnanHodzic/auto-cpufreq/#donate") footer() elif install: @@ -160,4 +45,118 @@ index b89d925..b73974c 100755 + print("remove is disabled in the nix package") elif update: root_check() - if os.getenv("PKG_MARKER") == "SNAP": \ No newline at end of file + custom_dir = "/opt/auto-cpufreq/source" +diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py +index 58cedb7..c50b0e1 100755 +--- a/auto_cpufreq/core.py ++++ b/auto_cpufreq/core.py +@@ -391,30 +391,13 @@ def get_current_gov(): + + + def cpufreqctl(): +- """ +- deploy cpufreqctl script +- """ +- +- # detect if running on a SNAP +- if os.getenv("PKG_MARKER") == "SNAP": +- pass +- else: +- # deploy cpufreqctl.auto-cpufreq script +- if not os.path.isfile("/usr/local/bin/cpufreqctl.auto-cpufreq"): +- shutil.copy(SCRIPTS_DIR / "cpufreqctl.sh", "/usr/local/bin/cpufreqctl.auto-cpufreq") ++ # scripts are already in the correct place ++ pass + + + def cpufreqctl_restore(): +- """ +- remove cpufreqctl.auto-cpufreq script +- """ +- # detect if running on a SNAP +- if os.getenv("PKG_MARKER") == "SNAP": +- pass +- else: +- if os.path.isfile("/usr/local/bin/cpufreqctl.auto-cpufreq"): +- os.remove("/usr/local/bin/cpufreqctl.auto-cpufreq") +- ++ # no need to restore ++ pass + + def footer(l=79): + print("\n" + "-" * l + "\n") +@@ -441,30 +424,8 @@ def remove_complete_msg(): + + + def deploy_daemon(): +- print("\n" + "-" * 21 + " Deploying auto-cpufreq as a daemon " + "-" * 22 + "\n") +- +- # deploy cpufreqctl script func call +- cpufreqctl() +- +- # turn off bluetooth on boot +- bluetooth_disable() +- +- auto_cpufreq_stats_path.touch(exist_ok=True) +- +- print("\n* Deploy auto-cpufreq install script") +- shutil.copy(SCRIPTS_DIR / "auto-cpufreq-install.sh", "/usr/local/bin/auto-cpufreq-install") +- +- print("\n* Deploy auto-cpufreq remove script") +- shutil.copy(SCRIPTS_DIR / "auto-cpufreq-remove.sh", "/usr/local/bin/auto-cpufreq-remove") +- +- # output warning if gnome power profile is running +- gnome_power_detect_install() +- gnome_power_svc_disable() +- +- # output warning if TLP service is detected +- tlp_service_detect() +- +- call("/usr/local/bin/auto-cpufreq-install", shell=True) ++ # prevent needless copying and system changes ++ pass + + + def deploy_daemon_performance(): +@@ -504,40 +465,7 @@ def deploy_daemon_performance(): + + # remove auto-cpufreq daemon + def remove_daemon(): +- +- # check if auto-cpufreq is installed +- if not os.path.exists("/usr/local/bin/auto-cpufreq-remove"): +- print("\nauto-cpufreq daemon is not installed.\n") +- sys.exit(1) +- +- print("\n" + "-" * 21 + " Removing auto-cpufreq daemon " + "-" * 22 + "\n") +- +- # turn on bluetooth on boot +- bluetooth_enable() +- +- # output warning if gnome power profile is stopped +- gnome_power_rm_reminder() +- gnome_power_svc_enable() +- +- # run auto-cpufreq daemon remove script +- call("/usr/local/bin/auto-cpufreq-remove", shell=True) +- +- # remove auto-cpufreq-remove +- os.remove("/usr/local/bin/auto-cpufreq-remove") +- +- # delete override pickle if it exists +- if os.path.exists(governor_override_state): +- os.remove(governor_override_state) +- +- # delete stats file +- if auto_cpufreq_stats_path.exists(): +- if auto_cpufreq_stats_file is not None: +- auto_cpufreq_stats_file.close() +- +- auto_cpufreq_stats_path.unlink() +- +- # restore original cpufrectl script +- cpufreqctl_restore() ++ pass + + + def gov_check(): diff --git a/pkgs/tools/system/auto-cpufreq/prevent-update.patch b/pkgs/tools/system/auto-cpufreq/prevent-update.patch index 10da9fec9785..840c7230313d 100644 --- a/pkgs/tools/system/auto-cpufreq/prevent-update.patch +++ b/pkgs/tools/system/auto-cpufreq/prevent-update.patch @@ -1,60 +1,152 @@ -diff --git a/requirements.txt b/requirements.txt -index f492cac..e61d1a4 100755 ---- a/requirements.txt -+++ b/requirements.txt -@@ -2,4 +2,3 @@ - psutil - click - distro --requests - -diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py -index 99397a9..697fb68 100755 ---- a/auto_cpufreq/core.py -+++ b/auto_cpufreq/core.py -@@ -18,7 +18,6 @@ from math import isclose - from pathlib import Path - from shutil import which - from subprocess import getoutput, call, run, check_output, DEVNULL --import requests - import re - - # execution timestamp used in countdown func - -diff --git a/bin/auto-cpufreq b/bin/auto-cpufreq -index b89d925..b73974c 100755 ---- a/bin/auto-cpufreq -+++ b/bin/auto-cpufreq -@@ -193,31 +193,7 @@ - elif remove: - print("remove is disabled in the nix package") +diff --git a/auto_cpufreq/bin/auto_cpufreq.py b/auto_cpufreq/bin/auto_cpufreq.py +index 4343b8d..183c2e9 100755 +--- a/auto_cpufreq/bin/auto_cpufreq.py ++++ b/auto_cpufreq/bin/auto_cpufreq.py +@@ -235,47 +235,7 @@ def main(config, daemon, debug, update, install, remove, live, log, monitor, sta + remove_daemon() + remove_complete_msg() elif update: - root_check() +- custom_dir = "/opt/auto-cpufreq/source" +- for arg in sys.argv: +- if arg.startswith("--update="): +- custom_dir = arg.split("=")[1] +- sys.argv.remove(arg) +- +- if "--update" in sys.argv: +- update = True +- sys.argv.remove("--update") +- if len(sys.argv) == 2: +- custom_dir = sys.argv[1] +- - if os.getenv("PKG_MARKER") == "SNAP": - print("Detected auto-cpufreq was installed using snap") - # refresh snap directly using this command +- # path wont work in this case - - print("Please update using snap package manager, i.e: `sudo snap refresh auto-cpufreq`.") - #check for AUR -- elif subprocess.run(["bash", "-c", "command -v yay >/dev/null 2>&1"]).returncode == 0 or subprocess.run(["bash", "-c", "command -v pacman >/dev/null 2>&1"]).returncode == 0: +- elif subprocess.run(["bash", "-c", "command -v pacman >/dev/null 2>&1"]).returncode == 0 and subprocess.run(["bash", "-c", "pacman -Q auto-cpufreq >/dev/null 2>&1"]).returncode == 0: - print("Arch-based distribution with AUR support detected. Please refresh auto-cpufreq using your AUR helper.") - else: -- verify_update() -- ans = input ("Do you want to update auto-cpufreq to the latest release? [y/n]: ") -- valid_options = ['y', 'Y', 'yes', 'YES', 'Yes'] -- if ans.lower() in valid_options: +- is_new_update = check_for_update() +- if not is_new_update: +- return +- ans = input("Do you want to update auto-cpufreq to the latest release? [Y/n]: ").strip().lower() +- if not os.path.exists(custom_dir): +- os.makedirs(custom_dir) +- if os.path.exists(os.path.join(custom_dir, "auto-cpufreq")): +- shutil.rmtree(os.path.join(custom_dir, "auto-cpufreq")) +- if ans in ['', 'y', 'yes']: - remove_daemon() - remove_complete_msg() -- new_update() +- new_update(custom_dir) +- print("enabling daemon") +- run(["auto-cpufreq", "--install"]) +- print("auto-cpufreq is installed with the latest version") +- run(["auto-cpufreq", "--version"]) - else: -- print("incorrect input\n") - print("Aborted") -- print("enabling daemon") -- run(["auto-cpufreq", "--install"]) -- print("auto-cpufreq is installed with the latest version") -- app_version() -- -+ print("update is disabled in the nix package") - - - if __name__ == "__main__": \ No newline at end of file ++ print("update is disabled in the nix package") + + elif completions: + if completions == "bash": +diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py +index 58cedb7..8b44712 100755 +--- a/auto_cpufreq/core.py ++++ b/auto_cpufreq/core.py +@@ -17,8 +17,7 @@ import importlib.metadata + from math import isclose + from pathlib import Path + from shutil import which +-from subprocess import getoutput, call, run, check_output, DEVNULL +-import requests ++from subprocess import getoutput, call, run, DEVNULL + import re + + # execution timestamp used in countdown func +@@ -158,55 +157,7 @@ def app_version(): + pass + + def check_for_update(): +- # returns True if a new release is available from the GitHub repo +- +- # Specify the repository and package name +- # IT IS IMPORTANT TO THAT IF THE REPOSITORY STRUCTURE IS CHANGED, THE FOLLOWING FUNCTION NEEDS TO BE UPDATED ACCORDINGLY +- # Fetch the latest release information from GitHub API +- latest_release_url = f"https://api.github.com/repos/AdnanHodzic/auto-cpufreq/releases/latest" +- try: +- response = requests.get(latest_release_url) +- if response.status_code == 200: +- latest_release = response.json() +- else: +- message = response.json().get("message") +- print("Error fetching recent release!") +- if message is not None and message.startswith("API rate limit exceeded"): +- print("GitHub Rate limit exceeded. Please try again later within 1 hour or use different network/VPN.") +- else: +- print("Unexpected status code:", response.status_code) +- return False +- except (requests.exceptions.ConnectionError, requests.exceptions.Timeout, +- requests.exceptions.RequestException, requests.exceptions.HTTPError) as err: +- print("Error Connecting to server!") +- return False +- +- latest_version = latest_release.get("tag_name") +- +- if latest_version is not None: +- # Get the current version of auto-cpufreq +- # Extract version number from the output string +- output = check_output(['auto-cpufreq', '--version']).decode('utf-8') +- try: +- version_line = next((re.search(r'\d+\.\d+\.\d+', line).group() for line in output.split('\n') if line.startswith('auto-cpufreq version')), None) +- except AttributeError: +- print("Error Retrieving Current Version!") +- exit(1) +- installed_version = "v" + version_line +- #Check whether the same is installed or not +- # Compare the latest version with the installed version and perform update if necessary +- if latest_version == installed_version: +- print("auto-cpufreq is up to date") +- return False +- else: +- print(f"Updates are available,\nCurrent version: {installed_version}\nLatest version: {latest_version}") +- print("Note that your previous custom settings might be erased with the following update") +- return True +- else: +- # Handle the case where "tag_name" key doesn't exist +- print("Malformed Released data!\nReinstall manually or Open an issue on GitHub for help!") +- +- ++ pass + + def new_update(custom_dir): + os.chdir(custom_dir) +diff --git a/poetry.lock b/poetry.lock +index 2a99ca6..9bc26e2 100644 +--- a/poetry.lock ++++ b/poetry.lock +@@ -1,4 +1,4 @@ +-# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. ++# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. + + [[package]] + name = "attrs" +@@ -1300,4 +1300,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p + [metadata] + lock-version = "2.0" + python-versions = "^3.8" +-content-hash = "ee73b2db6a43cac87120f38c93d0a8a297bec52f1346b55bc0ca2992aa464482" ++content-hash = "1ba0c404ffea01a611e7c74f9c104de44a914b0a6fad2350470f15880931ae42" +diff --git a/pyproject.toml b/pyproject.toml +index 876d80c..7190356 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -25,7 +25,6 @@ python = "^3.8" + psutil = {git = "https://github.com/giampaolo/psutil.git", rev = "4cf56e08c1bc883ec89758834b50954380759858"} + click = "^8.1.0" + distro = "^1.8.0" +-requests = "^2.31.0" + PyGObject = "^3.46.0" + pyinotify = {git = "https://github.com/shadeyg56/pyinotify-3.12"} + From aa31715677f0ff3d0c4b430d65c4a7ff8f0eb768 Mon Sep 17 00:00:00 2001 From: isabel Date: Fri, 31 May 2024 19:49:11 +0100 Subject: [PATCH 18/23] auto-cpufreq: move to pkgs/by-name --- .../system => by-name/au}/auto-cpufreq/fix-version-output.patch | 0 .../default.nix => by-name/au/auto-cpufreq/package.nix} | 0 .../au}/auto-cpufreq/prevent-install-and-copy.patch | 0 .../system => by-name/au}/auto-cpufreq/prevent-update.patch | 0 pkgs/top-level/all-packages.nix | 2 -- 5 files changed, 2 deletions(-) rename pkgs/{tools/system => by-name/au}/auto-cpufreq/fix-version-output.patch (100%) rename pkgs/{tools/system/auto-cpufreq/default.nix => by-name/au/auto-cpufreq/package.nix} (100%) rename pkgs/{tools/system => by-name/au}/auto-cpufreq/prevent-install-and-copy.patch (100%) rename pkgs/{tools/system => by-name/au}/auto-cpufreq/prevent-update.patch (100%) diff --git a/pkgs/tools/system/auto-cpufreq/fix-version-output.patch b/pkgs/by-name/au/auto-cpufreq/fix-version-output.patch similarity index 100% rename from pkgs/tools/system/auto-cpufreq/fix-version-output.patch rename to pkgs/by-name/au/auto-cpufreq/fix-version-output.patch diff --git a/pkgs/tools/system/auto-cpufreq/default.nix b/pkgs/by-name/au/auto-cpufreq/package.nix similarity index 100% rename from pkgs/tools/system/auto-cpufreq/default.nix rename to pkgs/by-name/au/auto-cpufreq/package.nix diff --git a/pkgs/tools/system/auto-cpufreq/prevent-install-and-copy.patch b/pkgs/by-name/au/auto-cpufreq/prevent-install-and-copy.patch similarity index 100% rename from pkgs/tools/system/auto-cpufreq/prevent-install-and-copy.patch rename to pkgs/by-name/au/auto-cpufreq/prevent-install-and-copy.patch diff --git a/pkgs/tools/system/auto-cpufreq/prevent-update.patch b/pkgs/by-name/au/auto-cpufreq/prevent-update.patch similarity index 100% rename from pkgs/tools/system/auto-cpufreq/prevent-update.patch rename to pkgs/by-name/au/auto-cpufreq/prevent-update.patch diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 79dca219819a..a3265306cea4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -40185,8 +40185,6 @@ with pkgs; ssh-tools = callPackage ../applications/misc/ssh-tools { }; - auto-cpufreq = callPackage ../tools/system/auto-cpufreq { }; - thermald = callPackage ../tools/system/thermald { }; therion = callPackage ../applications/misc/therion { }; From b797ef98ea2e7e2b6abcfde148f66956be8f2893 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 31 May 2024 19:31:36 +0000 Subject: [PATCH 19/23] thunderbird-unwrapped: 115.11.0 -> 115.11.1 --- .../networking/mailreaders/thunderbird/packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/thunderbird/packages.nix b/pkgs/applications/networking/mailreaders/thunderbird/packages.nix index 9406928ffba1..91f72a3e5a31 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird/packages.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird/packages.nix @@ -5,13 +5,13 @@ rec { thunderbird-115 = (buildMozillaMach rec { pname = "thunderbird"; - version = "115.11.0"; + version = "115.11.1"; application = "comm/mail"; applicationName = "Mozilla Thunderbird"; binaryName = pname; src = fetchurl { url = "mirror://mozilla/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.xz"; - sha512 = "002f783cff7f2b50d9a29f20061fe55a1f64487b38a18dcb49217c3d7b99c2852af842decbd0347939aaf4c4c73ae66a8b04527ccd1b6db7f87aab402cb84ca1"; + sha512 = "1a1f438c7047908788bc983aa681c3293ce02da006477b491a49ced5941433ca3381e01f76afc6bb5572415025acfd0fa657f063ef26b3a63646594c27202717"; }; extraPatches = [ # The file to be patched is different from firefox's `no-buildconfig-ffx90.patch`. From bcc65e5693e64fe477f97a267266bdd78cb36044 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 31 May 2024 20:19:20 +0000 Subject: [PATCH 20/23] pyright: 1.1.364 -> 1.1.365 --- pkgs/by-name/py/pyright/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/py/pyright/package.nix b/pkgs/by-name/py/pyright/package.nix index 12e7bebed001..388831d78dcb 100644 --- a/pkgs/by-name/py/pyright/package.nix +++ b/pkgs/by-name/py/pyright/package.nix @@ -1,13 +1,13 @@ { lib, buildNpmPackage, fetchFromGitHub, runCommand, jq }: let - version = "1.1.364"; + version = "1.1.365"; src = fetchFromGitHub { owner = "Microsoft"; repo = "pyright"; rev = "${version}"; - hash = "sha256-7XQ/DGba00sEg/DxcKuX2ehc4V96557yvtGXFFyHD74="; + hash = "sha256-plXNjT36xLmGftkLREsjKGHQWBGA12hIUOBCtTf8710="; }; patchedPackageJSON = runCommand "package.json" { } '' @@ -37,7 +37,7 @@ let pname = "pyright-internal"; inherit version src; sourceRoot = "${src.name}/packages/pyright-internal"; - npmDepsHash = "sha256-ce3338ugei4R7CYKn3676ijpgYKcuyY8CgkWbf8unKw="; + npmDepsHash = "sha256-oBpW4nEyiDGZhv+Yt0+yKg2xrLULpFjIOFRxIBLZ3bk="; dontNpmBuild = true; installPhase = '' runHook preInstall @@ -51,7 +51,7 @@ buildNpmPackage rec { inherit version src; sourceRoot = "${src.name}/packages/pyright"; - npmDepsHash = "sha256-E6txhG+1DNcAR9Nia8ggWL0tDaTXs9sF4je5nDqroys="; + npmDepsHash = "sha256-/P2rx7BgaHZPHBC3DO89JjYtPD5ri2goGmgCkGWfby4="; postPatch = '' chmod +w ../../ From b2510e1f8d8fa55927063d7aff11d56928052e4a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 31 May 2024 20:51:28 +0000 Subject: [PATCH 21/23] python311Packages.anywidget: 0.9.11 -> 0.9.12 --- pkgs/development/python-modules/anywidget/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/anywidget/default.nix b/pkgs/development/python-modules/anywidget/default.nix index dd45e8f4676e..03b41c11e251 100644 --- a/pkgs/development/python-modules/anywidget/default.nix +++ b/pkgs/development/python-modules/anywidget/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "anywidget"; - version = "0.9.11"; + version = "0.9.12"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-WN3tjobsJ84odgyUVzF2YxE9mvYIlH7mqNDstSiyLNw="; + hash = "sha256-JYVbJJbcZUE1a20mygyflSUgO7fPKBf4S5O/4/U8+B4="; }; # We do not need the jupyterlab build dependency, because we do not need to From a780947db72a642104b60dd28e5ff5c043afec3c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 31 May 2024 21:29:38 +0000 Subject: [PATCH 22/23] terraform-plugin-docs: 0.19.2 -> 0.19.3 --- pkgs/by-name/te/terraform-plugin-docs/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/te/terraform-plugin-docs/package.nix b/pkgs/by-name/te/terraform-plugin-docs/package.nix index 5e893a6e6e2d..32c8e7d57302 100644 --- a/pkgs/by-name/te/terraform-plugin-docs/package.nix +++ b/pkgs/by-name/te/terraform-plugin-docs/package.nix @@ -10,16 +10,16 @@ buildGoModule rec { pname = "terraform-plugin-docs"; - version = "0.19.2"; + version = "0.19.3"; src = fetchFromGitHub { owner = "hashicorp"; repo = "terraform-plugin-docs"; rev = "refs/tags/v${version}"; - sha256 = "sha256-1ZJPy/kRYKcwr/k/u8ux5Eo1LIkrNpVyXrd9ff+Na6I="; + sha256 = "sha256-UPTiIY2aW6XDmJnMb1ATNWe3BvZQnPL0BweC/gxtztQ="; }; - vendorHash = "sha256-dBDvh3aIHu8iGwFt+29SdCl1gICwO7LnxQ7Wux+2tOk="; + vendorHash = "sha256-ZSHCP0eZWCvSObbUOSl0ohiiX79MyGC2ALowzvMXMv4="; nativeBuildInputs = [ makeWrapper ]; From ffaf07420040a4413df8165cd4f39ee48fef35d1 Mon Sep 17 00:00:00 2001 From: networkException Date: Sat, 1 Jun 2024 03:07:23 +0200 Subject: [PATCH 23/23] ungoogled-chromium: 125.0.6422.112-1 -> 125.0.6422.141-1 https://chromereleases.googleblog.com/2024/05/stable-channel-update-for-desktop_30.html This update includes 11 security fixes. CVEs: CVE-2024-5493 CVE-2024-5494 CVE-2024-5495 CVE-2024-5496 CVE-2024-5497 CVE-2024-5498 CVE-2024-5499 --- .../networking/browsers/chromium/upstream-info.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.nix b/pkgs/applications/networking/browsers/chromium/upstream-info.nix index 99b7e4d8cd73..feba3721ba63 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.nix +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.nix @@ -27,11 +27,11 @@ version = "2024-04-10"; }; ungoogled-patches = { - hash = "sha256-vHnXIrDdHGIe8byb41CiEWq3FPTecKg006dU7+iESKA="; - rev = "125.0.6422.112-1"; + hash = "sha256-ZYYizL3hFSEQUdDDZIvsEzidq5td+UoaWdertY/pqOc="; + rev = "125.0.6422.141-1"; }; }; - hash = "sha256-EA8TzemtndFb8qAp4XWNjwWmNRz/P4Keh3k1Cn9qLEU="; - version = "125.0.6422.112"; + hash = "sha256-8Qe1hgDEjvdAf2ao4CIieC7l2pTSIPLTZb+vdctUEo0="; + version = "125.0.6422.141"; }; }