2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, calibre
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "unbook";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.8.2";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ludios";
|
|
|
|
repo = "unbook";
|
|
|
|
rev = version;
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-THCPJ4zOKSXKZDa5DuqpBfBKZ96TdFEuDMVw/HmO7Eo=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
cargoHash = "sha256-EbSayNz9cPmMDQOaOiyQAYmtlnb+4jzbffm1On0BBxI=";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/unbook --prefix PATH : ${lib.makeBinPath [ calibre ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An ebook to self-contained-HTML converter";
|
|
|
|
homepage = "https://unbook.ludios.org";
|
|
|
|
license = licenses.cc0;
|
|
|
|
maintainers = with maintainers; [ jmbaur ];
|
|
|
|
mainProgram = "unbook";
|
|
|
|
};
|
|
|
|
}
|