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

+26 -23
+11 -13
pkgs/by-name/ch/chawan/mancha-augment-path.diff
··· 1 - Add the -m option to man's command line to augment the list of paths 2 - searched by man. The string "OUT" must be substituted with chawan's $out 3 - path after patching. 4 The required -m option is only available in the mandoc implementation. 5 - --- a/adapter/protocol/man 6 - +++ b/adapter/protocol/man 7 - @@ -75,7 +75,7 @@ EOF 8 - 9 - $section =~ s:([^-\w\200-\377.,])::g; 10 - $man =~ s:([^-\w\200-\377.,])::g; 11 - - open(F, "GROFF_NO_SGR=1 MAN_KEEP_FORMATTING=1 $MAN $section $man 2> /dev/null |"); 12 - + open(F, "GROFF_NO_SGR=1 MAN_KEEP_FORMATTING=1 $MAN -m OUT/share/man $section $man 2> /dev/null |"); 13 - } 14 15 - $ok = 0;
··· 1 + Add the -m option to man's command line to augment the list of paths searched by man. 2 The required -m option is only available in the mandoc implementation. 3 + --- a/adapter/protocol/man.nim 4 + +++ b/adapter/protocol/man.nim 5 + @@ -264,7 +264,7 @@ proc myOpen(cmd: string): tuple[ofile, efile: File] = 6 7 + proc doMan(man, keyword, section: string) = 8 + let sectionOpt = if section == "": "" else: ' ' & quoteShellPosix(section) 9 + let cmd = "MANCOLOR=1 GROFF_NO_SGR=1 MAN_KEEP_FORMATTING=1 " & 10 + - man & sectionOpt & ' ' & quoteShellPosix(keyword) 11 + + man & sectionOpt & " -m @out@ " & quoteShellPosix(keyword) 12 + let (ofile, efile) = myOpen(cmd) 13 + if ofile == nil:
+15 -10
pkgs/by-name/ch/chawan/package.nix
··· 7 , ncurses 8 , nim 9 , pandoc 10 - , perl 11 , pkg-config 12 , zlib 13 , unstableGitUpdater 14 }: 15 16 stdenv.mkDerivation { 17 pname = "chawan"; 18 - version = "0-unstable-2024-03-01"; 19 20 src = fetchFromSourcehut { 21 owner = "~bptato"; 22 repo = "chawan"; 23 - rev = "87ba9a87be15abbe06837f1519cfb76f4bf759f3"; 24 - hash = "sha256-Xs+Mxe5/uoxPMf4FuelpO+bRJ1KdfASVI7rWqtboJZw="; 25 fetchSubmodules = true; 26 }; 27 28 patches = [ 29 # Include chawan's man pages in mancha's search path 30 - ./mancha-augment-path.diff 31 ]; 32 33 env.NIX_CFLAGS_COMPILE = toString ( 34 lib.optional stdenv.cc.isClang "-Wno-error=implicit-function-declaration" 35 ); 36 37 - buildInputs = [ curlMinimal ncurses perl zlib ]; 38 nativeBuildInputs = [ 39 makeBinaryWrapper 40 nim ··· 42 pkg-config 43 ]; 44 45 - postPatch = '' 46 - substituteInPlace adapter/protocol/man \ 47 - --replace-fail "OUT" $out 48 - ''; 49 50 buildFlags = [ "all" "manpage" ]; 51 installFlags = [
··· 7 , ncurses 8 , nim 9 , pandoc 10 , pkg-config 11 , zlib 12 , unstableGitUpdater 13 + , libseccomp 14 + , substituteAll 15 }: 16 17 stdenv.mkDerivation { 18 pname = "chawan"; 19 + version = "0-unstable-2024-07-14"; 20 21 src = fetchFromSourcehut { 22 owner = "~bptato"; 23 repo = "chawan"; 24 + rev = "0e3d67f31df2c2d53aa0e578439852731e5f5af9"; 25 + hash = "sha256-eVoZisQyaebWO58a0a0KR7fwsL1kTmPX1SayqdnmSuk="; 26 fetchSubmodules = true; 27 }; 28 29 patches = [ 30 # Include chawan's man pages in mancha's search path 31 + (substituteAll { 32 + src = ./mancha-augment-path.diff; 33 + out = placeholder "out"; 34 + }) 35 ]; 36 37 env.NIX_CFLAGS_COMPILE = toString ( 38 lib.optional stdenv.cc.isClang "-Wno-error=implicit-function-declaration" 39 ); 40 41 nativeBuildInputs = [ 42 makeBinaryWrapper 43 nim ··· 45 pkg-config 46 ]; 47 48 + buildInputs = [ 49 + curlMinimal 50 + libseccomp 51 + ncurses 52 + zlib 53 + ]; 54 55 buildFlags = [ "all" "manpage" ]; 56 installFlags = [