depot/third_party/nixpkgs/pkgs/by-name/un/unbook/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

34 lines
756 B
Nix

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