This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

5pkgs.elinks: meson build to fix gettext 0.23.1 break

nixpkgs's autotools elinks 0.19.1 fails against gettext 0.23.1
(autopoint refuses bare AM_GNU_GETTEXT, then autoheader fails on
HAVE_ALLOCA). Carry the meson-based build from upstream nixpkgs
PR #515347 locally until it lands; tools.mutt now consumes
self.packages.<system>.elinks instead of pkgs.elinks.

Inlines the libcss/libdom propagatedBuildInputs adjustments from the
same PR, scoped to this elinks build only — no global overlay.

+177 -2
+170
5pkgs/elinks/package.nix
··· 1 + # Replacement for nixpkgs's `elinks`, switched to the meson build from 2 + # upstream nixpkgs PR #515347 (https://github.com/NixOS/nixpkgs/pull/515347). 3 + # 4 + # nixpkgs's autotools build of elinks 0.19.1 is broken against gettext 5 + # 0.23.1 (autopoint refuses `AM_GNU_GETTEXT` without an `external` 6 + # argument; further, autoheader then fails on `HAVE_ALLOCA`). The PR 7 + # sidesteps autotools entirely. We carry it locally until it lands. 8 + # 9 + # The PR also moves a few entries from `buildInputs` to 10 + # `propagatedBuildInputs` on libcss and libdom so they're picked up 11 + # transitively. Rather than overlaying those packages globally, we 12 + # tweak them inline here (only this elinks build sees the change). 13 + { 14 + lib, 15 + stdenv, 16 + fetchFromGitHub, 17 + ncurses, 18 + bzip2, 19 + zlib, 20 + brotli, 21 + zstd, 22 + xz, 23 + openssl, 24 + meson, 25 + ninja, 26 + gettext, 27 + python3, 28 + perl, 29 + pkg-config, 30 + xmlto, 31 + docbook_xml_dtd_42, 32 + gpm, 33 + libidn2, 34 + tre, 35 + expat, 36 + lua, 37 + curl, 38 + libcss, 39 + libdom, 40 + libparserutils, 41 + libwapcaplet, 42 + libhubbub, 43 + enableGuile ? false, 44 + guile ? null, 45 + enablePython ? false, 46 + python ? null, 47 + enablePerl ? (!stdenv.hostPlatform.isDarwin) && (stdenv.hostPlatform == stdenv.buildPlatform), 48 + }: 49 + 50 + let 51 + # libcss with libparserutils/libwapcaplet propagated, so meson's 52 + # pkg-config lookup finds them when elinks links against libcss. 53 + libcss' = libcss.overrideAttrs (old: { 54 + buildInputs = lib.filter (d: d != libparserutils && d != libwapcaplet) (old.buildInputs or [ ]); 55 + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ 56 + libparserutils 57 + libwapcaplet 58 + ]; 59 + }); 60 + 61 + # libdom: libhubbub/libwapcaplet propagated, for the same reason. 62 + libdom' = libdom.overrideAttrs (old: { 63 + buildInputs = lib.filter (d: d != libhubbub && d != libwapcaplet) (old.buildInputs or [ ]); 64 + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ 65 + libhubbub 66 + libwapcaplet 67 + ]; 68 + }); 69 + in 70 + stdenv.mkDerivation (finalAttrs: { 71 + pname = "elinks"; 72 + version = "0.19.1"; 73 + 74 + src = fetchFromGitHub { 75 + owner = "rkd77"; 76 + repo = "elinks"; 77 + rev = "v${finalAttrs.version}"; 78 + hash = "sha256-aQ+q2I6uTVv5kpKBaGJ1xiE/9vv9T7JI05VX/ROkAqA="; 79 + }; 80 + 81 + outputs = [ 82 + "out" 83 + "man" 84 + "doc" 85 + ]; 86 + 87 + buildInputs = [ 88 + ncurses 89 + bzip2 90 + zlib 91 + brotli 92 + zstd 93 + xz 94 + openssl 95 + libidn2 96 + tre 97 + expat 98 + lua 99 + curl 100 + libcss' 101 + libdom' 102 + ] 103 + ++ lib.optional stdenv.hostPlatform.isDarwin gettext 104 + ++ lib.optional enableGuile guile 105 + ++ lib.optional enablePython python 106 + ++ lib.optional enablePerl perl; 107 + 108 + nativeBuildInputs = [ 109 + meson 110 + ninja 111 + gettext 112 + perl 113 + python3 114 + pkg-config 115 + xmlto 116 + ]; 117 + 118 + env = 119 + lib.optionalAttrs stdenv.hostPlatform.isLinux { 120 + C_INCLUDE_PATH = "${lib.getInclude gpm}/include"; 121 + LIBRARY_PATH = "${lib.getLib gpm}/lib"; 122 + } 123 + // lib.optionalAttrs stdenv.hostPlatform.isDarwin { 124 + LDFLAGS = "-liconv"; 125 + }; 126 + 127 + strictDeps = true; 128 + __structuredAttrs = true; 129 + 130 + mesonFlags = 131 + (map (f: lib.mesonBool f true) [ 132 + "finger" 133 + "html-highlight" 134 + "gopher" 135 + "gemini" 136 + "cgi" 137 + "nntp" 138 + "256-colors" 139 + "true-color" 140 + "brotli" 141 + "lzma" 142 + "terminfo" 143 + "reproducible" 144 + ]) 145 + ++ [ 146 + (lib.mesonOption "luapkg" "lua") 147 + (lib.mesonBool "gpm" stdenv.hostPlatform.isLinux) 148 + (lib.mesonBool "guile" enableGuile) 149 + (lib.mesonBool "python" enablePython) 150 + (lib.mesonBool "perl" enablePerl) 151 + ]; 152 + 153 + postPatch = '' 154 + patchShebangs doc/tools 155 + substituteInPlace doc/tools/asciidoc/docbook.conf \ 156 + --replace-fail "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" "${docbook_xml_dtd_42}/xml/dtd/docbook/docbookx.dtd" 157 + ''; 158 + 159 + preConfigure = '' 160 + mesonFlags+=("-Dsource-date-epoch=$SOURCE_DATE_EPOCH") 161 + ''; 162 + 163 + meta = { 164 + description = "Full-featured text-mode web browser (meson build, PR #515347)"; 165 + mainProgram = "elinks"; 166 + homepage = "https://github.com/rkd77/elinks"; 167 + license = lib.licenses.gpl2Only; 168 + platforms = with lib.platforms; linux ++ darwin; 169 + }; 170 + })
+7 -2
tools/mutt/flake-module.nix
··· 12 12 let 13 13 notmuchConfig = self.packages.${system}.notmuch.passthru.configuration.configFile.path; 14 14 15 + # nixpkgs's autotools elinks is broken against gettext 0.23.1. 16 + # Use our local meson build (5pkgs/elinks) until upstream PR 17 + # #515347 lands. 18 + elinks = self.packages.${system}.elinks; 19 + 15 20 # Generate virtual-mailboxes from Maildir folder structure at build time 16 21 # This discovers sieve folders dynamically — no hardcoded list needed 17 22 genVirtualMailboxes = pkgs.writeShellScript "gen-virtual-mailboxes" '' ··· 27 32 ''; 28 33 29 34 mailcap = pkgs.writeText "mailcap" '' 30 - text/html; ${pkgs.elinks}/bin/elinks -dump ; copiousoutput; 35 + text/html; ${elinks}/bin/elinks -dump ; copiousoutput; 31 36 ''; 32 37 33 38 # Script to view HTML emails in browser with embedded images ··· 320 325 package = pkgs.neomutt; 321 326 aliases = [ "mutt" ]; 322 327 runtimeInputs = [ 323 - pkgs.elinks 328 + elinks 324 329 pkgs.msmtp 325 330 pkgs.notmuch 326 331 pkgs.openssh