Files
nixpkgs/pkgs/by-name/re/readest/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

109 lines
2.4 KiB
Nix

{
rustPlatform,
pnpm_9,
cargo-tauri,
nodejs,
pkg-config,
webkitgtk_4_1,
wrapGAppsHook3,
fetchFromGitHub,
gtk3,
librsvg,
openssl,
autoPatchelfHook,
lib,
nix-update-script,
moreutils,
jq,
gst_all_1,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "readest";
version = "0.9.82";
src = fetchFromGitHub {
owner = "readest";
repo = "readest";
tag = "v${finalAttrs.version}";
hash = "sha256-vdmWmSh0JqEAkgH9k3ZCjzBvUyNpt+ZH1uDtYiKHxRA=";
fetchSubmodules = true;
};
postUnpack = ''
# pnpm.configHook has to write to ../.., as our sourceRoot is set to apps/readest-app
chmod -R +w .
'';
sourceRoot = "${finalAttrs.src.name}/apps/readest-app";
pnpmDeps = pnpm_9.fetchDeps {
inherit (finalAttrs) pname version src;
fetcherVersion = 1;
hash = "sha256-sRa1IO8JmMsA0/7dMuYF0as/MYHpclEwAknZIycNQ3Y=";
};
pnpmRoot = "../..";
cargoHash = "sha256-oNzgsxJb8N++AGCkXuJmK+51iF7XZ0xmShPlOpkAQEg=";
cargoRoot = "../..";
buildAndTestSubdir = "src-tauri";
postPatch = ''
substituteInPlace src-tauri/tauri.conf.json \
--replace-fail '"createUpdaterArtifacts": true' '"createUpdaterArtifacts": false' \
--replace-fail '"Readest"' '"readest"'
jq 'del(.plugins."deep-link")' src-tauri/tauri.conf.json | sponge src-tauri/tauri.conf.json
substituteInPlace src/services/constants.ts \
--replace-fail "autoCheckUpdates: true" "autoCheckUpdates: false" \
--replace-fail "telemetryEnabled: true" "telemetryEnabled: false"
'';
nativeBuildInputs = [
cargo-tauri.hook
nodejs
pnpm_9.configHook
pkg-config
wrapGAppsHook3
autoPatchelfHook
moreutils
jq
];
buildInputs = [
webkitgtk_4_1
gtk3
librsvg
openssl
# TTS
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
];
preBuild = ''
pnpm setup-pdfjs
'';
preFixup = ''
gappsWrapperArgs+=(
--set-default WEBKIT_DISABLE_DMABUF_RENDERER 1
)
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Modern, feature-rich ebook reader";
homepage = "https://github.com/readest/readest";
changelog = "https://github.com/readest/readest/releases/tag/v${finalAttrs.version}";
mainProgram = "readest";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ eljamm ];
platforms = lib.platforms.linux;
};
})