tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
chawan: 0-unstable-2024-03-01 -> 0-unstable-2024-07-14
éclairevoyant
2 years ago
db10106d
b4dbbdf3
+26
-23
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
ch
chawan
mancha-augment-path.diff
package.nix
+11
-13
pkgs/by-name/ch/chawan/mancha-augment-path.diff
···
1
1
-
Add the -m option to man's command line to augment the list of paths
2
2
-
searched by man. The string "OUT" must be substituted with chawan's $out
3
3
-
path after patching.
1
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
5
-
--- a/adapter/protocol/man
6
6
-
+++ b/adapter/protocol/man
7
7
-
@@ -75,7 +75,7 @@ EOF
8
8
-
9
9
-
$section =~ s:([^-\w\200-\377.,])::g;
10
10
-
$man =~ s:([^-\w\200-\377.,])::g;
11
11
-
- open(F, "GROFF_NO_SGR=1 MAN_KEEP_FORMATTING=1 $MAN $section $man 2> /dev/null |");
12
12
-
+ open(F, "GROFF_NO_SGR=1 MAN_KEEP_FORMATTING=1 $MAN -m OUT/share/man $section $man 2> /dev/null |");
13
13
-
}
3
3
+
--- a/adapter/protocol/man.nim
4
4
+
+++ b/adapter/protocol/man.nim
5
5
+
@@ -264,7 +264,7 @@ proc myOpen(cmd: string): tuple[ofile, efile: File] =
14
6
15
15
-
$ok = 0;
7
7
+
proc doMan(man, keyword, section: string) =
8
8
+
let sectionOpt = if section == "": "" else: ' ' & quoteShellPosix(section)
9
9
+
let cmd = "MANCOLOR=1 GROFF_NO_SGR=1 MAN_KEEP_FORMATTING=1 " &
10
10
+
- man & sectionOpt & ' ' & quoteShellPosix(keyword)
11
11
+
+ man & sectionOpt & " -m @out@ " & quoteShellPosix(keyword)
12
12
+
let (ofile, efile) = myOpen(cmd)
13
13
+
if ofile == nil:
+15
-10
pkgs/by-name/ch/chawan/package.nix
···
7
7
, ncurses
8
8
, nim
9
9
, pandoc
10
10
-
, perl
11
10
, pkg-config
12
11
, zlib
13
12
, unstableGitUpdater
13
13
+
, libseccomp
14
14
+
, substituteAll
14
15
}:
15
16
16
17
stdenv.mkDerivation {
17
18
pname = "chawan";
18
18
-
version = "0-unstable-2024-03-01";
19
19
+
version = "0-unstable-2024-07-14";
19
20
20
21
src = fetchFromSourcehut {
21
22
owner = "~bptato";
22
23
repo = "chawan";
23
23
-
rev = "87ba9a87be15abbe06837f1519cfb76f4bf759f3";
24
24
-
hash = "sha256-Xs+Mxe5/uoxPMf4FuelpO+bRJ1KdfASVI7rWqtboJZw=";
24
24
+
rev = "0e3d67f31df2c2d53aa0e578439852731e5f5af9";
25
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
30
-
./mancha-augment-path.diff
31
31
+
(substituteAll {
32
32
+
src = ./mancha-augment-path.diff;
33
33
+
out = placeholder "out";
34
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
37
-
buildInputs = [ curlMinimal ncurses perl zlib ];
38
41
nativeBuildInputs = [
39
42
makeBinaryWrapper
40
43
nim
···
42
45
pkg-config
43
46
];
44
47
45
45
-
postPatch = ''
46
46
-
substituteInPlace adapter/protocol/man \
47
47
-
--replace-fail "OUT" $out
48
48
-
'';
48
48
+
buildInputs = [
49
49
+
curlMinimal
50
50
+
libseccomp
51
51
+
ncurses
52
52
+
zlib
53
53
+
];
49
54
50
55
buildFlags = [ "all" "manpage" ];
51
56
installFlags = [