depot/third_party/nixpkgs/pkgs/by-name/un/unbook/package.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

34 lines
759 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, makeWrapper
, calibre
}:
rustPlatform.buildRustPackage rec {
pname = "unbook";
version = "0.7.3";
src = fetchFromGitHub {
owner = "ludios";
repo = "unbook";
rev = version;
hash = "sha256-KYnSIT/zIrbDFRWIaQRto0sPPmpJC8V7f00j4t/AsGQ=";
};
cargoHash = "sha256-AjyeTFgjl3XLplo8w9jne5FyKd2EciwbAKKiaDshpcA=";
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";
};
}