Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readest: init at 0.9.7 #372249

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions pkgs/by-name/re/readest/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
rustPlatform,
pnpm_9,
cargo-tauri,
nodejs,
pkg-config,
webkitgtk_4_1,
wrapGAppsHook3,
fetchFromGitHub,
gtk3,
librsvg,
openssl,
autoPatchelfHook,
lib,
nix-update-script,
moreutils,
jq,
}:

rustPlatform.buildRustPackage rec {
pname = "readest";
version = "0.9.7";

src = fetchFromGitHub {
owner = "readest";
repo = "readest";
tag = "v${version}";
hash = "sha256-2mxWF+Lel1PFPHxf5b9IhWUgg2RHiTZjb7QHvVwZ4Uw=";
fetchSubmodules = true;
};

postUnpack = ''
chmod -R +w .
'';

sourceRoot = "${src.name}/apps/readest-app";

pnpmDeps = pnpm_9.fetchDeps {
inherit pname version src;
hash = "sha256-p5G9h4DOonwfe2B7Duy4/YbKwv2pmE6RxsnILYIOsT8=";
};

pnpmRoot = "../..";

cargoHash = "sha256-KoF6ks3G3XkcjGbJH3qT9xjx+iX2/3Ph/d0I0VGj5L8=";

cargoRoot = "../..";

buildAndTestSubdir = "src-tauri";

postPatch = ''
substituteInPlace src-tauri/Cargo.toml \
--replace-fail '"devtools"' '"devtools", "rustls-tls"'
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
'';

nativeBuildInputs = [
cargo-tauri.hook
nodejs
pnpm_9.configHook
pkg-config
wrapGAppsHook3
autoPatchelfHook
moreutils
jq
];

buildInputs = [
webkitgtk_4_1
gtk3
librsvg
openssl
];

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";
mainProgram = "readest";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ aucub ];
platforms = lib.platforms.linux;
};
}