diff --git a/nixos/tests/budgie.nix b/nixos/tests/budgie.nix index a6c40f6a9ab4..b003e1c65240 100644 --- a/nixos/tests/budgie.nix +++ b/nixos/tests/budgie.nix @@ -54,7 +54,8 @@ machine.succeed("xauth merge ${user.home}/.Xauthority") with subtest("Check that logging in has given the user ownership of devices"): - machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") + # Change back to /dev/snd/timer after systemd-258.1 + machine.succeed("getfacl -p /dev/dri/card0 | grep -q ${user.name}") with subtest("Check if Budgie session components actually start"): for i in ["budgie-daemon", "budgie-panel", "budgie-wm", "budgie-desktop-view", "gsd-media-keys"]: diff --git a/nixos/tests/cinnamon-wayland.nix b/nixos/tests/cinnamon-wayland.nix index d19ac920b388..e4118d82f4dd 100644 --- a/nixos/tests/cinnamon-wayland.nix +++ b/nixos/tests/cinnamon-wayland.nix @@ -42,7 +42,8 @@ machine.wait_for_file("/run/user/${toString user.uid}/wayland-0") with subtest("Check that logging in has given the user ownership of devices"): - machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") + # Change back to /dev/snd/timer after systemd-258.1 + machine.succeed("getfacl -p /dev/dri/card0 | grep -q ${user.name}") with subtest("Wait for the Cinnamon shell"): # Correct output should be (true, '2') diff --git a/nixos/tests/cinnamon.nix b/nixos/tests/cinnamon.nix index 9ff43a8dbbb7..1f8fb683efc7 100644 --- a/nixos/tests/cinnamon.nix +++ b/nixos/tests/cinnamon.nix @@ -53,7 +53,8 @@ machine.succeed("xauth merge ${user.home}/.Xauthority") with subtest("Check that logging in has given the user ownership of devices"): - machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") + # Change back to /dev/snd/timer after systemd-258.1 + machine.succeed("getfacl -p /dev/dri/card0 | grep -q ${user.name}") with subtest("Wait for the Cinnamon shell"): # Correct output should be (true, '2') diff --git a/nixos/tests/enlightenment.nix b/nixos/tests/enlightenment.nix index 77e731feddbf..41dfc754e7fe 100644 --- a/nixos/tests/enlightenment.nix +++ b/nixos/tests/enlightenment.nix @@ -42,7 +42,8 @@ machine.succeed("xauth merge ${user.home}/.Xauthority") with subtest("Check that logging in has given the user ownership of devices"): - machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") + # Change back to /dev/snd/timer after systemd-258.1 + machine.succeed("getfacl -p /dev/dri/card0 | grep -q ${user.name}") with subtest("First time wizard"): machine.wait_for_text("Default") # Language diff --git a/nixos/tests/gnome-extensions.nix b/nixos/tests/gnome-extensions.nix index bde20a8c95aa..66003daa09d9 100644 --- a/nixos/tests/gnome-extensions.nix +++ b/nixos/tests/gnome-extensions.nix @@ -105,7 +105,8 @@ # wait for alice to be logged in machine.wait_for_unit("default.target", "${user.name}") # check that logging in has given the user ownership of devices - assert "alice" in machine.succeed("getfacl -p /dev/snd/timer") + # Change back to /dev/snd/timer after systemd-258.1 + assert "alice" in machine.succeed("getfacl -p /dev/dri/card0") with subtest("Wait for GNOME Shell"): # correct output should be (true, 'false') diff --git a/nixos/tests/gnome-flashback.nix b/nixos/tests/gnome-flashback.nix index 6df6e621995e..46cb6402bbb1 100644 --- a/nixos/tests/gnome-flashback.nix +++ b/nixos/tests/gnome-flashback.nix @@ -46,7 +46,8 @@ machine.wait_for_file("${xauthority}") machine.succeed("xauth merge ${xauthority}") # Check that logging in has given the user ownership of devices - assert "alice" in machine.succeed("getfacl -p /dev/snd/timer") + # Change back to /dev/snd/timer after systemd-258.1 + assert "alice" in machine.succeed("getfacl -p /dev/dri/card0") with subtest("Wait for Metacity"): machine.wait_until_succeeds("pgrep metacity") diff --git a/nixos/tests/gnome-xorg.nix b/nixos/tests/gnome-xorg.nix index 82d3bf3e08ce..9e9fdc9bdb9f 100644 --- a/nixos/tests/gnome-xorg.nix +++ b/nixos/tests/gnome-xorg.nix @@ -83,7 +83,8 @@ machine.wait_for_file("${xauthority}") machine.succeed("xauth merge ${xauthority}") # Check that logging in has given the user ownership of devices - assert "alice" in machine.succeed("getfacl -p /dev/snd/timer") + # Change back to /dev/snd/timer after systemd-258.1 + assert "alice" in machine.succeed("getfacl -p /dev/dri/card0") with subtest("Wait for GNOME Shell"): # correct output should be (true, 'false') diff --git a/nixos/tests/gnome.nix b/nixos/tests/gnome.nix index 4d1b4c71ecd2..0bb2e7061133 100644 --- a/nixos/tests/gnome.nix +++ b/nixos/tests/gnome.nix @@ -76,7 +76,8 @@ # wait for alice to be logged in machine.wait_for_unit("default.target", "${user.name}") # check that logging in has given the user ownership of devices - assert "alice" in machine.succeed("getfacl -p /dev/snd/timer") + # Change back to /dev/snd/timer after systemd-258.1 + assert "alice" in machine.succeed("getfacl -p /dev/dri/card0") with subtest("Wait for GNOME Shell"): # correct output should be (true, 'false') diff --git a/nixos/tests/lxqt.nix b/nixos/tests/lxqt.nix index 595b6dc3f9ba..a7b8120016aa 100644 --- a/nixos/tests/lxqt.nix +++ b/nixos/tests/lxqt.nix @@ -42,7 +42,8 @@ machine.succeed("su - ${user.name} -c 'xauth merge /tmp/xauth_*'") with subtest("Check that logging in has given the user ownership of devices"): - machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") + # Change back to /dev/snd/timer after systemd-258.1 + machine.succeed("getfacl -p /dev/dri/card0 | grep -q ${user.name}") with subtest("Check if LXQt components actually start"): for i in ["openbox", "lxqt-session", "pcmanfm-qt", "lxqt-panel", "lxqt-runner"]: diff --git a/nixos/tests/mate.nix b/nixos/tests/mate.nix index 45fd877c1ca4..81948d5a1ae1 100644 --- a/nixos/tests/mate.nix +++ b/nixos/tests/mate.nix @@ -41,7 +41,8 @@ machine.succeed("xauth merge ${user.home}/.Xauthority") with subtest("Check that logging in has given the user ownership of devices"): - machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") + # Change back to /dev/snd/timer after systemd-258.1 + machine.succeed("getfacl -p /dev/dri/card0 | grep -q ${user.name}") with subtest("Check if MATE session components actually start"): machine.wait_until_succeeds("pgrep marco") diff --git a/nixos/tests/pantheon.nix b/nixos/tests/pantheon.nix index 336f84a061b4..3e24bff88527 100644 --- a/nixos/tests/pantheon.nix +++ b/nixos/tests/pantheon.nix @@ -72,7 +72,8 @@ machine.wait_for_file("/run/user/${toString user.uid}/wayland-0") with subtest("Check that logging in has given the user ownership of devices"): - machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") + # Change back to /dev/snd/timer after systemd-258.1 + machine.succeed("getfacl -p /dev/dri/card0 | grep -q ${user.name}") with subtest("Check if Pantheon components actually start"): pgrep_list = [ diff --git a/nixos/tests/xfce-wayland.nix b/nixos/tests/xfce-wayland.nix index 17defe1b4d26..061efa002327 100644 --- a/nixos/tests/xfce-wayland.nix +++ b/nixos/tests/xfce-wayland.nix @@ -39,7 +39,8 @@ machine.wait_for_file("/run/user/${toString user.uid}/wayland-0") with subtest("Check that logging in has given the user ownership of devices"): - machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") + # Change back to /dev/snd/timer after systemd-258.1 + machine.succeed("getfacl -p /dev/dri/card0 | grep -q ${user.name}") with subtest("Check if Xfce components actually start"): for p in ["labwc", "xfdesktop", "xfce4-notifyd", "xfconfd", "xfce4-panel"]: diff --git a/nixos/tests/xfce.nix b/nixos/tests/xfce.nix index 0b88fb18870f..cdd1f3ffc676 100644 --- a/nixos/tests/xfce.nix +++ b/nixos/tests/xfce.nix @@ -38,7 +38,8 @@ machine.succeed("xauth merge ${user.home}/.Xauthority") with subtest("Check that logging in has given the user ownership of devices"): - machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") + # Change back to /dev/snd/timer after systemd-258.1 + machine.succeed("getfacl -p /dev/dri/card0 | grep -q ${user.name}") with subtest("Check if Xfce components actually start"): machine.wait_for_window("xfce4-panel") diff --git a/pkgs/applications/editors/kakoune/plugins/update-shell.nix b/pkgs/applications/editors/kakoune/plugins/update-shell.nix index 787891309237..761ed6aad3ca 100644 --- a/pkgs/applications/editors/kakoune/plugins/update-shell.nix +++ b/pkgs/applications/editors/kakoune/plugins/update-shell.nix @@ -4,7 +4,7 @@ with pkgs; let - pyEnv = python3.withPackages (ps: [ ps.gitpython ]); + pyEnv = python3.withPackages (ps: [ ps.nixpkgs-plugin-update ]); in mkShell { diff --git a/pkgs/applications/editors/kakoune/plugins/update.py b/pkgs/applications/editors/kakoune/plugins/update.py index 9b06d0c06e9c..169304c9aa4e 100755 --- a/pkgs/applications/editors/kakoune/plugins/update.py +++ b/pkgs/applications/editors/kakoune/plugins/update.py @@ -13,12 +13,9 @@ import os import sys from pathlib import Path -# Import plugin update library from maintainers/scripts/pluginupdate.py +import nixpkgs_plugin_update + ROOT = Path(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))) # type: ignore -sys.path.insert( - 0, os.path.join(ROOT.parent.parent.parent.parent.parent, "maintainers", "scripts") -) -import pluginupdate GET_PLUGINS = f"""with import {{ }}; let @@ -53,10 +50,10 @@ lib.mapAttrs parse generated""" HEADER = "# This file has been @generated by ./pkgs/applications/editors/kakoune/plugins/update.py. Do not edit!" -class KakouneEditor(pluginupdate.Editor): +class KakouneEditor(nixpkgs_plugin_update.Editor): def generate_nix( self, - plugins: list[tuple[pluginupdate.PluginDesc, pluginupdate.Plugin]], + plugins: list[tuple[nixpkgs_plugin_update.PluginDesc, nixpkgs_plugin_update.Plugin]], outfile: str, ): with open(outfile, "w+") as f: @@ -88,7 +85,7 @@ in lib.fix' (lib.extends overrides packages) print(f"updated {outfile}") def update(self, args): - pluginupdate.update_plugins(self, args) + nixpkgs_plugin_update.update_plugins(self, args) def main(): diff --git a/pkgs/applications/editors/vim/plugins/utils/update.py b/pkgs/applications/editors/vim/plugins/utils/update.py index 9458b8f074d7..c167f0a92386 100755 --- a/pkgs/applications/editors/vim/plugins/utils/update.py +++ b/pkgs/applications/editors/vim/plugins/utils/update.py @@ -27,12 +27,11 @@ from typing import List, Tuple log = logging.getLogger("vim-updater") -# Import plugin update library from maintainers/scripts/pluginupdate.py ROOT = Path(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))) import importlib -import pluginupdate -from pluginupdate import PluginDesc, run_nix_expr +import nixpkgs_plugin_update +from nixpkgs_plugin_update import PluginDesc, run_nix_expr treesitter = importlib.import_module("nvim-treesitter.update") @@ -44,15 +43,15 @@ HEADER = ( NIXPKGS_NVIMTREESITTER_FOLDER = "pkgs/applications/editors/vim/plugins/nvim-treesitter" -class VimEditor(pluginupdate.Editor): +class VimEditor(nixpkgs_plugin_update.Editor): nvim_treesitter_updated = False def generate_nix( - self, plugins: List[Tuple[PluginDesc, pluginupdate.Plugin]], outfile: str + self, plugins: List[Tuple[PluginDesc, nixpkgs_plugin_update.Plugin]], outfile: str ): log.info("Generating nix code") log.debug("Loading nvim-treesitter revision from nix...") - nvim_treesitter_rev = pluginupdate.run_nix_expr( + nvim_treesitter_rev = nixpkgs_plugin_update.run_nix_expr( "(import { }).vimPlugins.nvim-treesitter.src.rev", self.nixpkgs, timeout=10, @@ -64,7 +63,7 @@ class VimEditor(pluginupdate.Editor): log.debug("Loading list of lua plugins...") luaPlugins = run_nix_expr(GET_PLUGINS_LUA, self.nixpkgs, timeout=30) - def _isNeovimPlugin(plug: pluginupdate.Plugin) -> bool: + def _isNeovimPlugin(plug: nixpkgs_plugin_update.Plugin) -> bool: """ Whether it's a neovim-only plugin We can check if it's available in lua packages @@ -103,7 +102,7 @@ class VimEditor(pluginupdate.Editor): print(f"updated {outfile}") def plugin2nix( - self, pdesc: PluginDesc, plugin: pluginupdate.Plugin, isNeovim: bool + self, pdesc: PluginDesc, plugin: nixpkgs_plugin_update.Plugin, isNeovim: bool ) -> str: if isNeovim: raise RuntimeError(f"Plugin {plugin.name} is already packaged in `luaPackages`, please use that") @@ -129,7 +128,7 @@ class VimEditor(pluginupdate.Editor): return content def update(self, args): - pluginupdate.update_plugins(self, args) + nixpkgs_plugin_update.update_plugins(self, args) # TODO this should probably be skipped when running outside a nixpkgs checkout if self.nvim_treesitter_updated: diff --git a/pkgs/applications/editors/vim/plugins/utils/updater.nix b/pkgs/applications/editors/vim/plugins/utils/updater.nix index 9560708fbb0e..369b1b79e9b6 100644 --- a/pkgs/applications/editors/vim/plugins/utils/updater.nix +++ b/pkgs/applications/editors/vim/plugins/utils/updater.nix @@ -24,8 +24,8 @@ buildPythonApplication { ]; pythonPath = [ - python3Packages.gitpython python3Packages.requests + python3Packages.nixpkgs-plugin-update ]; dontUnpack = true; @@ -43,12 +43,12 @@ buildPythonApplication { neovim-unwrapped nurl ] - }" --prefix PYTHONPATH : "${./.}:${../../../../../../maintainers/scripts/pluginupdate-py}" ) + }" --prefix PYTHONPATH : "${./.}" ) wrapPythonPrograms ''; shellHook = '' - export PYTHONPATH=pkgs/applications/editors/vim/plugins:maintainers/scripts/pluginupdate-py:$PYTHONPATH + export PYTHONPATH=pkgs/applications/editors/vim/plugins:$PYTHONPATH ''; passthru.updateScript = writeShellScript "updateScript" '' diff --git a/pkgs/by-name/as/astromenace/package.nix b/pkgs/by-name/as/astromenace/package.nix index d59a9d6f0c9e..72aea1f8232d 100644 --- a/pkgs/by-name/as/astromenace/package.nix +++ b/pkgs/by-name/as/astromenace/package.nix @@ -35,6 +35,12 @@ stdenv.mkDerivation rec { url = "https://src.fedoraproject.org/rpms/astromenace/raw/5e6bc02d115a53007dc47ef8223d8eaa25607588/f/astromenace-gcc13.patch"; hash = "sha256-pkmTVR86vS+KCICxAp+d7upNWVnSNxwdKmxnbtqIvgU="; }) + + (fetchpatch { + name = "cmake-4.patch"; + url = "https://github.com/viewizard/astromenace/commit/eb42ddb1e86a3e67787bfd5e33ff2afdd6307142.patch"; + hash = "sha256-TQVcnDrKBFvcyYhWeeEQSRjuirtJ7wYFQV+f3bHikdA="; + }) ]; nativeBuildInputs = [ diff --git a/pkgs/by-name/ca/cargo-bundle-licenses/package.nix b/pkgs/by-name/ca/cargo-bundle-licenses/package.nix index f286cc526ec4..4fdd5adb7bea 100644 --- a/pkgs/by-name/ca/cargo-bundle-licenses/package.nix +++ b/pkgs/by-name/ca/cargo-bundle-licenses/package.nix @@ -6,16 +6,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-bundle-licenses"; - version = "4.0.0"; + version = "4.2.0"; src = fetchFromGitHub { owner = "sstadick"; repo = "cargo-bundle-licenses"; rev = "v${version}"; - hash = "sha256-pTxZ9s8ZccylMfEiifYmJuBB+riZ37QJSAMpVuSgLzs="; + hash = "sha256-L3hmgDwzL6lLa0LCg/V5QeNK2U1u2dJMO4+t6W1UvxI="; }; - cargoHash = "sha256-4zolwQzK6dnFIcS2NwuxYZRS2AGcUGHh+KQzDkI0J6c="; + cargoHash = "sha256-HHBFT4u0NPjhKJa3KNg8/AgkgNoFUkMWmioVaXYlD2M="; meta = with lib; { description = "Generate a THIRDPARTY file with all licenses in a cargo project"; diff --git a/pkgs/by-name/cl/clever-tools/package.nix b/pkgs/by-name/cl/clever-tools/package.nix index 10f9dcc93525..c5b6683f55e3 100644 --- a/pkgs/by-name/cl/clever-tools/package.nix +++ b/pkgs/by-name/cl/clever-tools/package.nix @@ -11,7 +11,7 @@ buildNpmPackage rec { pname = "clever-tools"; - version = "4.1.0"; + version = "4.2.0"; nodejs = nodejs_22; @@ -19,10 +19,10 @@ buildNpmPackage rec { owner = "CleverCloud"; repo = "clever-tools"; rev = version; - hash = "sha256-ntKxMlRBE0WoaO2Fmpymhm7y7kCwe197sotNzpK92C4="; + hash = "sha256-1llFIq5F4FTxJuIdFov8+XExAZmfIMy81fP7OT2JbbE="; }; - npmDepsHash = "sha256-GsJlrz41q9GvFpYZcauuGXgMCG6mqSuI5gy+hxlJfUQ="; + npmDepsHash = "sha256-UzjGYHIG2fza4HJqiha0dyIqKY9v0O9YvbmcMUcMhAY="; nativeBuildInputs = [ installShellFiles diff --git a/pkgs/by-name/cr/crd2pulumi/package.nix b/pkgs/by-name/cr/crd2pulumi/package.nix index f14c9851b715..9d39e7bdf99a 100644 --- a/pkgs/by-name/cr/crd2pulumi/package.nix +++ b/pkgs/by-name/cr/crd2pulumi/package.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "crd2pulumi"; - version = "1.5.4"; + version = "1.6.0"; src = fetchFromGitHub { owner = "pulumi"; repo = "crd2pulumi"; rev = "v${version}"; - sha256 = "sha256-PqEQrmSfcPH+GSGnuv6xpAm/2gAyTmLf81C+e25Un4s="; + sha256 = "sha256-f18E0mUE3bT5od0JBzyAEXOHymoPtpRHeZhZnQR4Ezw="; }; - vendorHash = "sha256-4L1KfpZ+KICPko74x3STRQFtkcNVU/5KFGhKEJ64+Jk="; + vendorHash = "sha256-cLp0EWF6h/xCWbqadpbgLRFmH8RKWoY6xPb/tzZoKzM="; ldflags = [ "-s" diff --git a/pkgs/by-name/cr/createrepo_c/package.nix b/pkgs/by-name/cr/createrepo_c/package.nix index f81fb02fbb2b..77374ef25273 100644 --- a/pkgs/by-name/cr/createrepo_c/package.nix +++ b/pkgs/by-name/cr/createrepo_c/package.nix @@ -5,6 +5,7 @@ cmake, pkg-config, bzip2, + doxygen, glib, curl, libxml2, @@ -36,10 +37,14 @@ stdenv.mkDerivation rec { --replace-fail 'execute_process(COMMAND ''${PKG_CONFIG_EXECUTABLE} --variable=completionsdir bash-completion OUTPUT_VARIABLE BASHCOMP_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)' "SET(BASHCOMP_DIR \"$out/share/bash-completion/completions\")" substituteInPlace src/python/CMakeLists.txt \ --replace-fail "EXECUTE_PROCESS(COMMAND \''${PYTHON_EXECUTABLE} -c \"from sys import stdout; from sysconfig import get_path; stdout.write(get_path('platlib'))\" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)" "SET(PYTHON_INSTALL_DIR \"$out/${python3.sitePackages}\")" + + substituteInPlace CMakeLists.txt \ + --replace-fail "CMAKE_MINIMUM_REQUIRED (VERSION 2.8.12)" "cmake_minimum_required(VERSION 3.10)" ''; nativeBuildInputs = [ cmake + doxygen pkg-config rpm bash-completion diff --git a/pkgs/by-name/gh/gh/package.nix b/pkgs/by-name/gh/gh/package.nix index 66585581547b..9f3881dfdcca 100644 --- a/pkgs/by-name/gh/gh/package.nix +++ b/pkgs/by-name/gh/gh/package.nix @@ -10,16 +10,16 @@ buildGoModule rec { pname = "gh"; - version = "2.82.0"; + version = "2.82.1"; src = fetchFromGitHub { owner = "cli"; repo = "cli"; tag = "v${version}"; - hash = "sha256-0PheldNAlexi/tXHhhrPLd3YBGmcM1G+guicI2z9RYU="; + hash = "sha256-WoxPqrh8SLptoG3qRvJbNRSYJE3GMJE7KufwSLGSvtA="; }; - vendorHash = "sha256-rVNKTr3b4zShPfkiEBx7LqVQY2eMrXo/s8iC5tyQZNo="; + vendorHash = "sha256-vO/r74h4GJB1q3u429Gto9B621EHZ9rhzHJWtWK6Xh0="; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/by-name/go/go-sendxmpp/package.nix b/pkgs/by-name/go/go-sendxmpp/package.nix index e2cc18dad348..90aeea6276e4 100644 --- a/pkgs/by-name/go/go-sendxmpp/package.nix +++ b/pkgs/by-name/go/go-sendxmpp/package.nix @@ -8,17 +8,17 @@ buildGoModule (finalAttrs: { pname = "go-sendxmpp"; - version = "0.15.0"; + version = "0.15.1"; src = fetchFromGitLab { domain = "salsa.debian.org"; owner = "mdosch"; repo = "go-sendxmpp"; tag = "v${finalAttrs.version}"; - hash = "sha256-S4KoCMlW+uUJcQTYkEtlRT4IAALfRFSj2UDZk4A5e5g="; + hash = "sha256-dXSja3k7Gb9fzP3TrQqB9KRVO90i967eVaLldwhBnvQ="; }; - vendorHash = "sha256-Qe95u+M9X45cVO9MNLPxoyMyoWOAYYQ2n/GorD/PMIA="; + vendorHash = "sha256-fnaOgc8RPDQnxTWOLQx1kw0+qj1iaff+UkjnoJYdEG4="; passthru = { tests.version = testers.testVersion { diff --git a/pkgs/by-name/jw/jwx/package.nix b/pkgs/by-name/jw/jwx/package.nix index a8e329064aac..1916fb6a4e54 100644 --- a/pkgs/by-name/jw/jwx/package.nix +++ b/pkgs/by-name/jw/jwx/package.nix @@ -6,13 +6,13 @@ buildGoModule (finalAttrs: { pname = "jwx"; - version = "3.0.11"; + version = "3.0.12"; src = fetchFromGitHub { owner = "lestrrat-go"; repo = "jwx"; tag = "v${finalAttrs.version}"; - hash = "sha256-TGB6dMybvMH/mXlNwnj63kOrj56mbEFTQSVfphnQJfY="; + hash = "sha256-8TUme6YezwVkRYenSNaVZjC4TNq7kUV7wbIhWFQ/AR0="; }; vendorHash = "sha256-7lMvSwLi588UBI31YDi/VqyAqwUjWUwjOZbxE3fZQWU="; diff --git a/pkgs/by-name/lu/luarocks-packages-updater/package.nix b/pkgs/by-name/lu/luarocks-packages-updater/package.nix index cf41d472435e..d597834c7bc0 100644 --- a/pkgs/by-name/lu/luarocks-packages-updater/package.nix +++ b/pkgs/by-name/lu/luarocks-packages-updater/package.nix @@ -5,7 +5,6 @@ lib, nix-prefetch-scripts, luarocks-nix, - pluginupdate, lua5_1, lua5_2, lua5_3, @@ -41,18 +40,15 @@ python3Packages.buildPythonApplication { ]; dependencies = [ - python3Packages.gitpython + python3Packages.nixpkgs-plugin-update ]; postFixup = '' - echo "pluginupdate folder ${pluginupdate}" wrapProgram $out/bin/luarocks-packages-updater \ - --prefix PYTHONPATH : "${pluginupdate}" \ --prefix PATH : "${path}" ''; shellHook = '' - export PYTHONPATH="maintainers/scripts/pluginupdate-py:$PYTHONPATH" export PATH="${path}:$PATH" ''; diff --git a/pkgs/by-name/lu/luarocks-packages-updater/updater.py b/pkgs/by-name/lu/luarocks-packages-updater/updater.py index 4aa7ea6b9db0..555cde43ec55 100755 --- a/pkgs/by-name/lu/luarocks-packages-updater/updater.py +++ b/pkgs/by-name/lu/luarocks-packages-updater/updater.py @@ -18,8 +18,8 @@ from dataclasses import dataclass from multiprocessing.dummy import Pool from pathlib import Path -import pluginupdate -from pluginupdate import FetchConfig, update_plugins +import nixpkgs_plugin_update +from nixpkgs_plugin_update import FetchConfig, update_plugins class ColoredFormatter(logging.Formatter): @@ -88,7 +88,7 @@ class LuaPlugin: # rename Editor to LangUpdate/ EcosystemUpdater -class LuaEditor(pluginupdate.Editor): +class LuaEditor(nixpkgs_plugin_update.Editor): def create_parser(self): parser = super().create_parser() parser.set_defaults(proc=1) diff --git a/pkgs/by-name/xe/xemu/package.nix b/pkgs/by-name/xe/xemu/package.nix index 4e9b59aa71e7..dea772025dfa 100644 --- a/pkgs/by-name/xe/xemu/package.nix +++ b/pkgs/by-name/xe/xemu/package.nix @@ -34,13 +34,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "xemu"; - version = "0.8.107"; + version = "0.8.108"; src = fetchFromGitHub { owner = "xemu-project"; repo = "xemu"; tag = "v${finalAttrs.version}"; - hash = "sha256-rrf3PVetkrHbogOd+1ZrtfHdRJPrq0c9q4Zg0LSOy94="; + hash = "sha256-+bQNy3UvRT9GKwsRNFezbyeXKzCnHw9S8GdT+UQc+Kw="; nativeBuildInputs = [ git diff --git a/pkgs/development/python-modules/nixpkgs-plugin-update/default.nix b/pkgs/development/python-modules/nixpkgs-plugin-update/default.nix new file mode 100644 index 000000000000..ddba0da26cbb --- /dev/null +++ b/pkgs/development/python-modules/nixpkgs-plugin-update/default.nix @@ -0,0 +1,42 @@ +{ + lib, + buildPythonPackage, + uv-build, + gitpython, + ruff, + mypy, +}: + +buildPythonPackage { + pname = "nixpkgs-plugin-update"; + version = "0.1.0"; + format = "pyproject"; + + src = ./nixpkgs-plugin-update; + + build-system = [ uv-build ]; + + dependencies = [ + gitpython + ]; + + nativeCheckInputs = [ + ruff + mypy + ]; + + postInstallCheck = '' + ruff check + mypy + ''; + + meta = { + description = "Library for updating plugin collections in Nixpkgs"; + license = lib.licenses.mit; + maintainers = [ + lib.maintainers.teto + lib.maintainers.perchun + lib.maintainers.khaneliman + ]; + }; +} diff --git a/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/.gitignore b/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/.gitignore new file mode 100644 index 000000000000..688db6151f29 --- /dev/null +++ b/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/.gitignore @@ -0,0 +1,14 @@ +uv.lock +.ruff_cache/ +.mypy_cache/ + +# Python-generated files +__pycache__/ +*.py[oc] +build/ +dist/ +wheels/ +*.egg-info + +# Virtual environments +.venv diff --git a/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/pyproject.toml b/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/pyproject.toml new file mode 100644 index 000000000000..4c55bbb015b7 --- /dev/null +++ b/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/pyproject.toml @@ -0,0 +1,20 @@ +[project] +name = "nixpkgs-plugin-update" +version = "0.1.0" +requires-python = ">=3.12" +dependencies = [ + "gitpython>=3.1.45", +] + +[build-system] +requires = ["uv_build>=0.8.19"] +build-backend = "uv_build" + +[dependency-groups] +dev = [ + "mypy>=1.18.2", + "ruff>=0.14.1", +] + +[tool.mypy] +packages = ["nixpkgs_plugin_update"] diff --git a/maintainers/scripts/pluginupdate-py/pluginupdate.py b/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/__init__.py similarity index 97% rename from maintainers/scripts/pluginupdate-py/pluginupdate.py rename to pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/__init__.py index c65a27b16cd7..299d5a056a99 100644 --- a/maintainers/scripts/pluginupdate-py/pluginupdate.py +++ b/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/__init__.py @@ -3,13 +3,6 @@ # - pkgs/applications/editors/kakoune/plugins/update.py # - pkgs/development/lua-modules/updater/updater.py -# format: -# $ nix run nixpkgs#ruff maintainers/scripts/pluginupdate.py -# type-check: -# $ nix run nixpkgs#python3.pkgs.mypy maintainers/scripts/pluginupdate.py -# linted: -# $ nix run nixpkgs#python3.pkgs.flake8 -- --ignore E501,E265 maintainers/scripts/pluginupdate.py - import argparse import csv import functools @@ -104,7 +97,7 @@ class Repo: self._branch = branch # Redirect is the new Repo to use self.redirect: "Repo | None" = None - self.token = "dummy_token" + self.token: str | None = "dummy_token" @property def name(self): @@ -141,7 +134,7 @@ class Repo: loaded = json.loads(data) return loaded - def prefetch(self, ref: str | None) -> str: + def prefetch(self, ref: str) -> str: log.info("Prefetching %s", self.uri) loaded = self._prefetch(ref) return loaded["sha256"] @@ -202,12 +195,12 @@ class RepoGitHub(Repo): latest_entry = root.find(ATOM_ENTRY) assert latest_entry is not None, f"No commits found in repository {self}" commit_link = latest_entry.find(ATOM_LINK) - assert commit_link is not None, f"No link tag found feed entry {xml}" + assert commit_link is not None, f"No link tag found feed entry {xml!r}" url = urlparse(commit_link.get("href")) updated_tag = latest_entry.find(ATOM_UPDATED) assert ( updated_tag is not None and updated_tag.text is not None - ), f"No updated tag found feed entry {xml}" + ), f"No updated tag found feed entry {xml!r}" updated = datetime.strptime(updated_tag.text, "%Y-%m-%dT%H:%M:%SZ") return Path(str(url.path)).name, updated @@ -372,7 +365,7 @@ class Editor: self.default_out = default_out or root.joinpath("generated.nix") self.deprecated = deprecated or root.joinpath("deprecated.json") self.cache_file = cache_file or f"{name}-plugin-cache.json" - self.nixpkgs_repo = None + self.nixpkgs_repo: git.Repo | None = None def add(self, args): """CSV spec""" @@ -403,6 +396,7 @@ class Editor: autocommit = not args.no_commit if autocommit: + assert editor.nixpkgs_repo is not None commit( editor.nixpkgs_repo, "{drv_name}: init at {version}".format( @@ -788,11 +782,10 @@ def make_repo(uri: str, branch) -> Repo: # dumb check to see if it's of the form owner/repo (=> github) or https://... res = urlparse(uri) if res.netloc in ["github.com", ""]: - res = res.path.strip("/").split("/") - repo = RepoGitHub(res[0], res[1], branch) + owner, repo = res.path.strip("/").split("/") + return RepoGitHub(owner, repo, branch) else: - repo = Repo(uri.strip(), branch) - return repo + return Repo(uri.strip(), branch) def get_cache_path(cache_file_name: str) -> Path | None: @@ -928,7 +921,7 @@ def update_plugins(editor: Editor, args): All input arguments are grouped in the `Editor`.""" log.info("Start updating plugins") - if args.proc > 1 and args.github_token == None: + if args.proc > 1 and args.github_token is None: log.warning( "You have enabled parallel updates but haven't set a github token.\n" "You may be hit with `HTTP Error 429: too many requests` as a consequence." @@ -966,6 +959,7 @@ def update_plugins(editor: Editor, args): if redirects: update() if autocommit: + assert editor.nixpkgs_repo is not None commit( editor.nixpkgs_repo, f"{editor.attr_path}: resolve github repository redirects", diff --git a/maintainers/scripts/pluginupdate-py/__init__.py b/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/py.typed similarity index 100% rename from maintainers/scripts/pluginupdate-py/__init__.py rename to pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/py.typed diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7980d571c3a2..cf8e64c58cd3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5818,10 +5818,6 @@ with pkgs; luarocks = luaPackages.luarocks; luarocks-nix = luaPackages.luarocks-nix; - luarocks-packages-updater = callPackage ../by-name/lu/luarocks-packages-updater/package.nix { - pluginupdate = ../../maintainers/scripts/pluginupdate-py; - }; - toluapp = callPackage ../development/tools/toluapp { lua = lua5_1; # doesn't work with any other :( }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0cc6df462150..b7f902a851f2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10594,6 +10594,8 @@ self: super: with self; { nix-prefetch-github = callPackage ../development/python-modules/nix-prefetch-github { }; + nixpkgs-plugin-update = callPackage ../development/python-modules/nixpkgs-plugin-update { }; + nixpkgs-pytools = callPackage ../development/python-modules/nixpkgs-pytools { }; nixpkgs-updaters-library = callPackage ../development/python-modules/nixpkgs-updaters-library { };