From 6998c8dcd5d36a3c2fbf0ed65bdabd8113138cb0 Mon Sep 17 00:00:00 2001 From: Jakob Ankarhem Date: Mon, 13 Apr 2026 13:34:57 +0200 Subject: [PATCH] use fork of redlib --- modules/redlib.nix | 3 ++- packages/redlib.nix | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 packages/redlib.nix diff --git a/modules/redlib.nix b/modules/redlib.nix index a3985d0..a0e18bd 100644 --- a/modules/redlib.nix +++ b/modules/redlib.nix @@ -4,11 +4,12 @@ let in { flake.modules.nixos.redlib = - { config, ... }: + { config, pkgs, ... }: { services.redlib = { enable = true; address = "127.0.0.1"; + package = pkgs.local.redlib; inherit port; settings = { diff --git a/packages/redlib.nix b/packages/redlib.nix new file mode 100644 index 0000000..9ca5449 --- /dev/null +++ b/packages/redlib.nix @@ -0,0 +1,34 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + perl, +}: + +# TODO: Remove this once redlib fixes their annoying issues +rustPlatform.buildRustPackage (_: { + pname = "redlib"; + version = "0-unstable-2025-12-04"; + + src = fetchFromGitHub { + owner = "chowder"; + repo = "redlib"; + rev = "42fe41bc4c64690aa91cd1cfecec3bad3438354f"; + hash = "sha256-iYH5WeQLitDA6unTJoR0+DYQWmTSQd0WRFfwRYvkVHI="; + }; + + __structuredAttrs = true; + + cargoHash = "sha256-/oSZR/VMYyDTA9b48EXll/FC7UwN0xhA9BtQVwrBoMk="; + + doCheck = false; + nativeBuildInputs = [ perl ]; + + meta = { + description = "Private front-end for Reddit"; + homepage = "https://github.com/redlib-org/redlib"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ KP64 ]; + mainProgram = "redlib"; + }; +}) -- 2.54.0