libreddit: remove as unmaintained upstream

This commit is contained in:
Guanran Wang 2024-07-17 22:07:18 +08:00
parent 9355fa86e6
commit f7a0c71b61
No known key found for this signature in database
GPG Key ID: 91F97D9ED12639CF
8 changed files with 13 additions and 70 deletions

View File

@ -758,7 +758,6 @@
./services/misc/klipper.nix
./services/misc/languagetool.nix
./services/misc/leaps.nix
./services/misc/libreddit.nix
./services/misc/lidarr.nix
./services/misc/lifecycled.nix
./services/misc/llama-cpp.nix
@ -803,6 +802,7 @@
./services/misc/pykms.nix
./services/misc/radarr.nix
./services/misc/readarr.nix
./services/misc/redlib.nix
./services/misc/redmine.nix
./services/misc/renovate.nix
./services/misc/ripple-data-api.nix

View File

@ -3,7 +3,7 @@
with lib;
let
cfg = config.services.libreddit;
cfg = config.services.redlib;
args = concatStringsSep " " ([
"--port ${toString cfg.port}"
@ -11,11 +11,15 @@ let
]);
in
{
imports = [
(mkRenamedOptionModule [ "services" "libreddit" ] [ "services" "redlib" ])
];
options = {
services.libreddit = {
services.redlib = {
enable = mkEnableOption "Private front-end for Reddit";
package = mkPackageOption pkgs "libreddit" { };
package = mkPackageOption pkgs "redlib" { };
address = mkOption {
default = "0.0.0.0";
@ -34,14 +38,14 @@ in
openFirewall = mkOption {
type = types.bool;
default = false;
description = "Open ports in the firewall for the libreddit web interface";
description = "Open ports in the firewall for the redlib web interface";
};
};
};
config = mkIf cfg.enable {
systemd.services.libreddit = {
systemd.services.redlib = {
description = "Private front-end for Reddit";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];

View File

@ -502,7 +502,6 @@ in {
leaps = handleTest ./leaps.nix {};
lemmy = handleTest ./lemmy.nix {};
libinput = handleTest ./libinput.nix {};
libreddit = handleTest ./libreddit.nix {};
librenms = handleTest ./librenms.nix {};
libresprite = handleTest ./libresprite.nix {};
libreswan = runTest ./libreswan.nix;

View File

@ -1,19 +0,0 @@
import ./make-test-python.nix ({ lib, ... }:
{
name = "libreddit";
meta.maintainers = with lib.maintainers; [ fab ];
nodes.machine = {
services.libreddit.enable = true;
# Test CAP_NET_BIND_SERVICE
services.libreddit.port = 80;
};
testScript = ''
machine.wait_for_unit("libreddit.service")
machine.wait_for_open_port(80)
# Query a page that does not require Internet access
machine.succeed("curl --fail http://localhost:80/settings")
'';
})

View File

@ -3,7 +3,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
meta.maintainers = with lib.maintainers; [ soispha ];
nodes.machine = {
services.libreddit = {
services.redlib = {
package = pkgs.redlib;
enable = true;
# Test CAP_NET_BIND_SERVICE
@ -12,7 +12,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
};
testScript = ''
machine.wait_for_unit("libreddit.service")
machine.wait_for_unit("redlib.service")
machine.wait_for_open_port(80)
# Query a page that does not require Internet access
machine.succeed("curl --fail http://localhost:80/settings")

View File

@ -1,38 +0,0 @@
{ lib
, stdenv
, nixosTests
, rustPlatform
, fetchFromGitHub
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "libreddit";
version = "0.30.1";
src = fetchFromGitHub {
owner = "libreddit";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-Z+COSDiJoWHHZQM4BJca0JA5RrJKYjhfkFj8yx/0gZA=";
};
cargoHash = "sha256-42xtt5dCcV6+TcssFjufkVtDSRiDGaatAaiP6K8DT8I=";
buildInputs = lib.optionals stdenv.isDarwin [
Security
];
passthru.tests = {
inherit (nixosTests) libreddit;
};
meta = with lib; {
description = "Private front-end for Reddit";
mainProgram = "libreddit";
homepage = "https://github.com/libreddit/libreddit";
changelog = "https://github.com/libreddit/libreddit/releases/tag/v${version}";
license = with licenses; [ agpl3Only ];
maintainers = with maintainers; [ fab jojosch ];
};
}

View File

@ -729,6 +729,7 @@ mapAliases ({
librdf = lrdf; # Added 2020-03-22
LibreArp = librearp; # Added 2024-06-12
LibreArp-lv2 = librearp-lv2; # Added 2024-06-12
libreddit = throw "'libreddit' has been removed because it is unmaintained upstream. Consider using 'redlib', a maintained fork"; # Added 2024-07-17
libressl_3_5 = throw "'libressl_3_5' has reached end-of-life "; # Added 2023-05-07
librtlsdr = rtl-sdr; # Added 2023-02-18
librewolf-wayland = librewolf; # Added 2022-11-15

View File

@ -10175,10 +10175,6 @@ with pkgs;
libzmf = callPackage ../development/libraries/libzmf { };
libreddit = callPackage ../servers/libreddit {
inherit (darwin.apple_sdk.frameworks) Security;
};
librespeed-cli = callPackage ../tools/misc/librespeed-cli { };
libreswan = callPackage ../tools/networking/libreswan { };