nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

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. 1 + Add the -m option to man's command line to augment the list of paths searched by man. 4 2 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 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] = 8 6 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; 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 7 , ncurses 8 8 , nim 9 9 , pandoc 10 - , perl 11 10 , pkg-config 12 11 , zlib 13 12 , unstableGitUpdater 13 + , libseccomp 14 + , substituteAll 14 15 }: 15 16 16 17 stdenv.mkDerivation { 17 18 pname = "chawan"; 18 - version = "0-unstable-2024-03-01"; 19 + version = "0-unstable-2024-07-14"; 19 20 20 21 src = fetchFromSourcehut { 21 22 owner = "~bptato"; 22 23 repo = "chawan"; 23 - rev = "87ba9a87be15abbe06837f1519cfb76f4bf759f3"; 24 - hash = "sha256-Xs+Mxe5/uoxPMf4FuelpO+bRJ1KdfASVI7rWqtboJZw="; 24 + rev = "0e3d67f31df2c2d53aa0e578439852731e5f5af9"; 25 + hash = "sha256-eVoZisQyaebWO58a0a0KR7fwsL1kTmPX1SayqdnmSuk="; 25 26 fetchSubmodules = true; 26 27 }; 27 28 28 29 patches = [ 29 30 # Include chawan's man pages in mancha's search path 30 - ./mancha-augment-path.diff 31 + (substituteAll { 32 + src = ./mancha-augment-path.diff; 33 + out = placeholder "out"; 34 + }) 31 35 ]; 32 36 33 37 env.NIX_CFLAGS_COMPILE = toString ( 34 38 lib.optional stdenv.cc.isClang "-Wno-error=implicit-function-declaration" 35 39 ); 36 40 37 - buildInputs = [ curlMinimal ncurses perl zlib ]; 38 41 nativeBuildInputs = [ 39 42 makeBinaryWrapper 40 43 nim ··· 45 42 pkg-config 46 43 ]; 47 44 48 - postPatch = '' 49 - substituteInPlace adapter/protocol/man \ 50 - --replace-fail "OUT" $out 51 - ''; 45 + buildInputs = [ 46 + curlMinimal 47 + libseccomp 48 + ncurses 49 + zlib 50 + ]; 52 51 53 52 buildFlags = [ "all" "manpage" ]; 54 53 installFlags = [