Skip to content

Commit 975bf7a

Browse files
committed
alexandria: init at 0.12
1 parent f2af434 commit 975bf7a

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
rustPlatform,
3+
lib,
4+
fetchFromGitHub,
5+
libsoup,
6+
pkg-config,
7+
webkitgtk_4_0,
8+
openssl,
9+
nodejs,
10+
npmHooks,
11+
fetchNpmDeps,
12+
gtk3,
13+
wrapGAppsHook3,
14+
cargo-tauri,
15+
}:
16+
17+
rustPlatform.buildRustPackage rec {
18+
pname = "alexandria";
19+
version = "0.12";
20+
21+
src = fetchFromGitHub {
22+
owner = "btpf";
23+
repo = "Alexandria";
24+
rev = "refs/tags/v${version}";
25+
hash = "sha256-NX89Sg639dSwUcUGrpgmdcO4tXl2iszctiRDcBVLbUA=";
26+
fetchSubmodules = true;
27+
};
28+
29+
prePatch = ''
30+
chmod +w .. # make sure that /build/source is writeable
31+
'';
32+
33+
npmDeps = fetchNpmDeps {
34+
inherit src;
35+
sourceRoot = "${src.name}";
36+
hash = "sha256-/RGaZMCJftjzvFLp8J/d9+MsxQwe7P0WfISz0JE3fn4=";
37+
};
38+
39+
cargoHash = "sha256-W8HCpGuDkq8XfdrSvYfAHyX+oh30/bX29qdclN4P5yo=";
40+
41+
env = {
42+
OPENSSL_NO_VENDOR = 1;
43+
};
44+
45+
nativeBuildInputs = [
46+
cargo-tauri.hook
47+
nodejs
48+
npmHooks.npmConfigHook
49+
pkg-config
50+
rustPlatform.bindgenHook
51+
wrapGAppsHook3
52+
];
53+
54+
buildInputs = [
55+
openssl
56+
webkitgtk_4_0
57+
gtk3
58+
libsoup
59+
];
60+
61+
npmRoot = "..";
62+
63+
sourceRoot = "${src.name}/src-tauri";
64+
65+
buildAndTestDir = ".";
66+
67+
meta = {
68+
homepage = "https://github.com/btpf/Alexandria";
69+
changelog = "https://github.com/btpf/Alexandria/releases/tag/v${version}";
70+
description = "Minimalistic cross-platform eBook reader";
71+
maintainers = with lib.maintainers; [ bot-wxt1221 ];
72+
mainProgram = "alexandria";
73+
platforms = [
74+
"x86_64-linux"
75+
"aarch64-darwin"
76+
"x86_64-darwin"
77+
];
78+
license = lib.licenses.gpl3Plus;
79+
};
80+
}

0 commit comments

Comments
 (0)