Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
38 lines
820 B
Nix
38 lines
820 B
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
makeWrapper,
|
|
calibre,
|
|
gitUpdater,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "unbook";
|
|
version = "0.9.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ludios";
|
|
repo = "unbook";
|
|
rev = version;
|
|
hash = "sha256-whWWh/jQ4RkGA3T1VCmt6zhpQQCzh2jASYg69IlfEeo=";
|
|
};
|
|
|
|
cargoHash = "sha256-whmp4ST89TZuxQe9fnkW98A9t3rwpTdQCej49ZsDanE=";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/unbook --prefix PATH : ${lib.makeBinPath [ calibre ]}
|
|
'';
|
|
|
|
passthru.updateScript = gitUpdater { };
|
|
|
|
meta = with lib; {
|
|
description = "Ebook to self-contained-HTML converter";
|
|
homepage = "https://unbook.ludios.org";
|
|
license = licenses.cc0;
|
|
maintainers = with maintainers; [ jmbaur ];
|
|
mainProgram = "unbook";
|
|
};
|
|
}
|