Update redlib

This commit is contained in:
NullBite 2024-11-01 10:40:52 +01:00
parent a49008684a
commit bf258849bc
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
2 changed files with 12 additions and 7 deletions

View File

@ -51,6 +51,5 @@ in {
redlib = let redlib = let
redlib-new = final.callPackage nixfiles.packages.${prev.system}.redlib.override {}; redlib-new = final.callPackage nixfiles.packages.${prev.system}.redlib.override {};
inherit (prev) redlib; inherit (prev) redlib;
notOlder = (builtins.compareVersions redlib-new.version redlib.version) >= 0; in pickNewer redlib-new redlib;
in if notOlder then redlib-new else redlib;
} }

View File

@ -5,23 +5,23 @@
, rustPlatform , rustPlatform
, fetchFromGitHub , fetchFromGitHub
, darwin , darwin
, nix-update-script
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "redlib"; pname = "redlib";
version = "0.35.1"; version = "0.35.1-unstable-2024-11-01";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "redlib-org"; owner = "redlib-org";
repo = "redlib"; repo = "redlib";
# rev = "refs/tags/v${version}"; rev = "d17d097b12b227f2e783a05cbd1e37c80f9ebe0b";
rev = "793047f63f0f603e342c919bbfc469c7569276fa"; hash = "sha256-MT1FtRszFQuUMGaM4t0Zw+xOeMnK+kvG69SdyAbFB0A=";
hash = "sha256-A6t/AdKP3fCEyIo8fTIirZAlZPfyS8ba3Pejp8J6AUQ=";
}; };
patches = [ patches = [
]; ];
cargoHash = "sha256-rJXKH9z8DC+7qqawbnSkYoQby6hBLLM6in239Wc8rvk="; cargoHash = "sha256-PNqecQSx0Q+K3bBfbOJYWPdl7JdUTDQ4f95RUuW0vPw=";
buildInputs = lib.optionals stdenv.isDarwin [ buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.Security
@ -33,6 +33,9 @@ rustPlatform.buildRustPackage rec {
"--skip=test_gated_and_quarantined" "--skip=test_gated_and_quarantined"
"--skip=test_fetching_nsfw_subreddit" "--skip=test_fetching_nsfw_subreddit"
"--skip=test_fetching_ws" "--skip=test_fetching_ws"
"--skip=test_private_sub"
"--skip=test_banned_sub"
"--skip=test_gated_sub"
"--skip=test_obfuscated_share_link" "--skip=test_obfuscated_share_link"
"--skip=test_share_link_strip_json" "--skip=test_share_link_strip_json"
@ -45,6 +48,7 @@ rustPlatform.buildRustPackage rec {
"--skip=test_oauth_client" "--skip=test_oauth_client"
"--skip=test_oauth_client_refresh" "--skip=test_oauth_client_refresh"
"--skip=test_oauth_token_exists" "--skip=test_oauth_token_exists"
"--skip=test_oauth_headers_len"
]; ];
env = { env = {
@ -55,6 +59,8 @@ rustPlatform.buildRustPackage rec {
inherit (nixosTests) redlib; inherit (nixosTests) redlib;
}; };
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch=main" ]; };
meta = { meta = {
changelog = "https://github.com/redlib-org/redlib/releases/tag/v${version}"; changelog = "https://github.com/redlib-org/redlib/releases/tag/v${version}";
description = "Private front-end for Reddit (Continued fork of Libreddit)"; description = "Private front-end for Reddit (Continued fork of Libreddit)";