depot/third_party/nixpkgs/pkgs/by-name/un/unbook/package.nix
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

34 lines
759 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 = "An ebook to self-contained-HTML converter";
homepage = "https://unbook.ludios.org";
license = licenses.cc0;
maintainers = with maintainers; [ jmbaur ];
mainProgram = "unbook";
};
}