Skip to content

Commit

Permalink
alexandria: init at 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Bot-wxt1221 committed Oct 5, 2024
1 parent 413aa25 commit 6c86aca
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions pkgs/by-name/al/alexandria/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
rustPlatform,
lib,
fetchFromGitHub,
pkg-config,
webkitgtk,
openssl,
libclang,
nodejs,
npmHooks,
fetchNpmDeps,
wrapGAppsHook4,
cargo-tauri,
}:

rustPlatform.buildRustPackage rec {
pname = "alexandria";
version = "0.12";

src = fetchFromGitHub {
owner = "btpf";
repo = "Alexandria";
rev = "refs/tags/v${version}";
hash = "sha256-NX89Sg639dSwUcUGrpgmdcO4tXl2iszctiRDcBVLbUA=";
fetchSubmodules = true;
};

prePatch = ''
chmod +w .. # make sure that /build/source is writeable
'';

npmDeps = fetchNpmDeps {
inherit src;
sourceRoot = "${src.name}";
hash = "sha256-/RGaZMCJftjzvFLp8J/d9+MsxQwe7P0WfISz0JE3fn4=";
};

cargoHash = "sha256-W8HCpGuDkq8XfdrSvYfAHyX+oh30/bX29qdclN4P5yo=";

env = {
OPENSSL_NO_VENDOR = 1;
LIBCLANG_PATH = "${lib.getLib libclang}/lib";
};

nativeBuildInputs = [
cargo-tauri.hook
nodejs
npmHooks.npmConfigHook
pkg-config
wrapGAppsHook4
];

buildInputs = [
openssl
webkitgtk
];

npmRoot = "..";

sourceRoot = "${src.name}/src-tauri";

buildAndTestDir = ".";

meta = {
homepage = "https://github.com/btpf/Alexandria";
changelog = "https://github.com/btpf/Alexandria/releases/tag/v${version}";
description = "Minimalistic cross-platform eBook reader";
maintainers = with lib.maintainers; [ bot-wxt1221 ];
mainProgram = "alexandria";
platforms = lib.platforms.linux;
license = lib.licenses.gpl3Plus;
};
}

0 comments on commit 6c86aca

Please sign in to comment.