Merge staging-next into staging
This commit is contained in:
@@ -82,13 +82,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "obs-studio";
|
||||
version = "31.1.0";
|
||||
version = "31.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "obsproject";
|
||||
repo = "obs-studio";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-espGKoKldgjWoCEE+Xor7+N5N86HvWCf0V18tb8GaC8=";
|
||||
hash = "sha256-FZTWuT9eANITzdCopDyr11CTyfGvMtSgaFMPSPlmrTU=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
diff --color -urpN obs-aitum-multistream.bak/file-updater.c obs-aitum-multistream/file-updater.c
|
||||
--- obs-aitum-multistream.bak/file-updater.c 2025-07-18 17:41:35.605779462 -0400
|
||||
+++ obs-aitum-multistream/file-updater.c 2025-07-18 17:45:29.485046420 -0400
|
||||
@@ -83,8 +83,8 @@ static bool do_http_request(struct updat
|
||||
curl_easy_setopt(info->curl, CURLOPT_ERRORBUFFER, info->error);
|
||||
curl_easy_setopt(info->curl, CURLOPT_WRITEFUNCTION, http_write);
|
||||
curl_easy_setopt(info->curl, CURLOPT_WRITEDATA, info);
|
||||
- curl_easy_setopt(info->curl, CURLOPT_FAILONERROR, true);
|
||||
- curl_easy_setopt(info->curl, CURLOPT_NOSIGNAL, 1);
|
||||
+ curl_easy_setopt(info->curl, CURLOPT_FAILONERROR, 1L);
|
||||
+ curl_easy_setopt(info->curl, CURLOPT_NOSIGNAL, 1L);
|
||||
curl_easy_setopt(info->curl, CURLOPT_ACCEPT_ENCODING, "");
|
||||
curl_obs_set_revoke_setting(info->curl);
|
||||
|
||||
@@ -19,6 +19,9 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-TqddyTBRWLyfwYi9I0nQE8Z19YL2RwkZqUwi7F9XpwQ=";
|
||||
};
|
||||
|
||||
# Remove after https://github.com/Aitum/obs-aitum-multistream/pull/15 is released :)
|
||||
patches = [ ./obs-aitum-multistream.diff ];
|
||||
|
||||
# Fix FTBFS with Qt >= 6.8
|
||||
prePatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
diff --color -urpN obs-vertical-canvas.bak/file-updater.c obs-vertical-canvas/file-updater.c
|
||||
--- obs-vertical-canvas.bak/file-updater.c 2025-07-18 18:32:13.239718611 -0400
|
||||
+++ obs-vertical-canvas/file-updater.c 2025-07-18 18:32:30.732020377 -0400
|
||||
@@ -67,10 +67,10 @@ static bool do_http_request(struct updat
|
||||
curl_easy_setopt(info->curl, CURLOPT_ERRORBUFFER, info->error);
|
||||
curl_easy_setopt(info->curl, CURLOPT_WRITEFUNCTION, http_write);
|
||||
curl_easy_setopt(info->curl, CURLOPT_WRITEDATA, info);
|
||||
- curl_easy_setopt(info->curl, CURLOPT_FAILONERROR, true);
|
||||
- curl_easy_setopt(info->curl, CURLOPT_NOSIGNAL, 1);
|
||||
+ curl_easy_setopt(info->curl, CURLOPT_FAILONERROR, 1L);
|
||||
+ curl_easy_setopt(info->curl, CURLOPT_NOSIGNAL, 1L);
|
||||
curl_easy_setopt(info->curl, CURLOPT_ACCEPT_ENCODING, "");
|
||||
- curl_easy_setopt(info->curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_REVOKE_BEST_EFFORT);
|
||||
+ curl_easy_setopt(info->curl, CURLOPT_SSL_OPTIONS, (long)CURLSSLOPT_REVOKE_BEST_EFFORT);
|
||||
|
||||
code = curl_easy_perform(info->curl);
|
||||
if (code != CURLE_OK) {
|
||||
@@ -19,6 +19,9 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-0XfJ8q8n2ANO0oDtLZhZjRunZ5S1EouQ6Ak/pxEQYOQ=";
|
||||
};
|
||||
|
||||
# Remove after https://github.com/Aitum/obs-vertical-canvas/pull/25 is released :)
|
||||
patches = [ ./obs-vertical-canvas.diff ];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "flood";
|
||||
version = "4.9.3";
|
||||
version = "4.9.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jesec";
|
||||
repo = "flood";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-sIwXx9DA+vRW4pf6jyqcsla0khh8fdpvVTZ5pLrUhhc=";
|
||||
hash = "sha256-UXapL26PsSJvWX4Vjj/JJC/FsUBLuGEoqv2dSRSQqNg=";
|
||||
};
|
||||
|
||||
npmConfigHook = pnpm_9.configHook;
|
||||
@@ -23,7 +23,7 @@ buildNpmPackage rec {
|
||||
pnpmDeps = pnpm_9.fetchDeps {
|
||||
inherit pname version src;
|
||||
fetcherVersion = 1;
|
||||
hash = "sha256-E2VxRcOMLvvCQb9gCAGcBTsly571zh/HWM6Q1Zd2eVw=";
|
||||
hash = "sha256-i1szy2JVKvq2rcL0l51vmsLano4l88s97EQPN9g4Qq4=";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
|
||||
@@ -18,7 +18,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/4ian/GDevelop/releases/download/v${version}/GDevelop-5-${version}-universal-mac.zip";
|
||||
hash = "sha256-/0wqZN9bVCNXAe9LkGL8/dw2b/stffDbPPaZQrugEhQ=";
|
||||
hash = "sha256-Be+lGADCTdx1DNhkrz34KagxS8LDm2KwWx8OVJ2VE/4=";
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
@@ -13,7 +13,7 @@ let
|
||||
if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = "https://github.com/4ian/GDevelop/releases/download/v${version}/GDevelop-5-${version}.AppImage";
|
||||
hash = "sha256-+J0AURlpnZ7Do0ZRqzwwvdcyozZLdWGQKr+7OggOn1I=";
|
||||
hash = "sha256-6EB2QhjZU0i2j5W/4ZfByPaYeHD4qiPM5wGOzKvRqsI=";
|
||||
}
|
||||
else
|
||||
throw "${pname}-${version} is not supported on ${stdenv.hostPlatform.system}";
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
version = "5.5.236";
|
||||
version = "5.5.237";
|
||||
pname = "gdevelop";
|
||||
meta = {
|
||||
description = "Graphical Game Development Studio";
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
rust,
|
||||
rustPlatform,
|
||||
hdr10plus_tool,
|
||||
fetchFromGitHub,
|
||||
cargo-c,
|
||||
fontconfig,
|
||||
}:
|
||||
@@ -16,15 +17,26 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
__structuredAttrs = true;
|
||||
|
||||
pname = "hdr10plus";
|
||||
# Version of the library, not the tool
|
||||
# See https://github.com/quietvoid/hdr10plus_tool/blob/main/hdr10plus/Cargo.toml
|
||||
version = "2.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "quietvoid";
|
||||
repo = "hdr10plus_tool";
|
||||
# repo release snapshots are versioned per the tool
|
||||
# https://github.com/quietvoid/hdr10plus_tool/releases/latest
|
||||
tag = "1.7.0";
|
||||
hash = "sha256-eueB+ZrOrnySEwUpCTvC4qARCsDcHJhm088XepLTlOE=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-3D0HjDtKwYoi9bpQnosC/TPNBjfiWi5m1CH1eGQpGg0=";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
];
|
||||
|
||||
inherit (hdr10plus_tool) src cargoDeps cargoHash;
|
||||
|
||||
nativeBuildInputs = [ cargo-c ];
|
||||
buildInputs = [ fontconfig ];
|
||||
|
||||
|
||||
@@ -14,17 +14,17 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "hdr10plus_tool";
|
||||
version = "1.7.0";
|
||||
version = "1.7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "quietvoid";
|
||||
repo = "hdr10plus_tool";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-eueB+ZrOrnySEwUpCTvC4qARCsDcHJhm088XepLTlOE=";
|
||||
hash = "sha256-Lpm770Eb81L+eEzHUD+0+J3iS9CFdSP3odhw6KDtgAI=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-3D0HjDtKwYoi9bpQnosC/TPNBjfiWi5m1CH1eGQpGg0=";
|
||||
cargoHash = "sha256-Qkl02HAC6PVCHW226R6StmzrGZv/IHcE88kEg9BpObs=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
diff --git a/makefile_build/Makefile b/makefile_build/Makefile
|
||||
index 335e74a..71492d0 100644
|
||||
--- a/makefile_build/Makefile
|
||||
+++ b/makefile_build/Makefile
|
||||
@@ -40,7 +40,6 @@ LIBEDGETPU_LDFLAGS := \
|
||||
-labsl_hashtablez_sampler \
|
||||
-labsl_raw_hash_set \
|
||||
-labsl_str_format_internal \
|
||||
- -labsl_bad_optional_access \
|
||||
-lusb-1.0
|
||||
|
||||
LIBEDGETPU_FLATC_SRCS := \
|
||||
@@ -41,6 +41,7 @@ stdenv.mkDerivation {
|
||||
url = "https://patch-diff.githubusercontent.com/raw/google-coral/libedgetpu/pull/66.patch";
|
||||
hash = "sha256-mMODpQmikfXtsQvtgh26cy97EiykYNLngSjidOBt/3I=";
|
||||
})
|
||||
./fix-abseil-20250512.0.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "mcontrolcenter";
|
||||
version = "0.5.0";
|
||||
version = "0.5.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dmitry-s93";
|
||||
repo = "MControlCenter";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-Gl+YnbUbwtwF2WHT39bIKh48qSIMe3fpzxgdvifR4DQ=";
|
||||
hash = "sha256-uWxEWLb2QOZlJ1d3LbORCc81kILB9N+0bzr+xzHAa7Y=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -129,6 +129,10 @@ buildGoModule (finalAttrs: {
|
||||
# Test mock data uses 64 bit data without an explicit (u)int64
|
||||
doCheck = !(stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.parsed.cpu.bits < 64);
|
||||
|
||||
checkFlags = lib.optionals stdenv.hostPlatform.isAarch64 [
|
||||
"-skip=TestEvaluations/testdata/aggregators.test"
|
||||
];
|
||||
|
||||
passthru.tests = { inherit (nixosTests) prometheus; };
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "snac2";
|
||||
version = "2.78";
|
||||
version = "2.80";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "grunfink";
|
||||
repo = "snac2";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-t2FQFHpEN9IZMqLp2nNH0utkKjgkw1EPxadAn07h7sw=";
|
||||
hash = "sha256-8f9JesQgdRwholsa0p1TP0L4vPd1HHLEMwfxVlGm99o=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
bash,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
nix-update-script,
|
||||
nixosTests,
|
||||
versionCheckHook,
|
||||
pam,
|
||||
pandoc,
|
||||
rustPlatform,
|
||||
tzdata,
|
||||
}:
|
||||
@@ -24,32 +23,26 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-o3//zJxB6CNHQl1DtfmFnSBP9npC4I9/hRuzpWrKoNs=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
pandoc
|
||||
];
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
buildInputs = [ pam ];
|
||||
|
||||
# Don't attempt to generate the docs in a (pan)Docker container
|
||||
postPatch = ''
|
||||
substituteInPlace util/generate-docs.sh \
|
||||
--replace-fail "/usr/bin/env bash" ${lib.getExe bash} \
|
||||
--replace-fail util/pandoc.sh pandoc
|
||||
|
||||
substituteInPlace build.rs \
|
||||
--replace-fail "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
./util/generate-docs.sh
|
||||
installManPage target/docs/man/*
|
||||
for man_fn in docs/man/*.man; do
|
||||
man_fn_fixed="$(echo "$man_fn" | sed -e 's,\.man$,,')"
|
||||
ln -vs $(basename "$man_fn") "$man_fn_fixed"
|
||||
installManPage "$man_fn_fixed"
|
||||
done
|
||||
'';
|
||||
|
||||
checkFlags = map (t: "--skip=${t}") [
|
||||
# Those tests make path assumptions
|
||||
"common::command::test::test_build_command_and_args"
|
||||
"common::context::tests::test_build_context"
|
||||
"common::context::tests::test_build_run_context"
|
||||
"common::resolve::test::canonicalization"
|
||||
"common::resolve::tests::test_resolve_path"
|
||||
@@ -66,14 +59,23 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
"system::interface::test::test_unix_user"
|
||||
"system::tests::test_get_user_and_group_by_id"
|
||||
|
||||
# This expects some PATH_TZINFO environment var
|
||||
"env::environment::tests::test_tzinfo"
|
||||
|
||||
# Unsure why those are failing
|
||||
"env::tests::test_environment_variable_filtering"
|
||||
"su::context::tests::invalid_shell"
|
||||
];
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
|
||||
doInstallCheck = true;
|
||||
# sudo binary fails because it checks if it is suid 0
|
||||
versionCheckProgram = "${placeholder "out"}/bin/su";
|
||||
versionCheckProgramArg = "--version";
|
||||
|
||||
postInstallCheck = ''
|
||||
[ -e ${placeholder "out"}/share/man/man8/sudo.8.gz ] || \
|
||||
( echo "Error: Some manpages might be missing!"; exit 1 )
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
limesuite,
|
||||
libiio,
|
||||
libbladeRF,
|
||||
imagemagick,
|
||||
makeDesktopItem,
|
||||
copyDesktopItems,
|
||||
qt5,
|
||||
@@ -20,16 +19,18 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "urh";
|
||||
version = "2.9.8";
|
||||
format = "setuptools";
|
||||
version = "2.9.8-unstable-2025-07-07";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jopohl";
|
||||
repo = "urh";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-r3d80dzGwgf5Tuwt1IWGcmNbblwBNKTKKm+GGx1r2HE=";
|
||||
rev = "9061187d326f39de126dd1b8cc943aa33c36ae8d";
|
||||
hash = "sha256-MjgEa33geZ8Icn7H/Zxvux6rMnSOFcMuwG5n/5cwuMI=";
|
||||
};
|
||||
|
||||
build-system = [ python3Packages.setuptools ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
qt5.wrapQtAppsHook
|
||||
wrapGAppsHook3
|
||||
@@ -47,9 +48,9 @@ python3Packages.buildPythonApplication rec {
|
||||
++ lib.optional USRPSupport uhd
|
||||
++ lib.optional stdenv.hostPlatform.isLinux qt5.qtwayland;
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
dependencies = with python3Packages; [
|
||||
pyqt5
|
||||
numpy_1
|
||||
numpy
|
||||
psutil
|
||||
cython
|
||||
pyzmq
|
||||
@@ -88,11 +89,11 @@ python3Packages.buildPythonApplication rec {
|
||||
install -Dm644 data/icons/appicon.png $out/share/pixmaps/urh.png
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://github.com/jopohl/urh";
|
||||
description = "Universal Radio Hacker: investigate wireless protocols like a boss";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ fpletz ];
|
||||
license = lib.licenses.gpl3;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ fpletz ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i python3 -p nix python3 python3Packages.loguru nix-search-tv vscode-extension-update gitMinimal
|
||||
|
||||
import argparse
|
||||
import subprocess
|
||||
|
||||
from loguru import logger
|
||||
|
||||
|
||||
class VSCodeExtensionBatchUpdater:
|
||||
# Extensions to be skipped
|
||||
_excluded_extensions = [
|
||||
# wrong upstream constraint: 0.10.x
|
||||
"vscode-extensions.ms-vscode.theme-tomorrowkit",
|
||||
"vscode-extensions.richie5um2.snake-trail",
|
||||
# not supported
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-cs",
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-de",
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-es",
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-fr",
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-it",
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-ja",
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-ko",
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-pl",
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-pt-br",
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-qps-ploc",
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-ru",
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-tr",
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-zh-hans",
|
||||
"vscode-extensions.ms-ceintl.vscode-language-pack-zh-hant",
|
||||
]
|
||||
|
||||
# Unable to determine the correct file location
|
||||
_extension_file_map = {
|
||||
"vscode-extensions.hashicorp.terraform": "pkgs/applications/editors/vscode/extensions/hashicorp.terraform/default.nix",
|
||||
"vscode-extensions.betterthantomorrow.calva": "pkgs/applications/editors/vscode/extensions/betterthantomorrow.calva/default.nix",
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
self.parser = argparse.ArgumentParser(
|
||||
description="Batch update VSCode extensions"
|
||||
)
|
||||
|
||||
def execute_command(
|
||||
self, command, env: dict[str, str] = None, shell: bool = False
|
||||
) -> str:
|
||||
logger.debug("Executing command: {} (shell={})", command, shell)
|
||||
return subprocess.run(
|
||||
command,
|
||||
check=True,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
env=env,
|
||||
shell=shell,
|
||||
).stdout.strip()
|
||||
|
||||
def _get_extension_list(self) -> list[str]:
|
||||
# Get extension list from nix-search-tv output
|
||||
command = "nix-search-tv print | grep '^nixpkgs/ vscode-extensions\\.' | cut -d' ' -f2-"
|
||||
output = self.execute_command(command, shell=True)
|
||||
extension_list = output.splitlines()
|
||||
logger.info("Found {} extensions: {}", len(extension_list), extension_list)
|
||||
return extension_list
|
||||
|
||||
def _has_update_script(self, extension: str) -> bool:
|
||||
try:
|
||||
result = self._get_nix_attribute(f"{extension}.updateScript")
|
||||
return "not found" not in result
|
||||
except subprocess.CalledProcessError:
|
||||
return False
|
||||
|
||||
def _get_nix_attribute(self, attribute: str) -> str:
|
||||
return self.execute_command(["nix", "eval", "--raw", "-f", ".", attribute])
|
||||
|
||||
def _get_extension_filename(self, extension: str) -> str | None:
|
||||
return self._extension_file_map.get(extension)
|
||||
|
||||
def _update_extension(self, extension: str) -> None:
|
||||
logger.info("Updating extension: {}", extension)
|
||||
if extension in self._excluded_extensions:
|
||||
return
|
||||
try:
|
||||
if self._has_update_script(extension):
|
||||
return
|
||||
update_command = ["vscode-extension-update", extension, "--commit"]
|
||||
filename = self._get_extension_filename(extension)
|
||||
if filename:
|
||||
update_command.extend(["--override-filename", filename])
|
||||
self.execute_command(update_command)
|
||||
logger.info("Updated extension: {}", extension)
|
||||
except subprocess.CalledProcessError:
|
||||
logger.error("Failed to update extension: {}", extension)
|
||||
self.execute_command(["git", "restore", "."])
|
||||
|
||||
def run(self) -> None:
|
||||
for extension in self._get_extension_list():
|
||||
self._update_extension(extension)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
updater = VSCodeExtensionBatchUpdater()
|
||||
updater.run()
|
||||
@@ -7,6 +7,8 @@ import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from loguru import logger
|
||||
|
||||
@@ -69,7 +71,7 @@ class VSCodeExtensionUpdater:
|
||||
logger.info(f"Extension Current Version: {self.current_version}")
|
||||
|
||||
def execute_command(
|
||||
self, commandline: list[str], env: dict[str, str] = None
|
||||
self, commandline: list[str], env: Optional[dict[str, str]] = None
|
||||
) -> str:
|
||||
"""
|
||||
Executes a shell command and returns its output.
|
||||
@@ -116,33 +118,27 @@ class VSCodeExtensionUpdater:
|
||||
return "targetPlatform=" in source_url
|
||||
|
||||
def _get_nix_vscode_extension_src_hash(self, system: str) -> str:
|
||||
url = self.execute_command(
|
||||
[
|
||||
"nix",
|
||||
"eval",
|
||||
"--raw",
|
||||
"-f",
|
||||
".",
|
||||
f"{self.attribute_path}.src.url",
|
||||
"--system",
|
||||
system,
|
||||
]
|
||||
)
|
||||
if "warning" not in url:
|
||||
sha256 = self.execute_command(["nix-prefetch-url", url])
|
||||
hash = self.execute_command(
|
||||
[
|
||||
"nix",
|
||||
"hash",
|
||||
"convert",
|
||||
"--to",
|
||||
"sri",
|
||||
"--hash-algo",
|
||||
"sha256",
|
||||
sha256,
|
||||
]
|
||||
)
|
||||
return hash
|
||||
url = self.execute_command([
|
||||
"nix",
|
||||
"eval",
|
||||
"--raw",
|
||||
"-f",
|
||||
".",
|
||||
f"{self.attribute_path}.src.url",
|
||||
"--system",
|
||||
system,
|
||||
])
|
||||
sha256 = self.execute_command(["nix-prefetch-url", url])
|
||||
return self.execute_command([
|
||||
"nix",
|
||||
"hash",
|
||||
"convert",
|
||||
"--to",
|
||||
"sri",
|
||||
"--hash-algo",
|
||||
"sha256",
|
||||
sha256,
|
||||
])
|
||||
|
||||
def get_target_platform(self, nix_system: str) -> str:
|
||||
"""
|
||||
@@ -185,16 +181,14 @@ class VSCodeExtensionUpdater:
|
||||
"""
|
||||
try:
|
||||
return json.loads(
|
||||
self.execute_command(
|
||||
[
|
||||
"nix",
|
||||
"eval",
|
||||
"--json",
|
||||
"-f",
|
||||
".",
|
||||
f"{self.attribute_path}.meta.platforms",
|
||||
]
|
||||
)
|
||||
self.execute_command([
|
||||
"nix",
|
||||
"eval",
|
||||
"--json",
|
||||
"-f",
|
||||
".",
|
||||
f"{self.attribute_path}.meta.platforms",
|
||||
])
|
||||
)
|
||||
except subprocess.CalledProcessError:
|
||||
return []
|
||||
@@ -261,14 +255,12 @@ class VSCodeExtensionUpdater:
|
||||
engine_version_constraint
|
||||
)
|
||||
try:
|
||||
self.execute_command(
|
||||
[
|
||||
"semver",
|
||||
self.target_vscode_version,
|
||||
"-r",
|
||||
engine_version_constraint,
|
||||
]
|
||||
)
|
||||
self.execute_command([
|
||||
"semver",
|
||||
self.target_vscode_version,
|
||||
"-r",
|
||||
engine_version_constraint,
|
||||
])
|
||||
logger.info(f"Compatible version found: {candidate_version}")
|
||||
return candidate_version
|
||||
except (ValueError, subprocess.CalledProcessError):
|
||||
@@ -277,13 +269,11 @@ class VSCodeExtensionUpdater:
|
||||
)
|
||||
continue
|
||||
return candidate_version
|
||||
else:
|
||||
logger.error("Error: not found compatible version.")
|
||||
sys.exit(1)
|
||||
logger.error("Error: not found compatible version.")
|
||||
sys.exit(1)
|
||||
|
||||
def replace_version_symbol(self, version: str) -> str:
|
||||
version = re.sub(r"^\^", ">=", version)
|
||||
return version
|
||||
return re.sub(r"^\^", ">=", version)
|
||||
|
||||
def update_version_for_default_nix(self, content: str, new_version: str):
|
||||
target_name = self.attribute_path.removeprefix("vscode-extensions.")
|
||||
@@ -326,12 +316,7 @@ class VSCodeExtensionUpdater:
|
||||
updated_content = (
|
||||
content[:brace_start] + new_block_text + content[block_end + 1 :]
|
||||
)
|
||||
with open(
|
||||
self.override_filename,
|
||||
"w",
|
||||
encoding="utf-8",
|
||||
) as f:
|
||||
f.write(updated_content)
|
||||
Path(self.override_filename).write_text(updated_content, encoding="utf-8")
|
||||
|
||||
def run_nix_update(self, new_version: str, system: str) -> None:
|
||||
"""
|
||||
@@ -353,9 +338,9 @@ class VSCodeExtensionUpdater:
|
||||
if (
|
||||
"pkgs/applications/editors/vscode/extensions/vscode-utils.nix"
|
||||
in self.override_filename
|
||||
) and os.path.exists(
|
||||
) and Path(
|
||||
"pkgs/applications/editors/vscode/extensions/default.nix"
|
||||
):
|
||||
).exists():
|
||||
self.override_filename = (
|
||||
"pkgs/applications/editors/vscode/extensions/default.nix"
|
||||
)
|
||||
@@ -365,22 +350,17 @@ class VSCodeExtensionUpdater:
|
||||
in self.override_filename
|
||||
):
|
||||
with logger.catch(exception=(IOError, ValueError)):
|
||||
with open(
|
||||
self.override_filename,
|
||||
"r",
|
||||
encoding="utf-8",
|
||||
) as f:
|
||||
content = f.read()
|
||||
content = Path(self.override_filename).read_text(encoding="utf-8")
|
||||
if content.count(self.current_version) > 1:
|
||||
self.update_version_for_default_nix(content, new_version)
|
||||
new_version = "skip"
|
||||
if system not in self.supported_nix_systems:
|
||||
hash = self._get_nix_vscode_extension_src_hash(system)
|
||||
src_hash = self._get_nix_vscode_extension_src_hash(system)
|
||||
update_command = [
|
||||
"update-source-version",
|
||||
self.attribute_path,
|
||||
self.new_version,
|
||||
hash,
|
||||
src_hash,
|
||||
f"--system={system}",
|
||||
"--ignore-same-version",
|
||||
"--ignore-same-hash",
|
||||
@@ -412,9 +392,12 @@ class VSCodeExtensionUpdater:
|
||||
self.get_target_platform(self.nix_vscode_extension_platforms[0]),
|
||||
)
|
||||
try:
|
||||
self.execute_command(
|
||||
["semver", self.current_version, "-r", f"<{self.new_version}"]
|
||||
)
|
||||
self.execute_command([
|
||||
"semver",
|
||||
self.current_version,
|
||||
"-r",
|
||||
f"<{self.new_version}",
|
||||
])
|
||||
except subprocess.CalledProcessError:
|
||||
logger.info("Already up to date or new version is older!")
|
||||
sys.exit(0)
|
||||
@@ -423,14 +406,12 @@ class VSCodeExtensionUpdater:
|
||||
self.run_nix_update(version, system)
|
||||
if self.commit:
|
||||
self.execute_command(["git", "add", self.override_filename])
|
||||
self.execute_command(
|
||||
[
|
||||
"git",
|
||||
"commit",
|
||||
"-m",
|
||||
f"{self.attribute_path}: {self.current_version} -> {self.new_version}",
|
||||
]
|
||||
)
|
||||
self.execute_command([
|
||||
"git",
|
||||
"commit",
|
||||
"-m",
|
||||
f"{self.attribute_path}: {self.current_version} -> {self.new_version}",
|
||||
])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -99,7 +99,7 @@ let
|
||||
in
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "zed-editor";
|
||||
version = "0.195.3";
|
||||
version = "0.195.5";
|
||||
|
||||
outputs =
|
||||
[ "out" ]
|
||||
@@ -111,7 +111,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
owner = "zed-industries";
|
||||
repo = "zed";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-30P46Tb/j/KXIxSiHFMbme11kLd+5CoKrvaDTmySJmU=";
|
||||
hash = "sha256-7ffh7aLAh9tzRFAFai0ZQbOBXXKiX+QMPzmfCtV0JwI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -138,7 +138,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
'';
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-OIXTvsTnxp3hGDF+K/66KlQLCEV5sfWTehtG3lHIdmA=";
|
||||
cargoHash = "sha256-A/oBHbt8prQyR15n77b/VHlz/wO2lxFp7M/OOZt3jHU=";
|
||||
|
||||
nativeBuildInputs =
|
||||
[
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "craft-platforms";
|
||||
version = "0.9.0";
|
||||
version = "0.10.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.10";
|
||||
@@ -23,7 +23,7 @@ buildPythonPackage rec {
|
||||
owner = "canonical";
|
||||
repo = "craft-platforms";
|
||||
tag = version;
|
||||
hash = "sha256-Ec4zncigqampXND0YvDnExrrB9ls3Sf0KfYVbwLGbqY=";
|
||||
hash = "sha256-86dUeMb3yL1ilbHxmknFaRH4Ce9AEl+5rSVW0WGaZV8=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "libretranslate";
|
||||
version = "1.6.5";
|
||||
version = "1.7.2";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "LibreTranslate";
|
||||
repo = "LibreTranslate";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-fzBVEJnj7sCkfNIIFZXHB0VQt94z0U9lbtW6+abAMpA=";
|
||||
hash = "sha256-PTr42XtZMruWWdFEc6TX4jbWH5Vypgbx2Dhxy6ZG1Y4=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "logassert";
|
||||
version = "8.4";
|
||||
version = "8.5";
|
||||
|
||||
pyproject = true;
|
||||
|
||||
@@ -18,7 +18,7 @@ buildPythonPackage rec {
|
||||
owner = "facundobatista";
|
||||
repo = "logassert";
|
||||
tag = version;
|
||||
hash = "sha256-GKGNvOZde8Q6X5h+QC5936qTDWpcXYHuLXpsGuxw1Mw=";
|
||||
hash = "sha256-77oP7NE1fK1pA6baTHoSbfR7kR4URSmSpZSCgFO5Pb4=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
@@ -34,7 +34,7 @@ buildPythonPackage rec {
|
||||
meta = {
|
||||
description = "A simple Log Assertion mechanism for Python unittests";
|
||||
homepage = "https://github.com/facundobatista/logassert";
|
||||
changelog = "https://github.com/facundobatista/logassert/releases/tag/${version}";
|
||||
changelog = "https://github.com/facundobatista/logassert/releases/tag/${src.tag}";
|
||||
license = lib.licenses.lgpl3Only;
|
||||
maintainers = with lib.maintainers; [ jnsgruk ];
|
||||
platforms = lib.platforms.linux;
|
||||
|
||||
Reference in New Issue
Block a user