Merge master into staging-next
This commit is contained in:
@@ -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"]:
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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"]:
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
@@ -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"]:
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
with pkgs;
|
||||
let
|
||||
pyEnv = python3.withPackages (ps: [ ps.gitpython ]);
|
||||
pyEnv = python3.withPackages (ps: [ ps.nixpkgs-plugin-update ]);
|
||||
in
|
||||
|
||||
mkShell {
|
||||
|
||||
@@ -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 <localpkgs> {{ }};
|
||||
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():
|
||||
|
||||
@@ -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 <localpkgs> { }).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:
|
||||
|
||||
@@ -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" ''
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ];
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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=";
|
||||
|
||||
@@ -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"
|
||||
'';
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -35,13 +35,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
|
||||
|
||||
@@ -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
|
||||
];
|
||||
};
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
uv.lock
|
||||
.ruff_cache/
|
||||
.mypy_cache/
|
||||
|
||||
# Python-generated files
|
||||
__pycache__/
|
||||
*.py[oc]
|
||||
build/
|
||||
dist/
|
||||
wheels/
|
||||
*.egg-info
|
||||
|
||||
# Virtual environments
|
||||
.venv
|
||||
+20
@@ -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"]
|
||||
+11
-17
@@ -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",
|
||||
@@ -43,11 +43,11 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "percona-server";
|
||||
version = "8.0.42-33";
|
||||
version = "8.0.43-34";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.percona.com/downloads/Percona-Server-8.0/Percona-Server-${finalAttrs.version}/source/tarball/percona-server-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-UDdmBz1RVjX/kRivvk69GPdtjLjWTglKxteiLxXKQGc=";
|
||||
url = "https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-${finalAttrs.version}/source/tarball/percona-server-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-RGm144c1WfNm62MsfCMeAapwDBucE8zoaQhdvh7JID4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -63,8 +63,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ rpcsvc-proto ];
|
||||
|
||||
patches = [
|
||||
# adapted from mysql80's llvm 19 fixes
|
||||
./libcpp-fixes.patch
|
||||
# fixes using -DWITH_SSL=system with CMAKE_PREFIX_PATH on darwin
|
||||
# https://github.com/Homebrew/homebrew-core/pull/204799
|
||||
(fetchpatch {
|
||||
|
||||
@@ -1,207 +0,0 @@
|
||||
diff --git a/include/my_char_traits.h b/include/my_char_traits.h
|
||||
new file mode 100644
|
||||
index 00000000000..6336bc039c8
|
||||
--- /dev/null
|
||||
+++ b/include/my_char_traits.h
|
||||
@@ -0,0 +1,65 @@
|
||||
+/* Copyright (c) 2024, Oracle and/or its affiliates.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License, version 2.0,
|
||||
+ as published by the Free Software Foundation.
|
||||
+
|
||||
+ This program is designed to work with certain software (including
|
||||
+ but not limited to OpenSSL) that is licensed under separate terms,
|
||||
+ as designated in a particular file or component or in included license
|
||||
+ documentation. The authors of MySQL hereby grant you an additional
|
||||
+ permission to link the program and your derivative works with the
|
||||
+ separately licensed software that they have either included with
|
||||
+ the program or referenced in the documentation.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License, version 2.0, for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
+
|
||||
+#ifndef MY_CHAR_TRAITS_INCLUDED
|
||||
+#define MY_CHAR_TRAITS_INCLUDED
|
||||
+
|
||||
+#include <cstring>
|
||||
+
|
||||
+template <class CharT>
|
||||
+struct my_char_traits;
|
||||
+
|
||||
+/*
|
||||
+ This is a standards-compliant, drop-in replacement for
|
||||
+ std::char_traits<unsigned char>
|
||||
+ We need this because clang libc++ is removing support for it in clang 19.
|
||||
+ It is not a complete implementation. Rather we implement just enough to
|
||||
+ compile any usage of char_traits<uchar> we have in our codebase.
|
||||
+ */
|
||||
+template <>
|
||||
+struct my_char_traits<unsigned char> {
|
||||
+ using char_type = unsigned char;
|
||||
+ using int_type = unsigned int;
|
||||
+
|
||||
+ static void assign(char_type &c1, const char_type &c2) { c1 = c2; }
|
||||
+
|
||||
+ static char_type *assign(char_type *s, std::size_t n, char_type a) {
|
||||
+ return static_cast<char_type *>(memset(s, a, n));
|
||||
+ }
|
||||
+
|
||||
+ static int compare(const char_type *s1, const char_type *s2, std::size_t n) {
|
||||
+ return memcmp(s1, s2, n);
|
||||
+ }
|
||||
+
|
||||
+ static char_type *move(char_type *s1, const char_type *s2, std::size_t n) {
|
||||
+ if (n == 0) return s1;
|
||||
+ return static_cast<char_type *>(memmove(s1, s2, n));
|
||||
+ }
|
||||
+
|
||||
+ static char_type *copy(char_type *s1, const char_type *s2, std::size_t n) {
|
||||
+ if (n == 0) return s1;
|
||||
+ return static_cast<char_type *>(memcpy(s1, s2, n));
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+#endif // MY_CHAR_TRAITS_INCLUDED
|
||||
diff --git a/sql/mdl_context_backup.h b/sql/mdl_context_backup.h
|
||||
index 89e7e23df34..cf9c307ec2d 100644
|
||||
--- a/sql/mdl_context_backup.h
|
||||
+++ b/sql/mdl_context_backup.h
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
+#include "my_char_traits.h"
|
||||
#include "sql/malloc_allocator.h"
|
||||
#include "sql/mdl.h"
|
||||
|
||||
@@ -47,7 +48,8 @@ class MDL_context_backup_manager {
|
||||
/**
|
||||
Key for uniquely identifying MDL_context in the MDL_context_backup map.
|
||||
*/
|
||||
- typedef std::basic_string<uchar> MDL_context_backup_key;
|
||||
+ using MDL_context_backup_key =
|
||||
+ std::basic_string<uchar, my_char_traits<uchar>>;
|
||||
|
||||
class MDL_context_backup;
|
||||
|
||||
diff --git a/sql/range_optimizer/index_range_scan_plan.cc b/sql/range_optimizer/index_range_scan_plan.cc
|
||||
index 74fbb100397..8ed1f50da33 100644
|
||||
--- a/sql/range_optimizer/index_range_scan_plan.cc
|
||||
+++ b/sql/range_optimizer/index_range_scan_plan.cc
|
||||
@@ -54,6 +54,8 @@
|
||||
#include "sql/thr_malloc.h"
|
||||
#include "sql_string.h"
|
||||
|
||||
+#include "my_char_traits.h"
|
||||
+
|
||||
using opt_range::null_element;
|
||||
using std::max;
|
||||
using std::min;
|
||||
@@ -1025,8 +1027,8 @@ static bool null_part_in_key(KEY_PART *key_part, const uchar *key,
|
||||
|
||||
// TODO(sgunders): This becomes a bit simpler with C++20's string_view
|
||||
// constructors.
|
||||
-static inline std::basic_string_view<uchar> make_string_view(const uchar *start,
|
||||
- const uchar *end) {
|
||||
+static inline std::basic_string_view<uchar, my_char_traits<uchar>>
|
||||
+make_string_view(const uchar *start, const uchar *end) {
|
||||
return {start, static_cast<size_t>(end - start)};
|
||||
}
|
||||
|
||||
diff --git a/sql/stream_cipher.h b/sql/stream_cipher.h
|
||||
index 606d40645c6..358fbb41959 100644
|
||||
--- a/sql/stream_cipher.h
|
||||
+++ b/sql/stream_cipher.h
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
+#include "my_char_traits.h"
|
||||
+
|
||||
/**
|
||||
@file stream_cipher.h
|
||||
|
||||
@@ -35,7 +37,8 @@
|
||||
binary log files.
|
||||
*/
|
||||
|
||||
-typedef std::basic_string<unsigned char> Key_string;
|
||||
+using Key_string =
|
||||
+ std::basic_string<unsigned char, my_char_traits<unsigned char>>;
|
||||
|
||||
/**
|
||||
@class Stream_cipher
|
||||
diff --git a/unittest/gunit/binlogevents/transaction_compression-t.cc b/unittest/gunit/binlogevents/transaction_compression-t.cc
|
||||
index ba13f979aa3..01af0e3a360 100644
|
||||
--- a/unittest/gunit/binlogevents/transaction_compression-t.cc
|
||||
+++ b/unittest/gunit/binlogevents/transaction_compression-t.cc
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include <array>
|
||||
+#include <string>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "libbinlogevents/include/binary_log.h"
|
||||
@@ -51,14 +52,13 @@ class TransactionPayloadCompressionTest : public ::testing::Test {
|
||||
using Managed_buffer_t = Decompressor_t::Managed_buffer_t;
|
||||
using Size_t = Decompressor_t::Size_t;
|
||||
using Char_t = Decompressor_t::Char_t;
|
||||
- using String_t = std::basic_string<Char_t>;
|
||||
using Decompress_status_t =
|
||||
binary_log::transaction::compression::Decompress_status;
|
||||
using Compress_status_t =
|
||||
binary_log::transaction::compression::Compress_status;
|
||||
|
||||
- static String_t constant_data(Size_t size) {
|
||||
- return String_t(size, (Char_t)'a');
|
||||
+ static std::string constant_data(Size_t size) {
|
||||
+ return std::string(size, (Char_t)'a');
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -69,7 +69,7 @@ class TransactionPayloadCompressionTest : public ::testing::Test {
|
||||
void TearDown() override {}
|
||||
|
||||
static void compression_idempotency_test(Compressor_t &c, Decompressor_t &d,
|
||||
- String_t data) {
|
||||
+ const std::string &data) {
|
||||
auto debug_string = concat(
|
||||
binary_log::transaction::compression::type_to_string(c.get_type_code()),
|
||||
" ", data.size());
|
||||
@@ -104,8 +104,8 @@ class TransactionPayloadCompressionTest : public ::testing::Test {
|
||||
|
||||
// Check decompressed data
|
||||
ASSERT_EQ(managed_buffer.read_part().size(), data.size()) << debug_string;
|
||||
- ASSERT_EQ(data, String_t(managed_buffer.read_part().begin(),
|
||||
- managed_buffer.read_part().end()))
|
||||
+ ASSERT_EQ(data, std::string(managed_buffer.read_part().begin(),
|
||||
+ managed_buffer.read_part().end()))
|
||||
<< debug_string;
|
||||
|
||||
// Check that we reached EOF
|
||||
@@ -118,7 +118,7 @@ TEST_F(TransactionPayloadCompressionTest, CompressDecompressZstdTest) {
|
||||
for (auto size : buffer_sizes) {
|
||||
binary_log::transaction::compression::Zstd_dec d;
|
||||
binary_log::transaction::compression::Zstd_comp c;
|
||||
- String_t data{TransactionPayloadCompressionTest::constant_data(size)};
|
||||
+ std::string data{TransactionPayloadCompressionTest::constant_data(size)};
|
||||
TransactionPayloadCompressionTest::compression_idempotency_test(c, d, data);
|
||||
c.set_compression_level(22);
|
||||
TransactionPayloadCompressionTest::compression_idempotency_test(c, d, data);
|
||||
@@ -129,7 +129,7 @@ TEST_F(TransactionPayloadCompressionTest, CompressDecompressNoneTest) {
|
||||
for (auto size : buffer_sizes) {
|
||||
binary_log::transaction::compression::None_dec d;
|
||||
binary_log::transaction::compression::None_comp c;
|
||||
- String_t data{TransactionPayloadCompressionTest::constant_data(size)};
|
||||
+ std::string data{TransactionPayloadCompressionTest::constant_data(size)};
|
||||
TransactionPayloadCompressionTest::compression_idempotency_test(c, d, data);
|
||||
}
|
||||
}
|
||||
@@ -5817,10 +5817,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 :(
|
||||
};
|
||||
|
||||
@@ -10588,6 +10588,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 { };
|
||||
|
||||
Reference in New Issue
Block a user