nix-packages/pkgs/nuber/default.nix

68 lines
1.6 KiB
Nix
Raw Permalink Normal View History

2022-11-14 18:41:09 +01:00
{ rustPlatform, lib, fetchFromGitHub, python3Packages, ... }: let
2022-11-12 19:31:11 +01:00
pname = "nuber";
version = "1.1.0";
src = fetchFromGitHub {
owner = "mtshrmn";
repo = pname;
rev = "v${version}";
sha256 = "yjVu3GwdyiGKVRlETeLT0ww8ftvPRobJYzvesoPxrRo=";
fetchSubmodules = true;
};
2022-11-14 18:41:09 +01:00
# 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";
2022-11-12 19:31:11 +01:00
cargoDeps = rustPlatform.importCargoLock {
lockFile = "${src}/Cargo.lock";
2022-11-14 18:41:09 +01:00
# lockFile = let
# initialCargoLock = lib.importTOML "${src}/Cargo.lock";
# processedCargoLock = initialCargoLock // { package. };
# in evalFormat formats.toml {} processedCargoLock;
2022-11-12 19:31:11 +01:00
};
nativeBuildInputs = with rustPlatform; [
cargoSetupHook
maturinBuildHook
];
2022-11-14 18:41:09 +01:00
propagatedBuildInputs = with python3Packages; [
2022-11-12 19:31:11 +01:00
ueberzug
appdirs
click
# toml
];
# no tests implemented
doCheck = false;
meta = with lib; {
description = "Epub terminal reader with inline images";
longDescription = ''
'';
maintainers = [];
};
2022-11-14 18:41:09 +01:00
}