68 lines
1.6 KiB
Nix
68 lines
1.6 KiB
Nix
{ rustPlatform, lib, fetchFromGitHub, python3Packages, ... }: let
|
|
pname = "nuber";
|
|
version = "1.1.0";
|
|
src = fetchFromGitHub {
|
|
owner = "mtshrmn";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "yjVu3GwdyiGKVRlETeLT0ww8ftvPRobJYzvesoPxrRo=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
# NOTE: This builds fine now.
|
|
html2text = rustPlatform.buildRustPackage {
|
|
pname = "html2text";
|
|
version = "unstable";
|
|
src = "${src}/rust-html2text";
|
|
|
|
cargoPatches = [ ./html2text-cargo-lock.patch ];
|
|
patches = [ "${src}/html2text.patch" ];
|
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
lockFile = ./html2text-Cargo.lock;
|
|
};
|
|
|
|
# Tests don't compile after patch.
|
|
doCheck = false;
|
|
};
|
|
|
|
# TODO: This somehow needs to use the html2text built above.
|
|
# Look into possibly overriding the Cargo.lock file, or
|
|
#
|
|
in python3Packages.buildPythonPackage rec {
|
|
inherit pname version src;
|
|
|
|
format = "pyproject";
|
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
lockFile = "${src}/Cargo.lock";
|
|
# lockFile = let
|
|
# initialCargoLock = lib.importTOML "${src}/Cargo.lock";
|
|
# processedCargoLock = initialCargoLock // { package. };
|
|
# in evalFormat formats.toml {} processedCargoLock;
|
|
};
|
|
|
|
nativeBuildInputs = with rustPlatform; [
|
|
cargoSetupHook
|
|
maturinBuildHook
|
|
];
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
ueberzug
|
|
appdirs
|
|
click
|
|
# toml
|
|
];
|
|
|
|
# no tests implemented
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
description = "Epub terminal reader with inline images";
|
|
longDescription = ''
|
|
|
|
'';
|
|
maintainers = [];
|
|
};
|
|
}
|