Merge staging-next into staging

This commit is contained in:
github-actions[bot]
2024-05-15 00:02:38 +00:00
committed by GitHub
25 changed files with 239 additions and 92 deletions
+1 -1
View File
@@ -13154,7 +13154,7 @@
}];
};
michaelpj = {
email = "michaelpj@gmail.com";
email = "me@michaelpj.com";
github = "michaelpj";
githubId = 1699466;
name = "Michael Peyton Jones";
+1 -1
View File
@@ -41,5 +41,5 @@ in {
};
};
meta.maintainers = [ maintainers.michaelpj ];
meta.maintainers = [ ];
}
+1 -1
View File
@@ -45,5 +45,5 @@ in {
};
};
meta.maintainers = [ maintainers.michaelpj ];
meta.maintainers = [ ];
}
@@ -9,7 +9,6 @@
, fetchFromGitHub
, fetchpatch
, ffmpeg
, ffmpeg_4
, fluidsynth
, fmt
, freetype
@@ -890,11 +889,13 @@ in
ppsspp = mkLibretroCore {
core = "ppsspp";
extraNativeBuildInputs = [ cmake pkg-config python3 ];
extraBuildInputs = [ libGLU libGL libzip ffmpeg_4 snappy xorg.libX11 ];
extraBuildInputs = [ libGLU libGL libzip snappy xorg.libX11 ];
makefile = "Makefile";
cmakeFlags = [
"-DLIBRETRO=ON"
"-DUSE_SYSTEM_FFMPEG=ON"
# USE_SYSTEM_FFMPEG=ON causes several glitches during video playback
# See: https://github.com/NixOS/nixpkgs/issues/304616
"-DUSE_SYSTEM_FFMPEG=OFF"
"-DUSE_SYSTEM_SNAPPY=ON"
"-DUSE_SYSTEM_LIBZIP=ON"
"-DOpenGL_GL_PREFERENCE=GLVND"
+1 -1
View File
@@ -18,7 +18,7 @@ buildPythonApplication rec {
description = "Update timezone information based on geoip";
mainProgram = "tzupdate";
homepage = "https://github.com/cdown/tzupdate";
maintainers = [ maintainers.michaelpj ];
maintainers = [ ];
license = licenses.unlicense;
};
}
@@ -6,7 +6,7 @@
python3.pkgs.buildPythonApplication rec {
pname = "flexget";
version = "3.11.31";
version = "3.11.33";
pyproject = true;
# Fetch from GitHub in order to use `requirements.in`
@@ -14,7 +14,7 @@ python3.pkgs.buildPythonApplication rec {
owner = "Flexget";
repo = "Flexget";
rev = "refs/tags/v${version}";
hash = "sha256-lTAC33mw2iHY9Xj4WRgO+Fh+xfjs5vRw6xAZcEaJKhM=";
hash = "sha256-kgTlz3cUztIUKKqmUpUpEwu5qyjE0fCarG/EKJ1PoPc=";
};
postPatch = ''
@@ -6,14 +6,14 @@
python3.pkgs.buildPythonApplication rec {
pname = "snakemake";
version = "8.11.3";
version = "8.11.4";
format = "setuptools";
src = fetchFromGitHub {
owner = "snakemake";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-wNs5OW8bM5LU0Ik77VU47dEq2PlrsfNNtl6Zedocnm4=";
hash = "sha256-nfPA2sQCeRc12A4rrlo17UPpiB8plKYbiumZjS7Yhz8=";
# https://github.com/python-versioneer/python-versioneer/issues/217
postFetch = ''
sed -i "$out"/snakemake/_version.py -e 's#git_refnames = ".*"#git_refnames = " (tag: v${version})"#'
@@ -210,7 +210,10 @@ buildPythonApplication rec {
cp -r linux-package/{bin,share,lib} "$out"
cp linux-package/bin/kitten "$kitten/bin/kitten"
''}
wrapProgram "$out/bin/kitty" --prefix PATH : "$out/bin:${lib.makeBinPath [ imagemagick ncurses.dev ]}"
# dereference the `kitty` symlink to make sure the actual executable
# is wrapped on macOS as well (and not just the symlink)
wrapProgram $(realpath "$out/bin/kitty") --prefix PATH : "$out/bin:${lib.makeBinPath [ imagemagick ncurses.dev ]}"
installShellCompletion --cmd kitty \
--bash <("$out/bin/kitty" +complete setup bash) \
@@ -7,12 +7,12 @@
python3Packages.buildPythonApplication rec {
pname = "streamlink";
version = "6.7.3";
version = "6.7.4";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-Da+J+NOXW+n55LvaPQw6XiRhJJQ4Pc4Z1p21qMym/Xw=";
hash = "sha256-kzdTerEZ/ndSSl1mWq7Ou/sG4suN8o0SYNkodkJXUc4=";
};
patches = [
+5 -11
View File
@@ -2,25 +2,24 @@
, fetchFromGitHub
, gtk4
, libadwaita
, libportal
, meson
, ninja
, pkg-config
, stdenv
, vala
, wrapGAppsHook4
# Clairvoyant shows a non-dismissable banner recommending the use of the Flatpak version
, hideUnsupportedVersionBanner ? false
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clairvoyant";
version = "3.1.3";
version = "3.1.7";
src = fetchFromGitHub {
owner = "cassidyjames";
repo = "clairvoyant";
rev = finalAttrs.version;
hash = "sha256-eAcd8JJmcsz8dm049g5xsF6gPpNQ6ZvGGIhKAoMlPTU=";
hash = "sha256-p9Lgs5z5oRuMQYRKzWp+aQDi0FnxvbQGLZpBigolHUw=";
};
nativeBuildInputs = [
@@ -34,17 +33,12 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
gtk4
libadwaita
libportal
];
preFixup = lib.optionalString hideUnsupportedVersionBanner ''
gappsWrapperArgs+=(
--set container true
)
'';
meta = with lib; {
changelog = "https://github.com/cassidyjames/clairvoyant/releases/tag/${finalAttrs.version}";
description = "Ask questions and get psychic answers";
description = "Ask questions, get psychic answers";
homepage = "https://github.com/cassidyjames/clairvoyant";
license = licenses.gpl3Plus;
mainProgram = "com.github.cassidyjames.clairvoyant";
+3 -3
View File
@@ -16,14 +16,14 @@
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "home-manager";
version = "0-unstable-2024-05-05";
version = "0-unstable-2024-05-12";
src = fetchFromGitHub {
name = "home-manager-source";
owner = "nix-community";
repo = "home-manager";
rev = "3dfe05aa9b5646995ace887931fa60269a039777";
hash = "sha256-QXpLmgmisNK2Zgpnu9DiO9ScrKJuJ4zmiMTNpObVIuk=";
rev = "44677a1c96810a8e8c4ffaeaad10c842402647c1";
hash = "sha256-4pRuzsHZOW5W4CsXI9uhKtiJeQSUoe1d2M9mWU98HC4=";
};
nativeBuildInputs = [
+3 -3
View File
@@ -8,16 +8,16 @@
php.buildComposerProject (finalAttrs: {
pname = "snipe-it";
version = "6.3.4";
version = "6.4.1";
src = fetchFromGitHub {
owner = "snipe";
repo = "snipe-it";
rev = "v${finalAttrs.version}";
hash = "sha256-xjVrf8RgHzVHSyPK+fqLOCS2pjPvUMFUHZtwkrQWHWM=";
hash = "sha256-7IK5KLdWYcdzsJwzXfHsYvxWiR/R4407gGAGiY9+czY=";
};
vendorHash = "sha256-HNMn50gTYtRHH9bKcvrM7fnCMQsf6lBOqr825kgEsvE=";
vendorHash = "sha256-KkFoc/fqYVgA5Vv6oEk+1/Rcj9VA52ZnH5O5qmLhmE4=";
postInstall = ''
snipe_it_out="$out/share/php/snipe-it"
@@ -11,13 +11,13 @@
stdenvNoCC.mkDerivation rec {
pname = "whatsapp-emoji-linux";
version = "2.24.2.76-1";
version = "2.24.8.85-1";
src = fetchFromGitHub {
rev = "refs/tags/${version}";
owner = "dmlls";
repo = "whatsapp-emoji-linux";
hash = "sha256-BviYvhH/iu5N0+YtL4d6andbWL87LFU98pxUgt4NcsM=";
hash = "sha256-6bei+kR+5UF4GQ140sUXy8TDXZKNFmM+XgvMKf+8s2Y=";
};
makeFlags = [
+5 -7
View File
@@ -30,13 +30,11 @@ in stdenv.mkDerivation rec {
LLVM_CONFIG = "${llvmPackages.llvm.dev}/bin/llvm-config";
postPatch = lib.optionalString stdenv.isDarwin ''
sed -i src/main.cpp \
-e 's|-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk|-syslibroot ${MacOSX-SDK}|'
'' + ''
sed -i build_odin.sh \
-e 's/^GIT_SHA=.*$/GIT_SHA=/' \
-e 's/LLVM-C/LLVM/' \
-e 's/framework System/lSystem/'
substituteInPlace src/linker.cpp \
--replace-fail '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' ${MacOSX-SDK}
'' + ''
substituteInPlace build_odin.sh \
--replace-fail '-framework System' '-lSystem'
patchShebangs build_odin.sh
'';
@@ -6,6 +6,9 @@
# build-system
, setuptools
# build-time dependencies
, gettext
# dependencies
, django
, python3-openid
@@ -41,6 +44,7 @@ buildPythonPackage rec {
};
nativeBuildInputs = [
gettext
setuptools
];
@@ -52,6 +56,8 @@ buildPythonPackage rec {
requests-oauthlib
] ++ pyjwt.optional-dependencies.crypto;
preBuild = "python -m django compilemessages";
passthru.optional-dependencies = {
saml = [
python3-saml
@@ -1,23 +1,24 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, hypothesis
, jsonpath-ng
, lupa
, poetry-core
, pybloom-live
, pyprobables
, pytest-asyncio
, pytest-mock
, pytestCheckHook
, pythonOlder
, redis
, sortedcontainers
{
lib,
buildPythonPackage,
fetchFromGitHub,
hypothesis,
jsonpath-ng,
lupa,
poetry-core,
pybloom-live,
pyprobables,
pytest-asyncio,
pytest-mock,
pytestCheckHook,
pythonOlder,
redis,
sortedcontainers,
}:
buildPythonPackage rec {
pname = "fakeredis";
version = "2.21.3";
version = "2.23.0";
pyproject = true;
disabled = pythonOlder "3.7";
@@ -26,14 +27,12 @@ buildPythonPackage rec {
owner = "dsoftwareinc";
repo = "fakeredis-py";
rev = "refs/tags/v${version}";
hash = "sha256-GIg+a8G5S0dmbvMKqS/Vn+wzNM6iNIs3bKPqhecsQt4=";
hash = "sha256-qiqJO8uZ3vy9TpTHmExlUoQ78avPVqlKn0jgvDsKdP0=";
};
nativeBuildInputs = [
poetry-core
];
build-system = [ poetry-core ];
propagatedBuildInputs = [
dependencies = [
redis
sortedcontainers
];
@@ -46,25 +45,18 @@ buildPythonPackage rec {
];
passthru.optional-dependencies = {
lua = [
lupa
];
json = [
jsonpath-ng
];
bf = [
pyprobables
];
cf = [
pyprobables
];
probabilistic = [
pyprobables
];
lua = [ lupa ];
json = [ jsonpath-ng ];
bf = [ pyprobables ];
cf = [ pyprobables ];
probabilistic = [ pyprobables ];
};
pythonImportsCheck = [
"fakeredis"
pythonImportsCheck = [ "fakeredis" ];
disabledTests = [
# AssertionError
"test_command"
];
meta = with lib; {
@@ -189,7 +189,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Language and compiler for writing highly efficient custom Deep-Learning primitives";
homepage = "https://github.com/openai/triton";
platforms = lib.platforms.unix;
platforms = platforms.linux;
license = licenses.mit;
maintainers = with maintainers; [ SomeoneSerge Madouura ];
};
@@ -1,4 +1,5 @@
{ lib
, stdenv
, fetchFromGitHub
, buildPythonPackage
, substituteAll
@@ -44,17 +45,17 @@ buildPythonPackage rec {
nativeBuildInputs = [
setuptools
scipy
];
propagatedBuildInputs = [
more-itertools
numba
numpy
openai-triton
tiktoken
torch
tqdm
] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform openai-triton) [
openai-triton
];
preCheck = ''
@@ -63,6 +64,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
pytestCheckHook
scipy
];
disabledTests = [
+3 -3
View File
@@ -1,6 +1,7 @@
{ lib, stdenv, fetchFromGitHub, swift, AppKit, Foundation, UniformTypeIdentifiers }:
{ lib, swiftPackages, fetchFromGitHub }:
let
inherit (swiftPackages) apple_sdk stdenv swift;
arch = if stdenv.isAarch64 then "arm64" else "x86_64";
in
stdenv.mkDerivation rec {
@@ -16,7 +17,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ swift ];
buildInputs = [ AppKit Foundation UniformTypeIdentifiers ];
buildInputs = with apple_sdk.frameworks; [ AppKit Foundation UniformTypeIdentifiers ];
makeFlags = [ "openwith_${arch}" ];
@@ -32,6 +33,5 @@ stdenv.mkDerivation rec {
license = licenses.unlicense;
maintainers = with maintainers; [ zowoq ];
platforms = [ "aarch64-darwin" "x86_64-darwin" ];
broken = stdenv.isx86_64; # https://hydra.nixos.org/build/219354133/nixlog/3
};
}
+6
View File
@@ -34,6 +34,12 @@ stdenvNoCC.mkDerivation (finalAttrs: {
})
# The webroot is hardcoded as ./wwwroot
./change-webroot.diff
# Upstream removes database migrations between versions
# Restore them to avoid breaking on updates
# Info: Restores migrations for versions between v0.7.1.4 and v0.7.9
# On update: check if more migrations need to be restored!
# Migrations should at least allow updates from previous NixOS versions
./restore-migrations.diff
];
postPatch = ''
substituteInPlace API/Services/DirectoryService.cs --subst-var out
@@ -0,0 +1,147 @@
diff --git a/API/Data/ManualMigrations/MigrateDisableScrobblingOnComicLibraries.cs b/API/Data/ManualMigrations/MigrateDisableScrobblingOnComicLibraries.cs
new file mode 100644
index 00000000..0de7bf5d
--- /dev/null
+++ b/API/Data/ManualMigrations/MigrateDisableScrobblingOnComicLibraries.cs
@@ -0,0 +1,38 @@
+using System.Linq;
+using System.Threading.Tasks;
+using API.Entities.Enums;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.Logging;
+
+namespace API.Data.ManualMigrations;
+
+/// <summary>
+/// v0.7.4 introduced Scrobbling with Kavita+. By default, it is on, but Comic libraries have no scrobble providers, so disable
+/// </summary>
+public static class MigrateDisableScrobblingOnComicLibraries
+{
+ public static async Task Migrate(IUnitOfWork unitOfWork, DataContext dataContext, ILogger<Program> logger)
+ {
+ if (!await dataContext.Library.Where(s => s.Type == LibraryType.Comic).Where(l => l.AllowScrobbling).AnyAsync())
+ {
+ return;
+ }
+ logger.LogInformation("Running MigrateDisableScrobblingOnComicLibraries migration. Please be patient, this may take some time");
+
+
+ foreach (var lib in await dataContext.Library.Where(s => s.Type == LibraryType.Comic).Where(l => l.AllowScrobbling).ToListAsync())
+ {
+ lib.AllowScrobbling = false;
+ unitOfWork.LibraryRepository.Update(lib);
+ }
+
+ if (unitOfWork.HasChanges())
+ {
+ await unitOfWork.CommitAsync();
+ }
+
+ logger.LogInformation("MigrateDisableScrobblingOnComicLibraries migration finished");
+
+ }
+
+}
diff --git a/API/Data/ManualMigrations/MigrateLoginRoles.cs b/API/Data/ManualMigrations/MigrateLoginRoles.cs
new file mode 100644
index 00000000..f649908a
--- /dev/null
+++ b/API/Data/ManualMigrations/MigrateLoginRoles.cs
@@ -0,0 +1,36 @@
+using System.Threading.Tasks;
+using API.Constants;
+using API.Entities;
+using Microsoft.AspNetCore.Identity;
+using Microsoft.Extensions.Logging;
+
+namespace API.Data.ManualMigrations;
+
+/// <summary>
+/// Added in v0.7.1.18
+/// </summary>
+public static class MigrateLoginRoles
+{
+ /// <summary>
+ /// Will not run if any users have the <see cref="PolicyConstants.LoginRole"/> role already
+ /// </summary>
+ /// <param name="unitOfWork"></param>
+ /// <param name="userManager"></param>
+ /// <param name="logger"></param>
+ public static async Task Migrate(IUnitOfWork unitOfWork, UserManager<AppUser> userManager, ILogger<Program> logger)
+ {
+ var usersWithRole = await userManager.GetUsersInRoleAsync(PolicyConstants.LoginRole);
+ if (usersWithRole.Count != 0) return;
+
+ logger.LogCritical("Running MigrateLoginRoles migration");
+
+ var allUsers = await unitOfWork.UserRepository.GetAllUsersAsync();
+ foreach (var user in allUsers)
+ {
+ await userManager.RemoveFromRoleAsync(user, PolicyConstants.LoginRole);
+ await userManager.AddToRoleAsync(user, PolicyConstants.LoginRole);
+ }
+
+ logger.LogInformation("MigrateLoginRoles migration complete");
+ }
+}
diff --git a/API/Data/ManualMigrations/MigrateRemoveWebPSettingRows.cs b/API/Data/ManualMigrations/MigrateRemoveWebPSettingRows.cs
new file mode 100644
index 00000000..07e98ef6
--- /dev/null
+++ b/API/Data/ManualMigrations/MigrateRemoveWebPSettingRows.cs
@@ -0,0 +1,31 @@
+using System.Threading.Tasks;
+using API.Entities.Enums;
+using Microsoft.Extensions.Logging;
+
+namespace API.Data.ManualMigrations;
+
+/// <summary>
+/// Added in v0.7.2.7/v0.7.3 in which the ConvertXToWebP Setting keys were removed. This migration will remove them.
+/// </summary>
+public static class MigrateRemoveWebPSettingRows
+{
+ public static async Task Migrate(IUnitOfWork unitOfWork, ILogger<Program> logger)
+ {
+ logger.LogCritical("Running MigrateRemoveWebPSettingRows migration - Please be patient, this may take some time. This is not an error");
+
+ var key = await unitOfWork.SettingsRepository.GetSettingAsync(ServerSettingKey.ConvertBookmarkToWebP);
+ var key2 = await unitOfWork.SettingsRepository.GetSettingAsync(ServerSettingKey.ConvertCoverToWebP);
+ if (key == null && key2 == null)
+ {
+ logger.LogCritical("Running MigrateRemoveWebPSettingRows migration - complete. Nothing to do");
+ return;
+ }
+
+ unitOfWork.SettingsRepository.Remove(key);
+ unitOfWork.SettingsRepository.Remove(key2);
+
+ await unitOfWork.CommitAsync();
+
+ logger.LogCritical("Running MigrateRemoveWebPSettingRows migration - Completed. This is not an error");
+ }
+}
diff --git a/API/Startup.cs b/API/Startup.cs
index 21c4fa45..04f4a077 100644
--- a/API/Startup.cs
+++ b/API/Startup.cs
@@ -232,11 +232,19 @@ public class Startup
Task.Run(async () =>
{
// Apply all migrations on startup
+ var userManager = serviceProvider.GetRequiredService<UserManager<AppUser>>();
var dataContext = serviceProvider.GetRequiredService<DataContext>();
logger.LogInformation("Running Migrations");
+ // v0.7.2
+ await MigrateLoginRoles.Migrate(unitOfWork, userManager, logger);
+ // v0.7.3
+ await MigrateRemoveWebPSettingRows.Migrate(unitOfWork, logger);
+ // v0.7.4
+ await MigrateDisableScrobblingOnComicLibraries.Migrate(unitOfWork, dataContext, logger);
+
// v0.7.9
await MigrateUserLibrarySideNavStream.Migrate(unitOfWork, dataContext, logger);
+3 -3
View File
@@ -24,7 +24,7 @@
}:
let
version = "0.92.1";
version = "0.93.0";
in
rustPlatform.buildRustPackage {
@@ -35,10 +35,10 @@ rustPlatform.buildRustPackage {
owner = "nushell";
repo = "nushell";
rev = version;
hash = "sha256-itr/n8fodi9EvED6j4UMGFUaF42UVhgkGws8A5JqBA8=";
hash = "sha256-s/aJVk+45Ietegb9Cn19/U3NlNMHQh2GezHkoIRxRrk=";
};
cargoHash = "sha256-s2O/6g3+fAkiqZwq3PUDpaFtG+uj/3pSs3eZbCbAcuQ=";
cargoHash = "sha256-0xwo3M5uog6v0VcT9IhNZ22/xIhUShVNt6Vkp3GpsNI=";
nativeBuildInputs = [ pkg-config ]
++ lib.optionals (withDefaultFeatures && stdenv.isLinux) [ python3 ]
+1 -1
View File
@@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec {
description = "A general-purpose fuzzy selector";
homepage = "https://github.com/rschmitt/heatseeker";
license = licenses.mit;
maintainers = [ maintainers.michaelpj ];
maintainers = [ ];
mainProgram = "hs";
platforms = platforms.unix;
};
+1 -1
View File
@@ -52,6 +52,6 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/erpalma/throttled";
license = licenses.mit;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ michaelpj ];
maintainers = with maintainers; [ ];
};
}
+1 -3
View File
@@ -172,9 +172,7 @@ impure-cmds // appleSourcePackages // chooseLibs // {
inherit (apple_sdk_11_0.libs) simd;
};
openwith = pkgs.darwin.apple_sdk_11_0.callPackage ../os-specific/darwin/openwith {
inherit (apple_sdk_11_0.frameworks) AppKit Foundation UniformTypeIdentifiers;
};
openwith = callPackage ../os-specific/darwin/openwith { };
stubs = pkgs.callPackages ../os-specific/darwin/stubs { };