chawan: 0-unstable-2024-03-01 -> 0-unstable-2024-07-14

This commit is contained in:
éclairevoyant 2024-07-15 12:13:28 -04:00
parent b4dbbdf34e
commit db10106dbc
No known key found for this signature in database
GPG Key ID: E3813AEAA02DB54B
2 changed files with 26 additions and 23 deletions

View File

@ -1,15 +1,13 @@
Add the -m option to man's command line to augment the list of paths Add the -m option to man's command line to augment the list of paths searched by man.
searched by man. The string "OUT" must be substituted with chawan's $out
path after patching.
The required -m option is only available in the mandoc implementation. The required -m option is only available in the mandoc implementation.
--- a/adapter/protocol/man --- a/adapter/protocol/man.nim
+++ b/adapter/protocol/man +++ b/adapter/protocol/man.nim
@@ -75,7 +75,7 @@ EOF @@ -264,7 +264,7 @@ proc myOpen(cmd: string): tuple[ofile, efile: File] =
$section =~ s:([^-\w\200-\377.,])::g; proc doMan(man, keyword, section: string) =
$man =~ s:([^-\w\200-\377.,])::g; let sectionOpt = if section == "": "" else: ' ' & quoteShellPosix(section)
- open(F, "GROFF_NO_SGR=1 MAN_KEEP_FORMATTING=1 $MAN $section $man 2> /dev/null |"); let cmd = "MANCOLOR=1 GROFF_NO_SGR=1 MAN_KEEP_FORMATTING=1 " &
+ open(F, "GROFF_NO_SGR=1 MAN_KEEP_FORMATTING=1 $MAN -m OUT/share/man $section $man 2> /dev/null |"); - man & sectionOpt & ' ' & quoteShellPosix(keyword)
} + man & sectionOpt & " -m @out@ " & quoteShellPosix(keyword)
let (ofile, efile) = myOpen(cmd)
$ok = 0; if ofile == nil:

View File

@ -7,34 +7,37 @@
, ncurses , ncurses
, nim , nim
, pandoc , pandoc
, perl
, pkg-config , pkg-config
, zlib , zlib
, unstableGitUpdater , unstableGitUpdater
, libseccomp
, substituteAll
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "chawan"; pname = "chawan";
version = "0-unstable-2024-03-01"; version = "0-unstable-2024-07-14";
src = fetchFromSourcehut { src = fetchFromSourcehut {
owner = "~bptato"; owner = "~bptato";
repo = "chawan"; repo = "chawan";
rev = "87ba9a87be15abbe06837f1519cfb76f4bf759f3"; rev = "0e3d67f31df2c2d53aa0e578439852731e5f5af9";
hash = "sha256-Xs+Mxe5/uoxPMf4FuelpO+bRJ1KdfASVI7rWqtboJZw="; hash = "sha256-eVoZisQyaebWO58a0a0KR7fwsL1kTmPX1SayqdnmSuk=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
patches = [ patches = [
# Include chawan's man pages in mancha's search path # Include chawan's man pages in mancha's search path
./mancha-augment-path.diff (substituteAll {
src = ./mancha-augment-path.diff;
out = placeholder "out";
})
]; ];
env.NIX_CFLAGS_COMPILE = toString ( env.NIX_CFLAGS_COMPILE = toString (
lib.optional stdenv.cc.isClang "-Wno-error=implicit-function-declaration" lib.optional stdenv.cc.isClang "-Wno-error=implicit-function-declaration"
); );
buildInputs = [ curlMinimal ncurses perl zlib ];
nativeBuildInputs = [ nativeBuildInputs = [
makeBinaryWrapper makeBinaryWrapper
nim nim
@ -42,10 +45,12 @@ stdenv.mkDerivation {
pkg-config pkg-config
]; ];
postPatch = '' buildInputs = [
substituteInPlace adapter/protocol/man \ curlMinimal
--replace-fail "OUT" $out libseccomp
''; ncurses
zlib
];
buildFlags = [ "all" "manpage" ]; buildFlags = [ "all" "manpage" ];
installFlags = [ installFlags = [