1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 autoconf-archive,
6 autoreconfHook,
7 bison,
8 gettext,
9 libiconv,
10}:
11
12stdenv.mkDerivation rec {
13 pname = "html2text";
14 version = "2.3.0";
15
16 src = fetchFromGitLab {
17 owner = "grobian";
18 repo = "html2text";
19 rev = "v${version}";
20 hash = "sha256-e/KWyc7lOdWhtFC7ZAD7sYgCsO3JzGkLUThVI7edqIQ=";
21 };
22
23 nativeBuildInputs = [
24 autoconf-archive
25 autoreconfHook
26 bison
27 gettext
28 ];
29
30 # These changes have all been made in HEAD, across several commits
31 # amongst other changes.
32 # See https://gitlab.com/grobian/html2text/-/merge_requests/57
33 patches = [ ./gettext-0.25.patch ];
34
35 buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv;
36
37 meta = {
38 description = "Convert HTML to plain text";
39 mainProgram = "html2text";
40 homepage = "https://gitlab.com/grobian/html2text";
41 license = lib.licenses.gpl2Plus;
42 platforms = lib.platforms.unix;
43 maintainers = [ lib.maintainers.eikek ];
44 };
45}