Skip to content

Commit

Permalink
m4: build offline documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Bogatov committed Jun 17, 2022
1 parent ca38c61 commit bde8c13
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pkgs/development/tools/misc/gnum4/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl }:
{ lib, stdenv, fetchurl, texinfo4 }:

# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or
Expand All @@ -8,6 +8,9 @@
stdenv.mkDerivation rec {
pname = "gnum4";
version = "1.4.19";
outputs = [ "out" "doc" ];

nativeBuildInputs = [ texinfo4 ];

src = fetchurl {
url = "mirror://gnu/m4/m4-${version}.tar.bz2";
Expand All @@ -22,6 +25,15 @@ stdenv.mkDerivation rec {
configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ]
++ lib.optional stdenv.hostPlatform.isMinGW "CFLAGS=-fno-stack-protector";

postBuild = ''
makeinfo --html --no-split doc/m4.texi
'';

postInstall = ''
mkdir -p $doc/share/doc/m4
cp ./m4.html $doc/share/doc/m4
'';

meta = {
description = "GNU M4, a macro processor";
longDescription = ''
Expand Down

0 comments on commit bde8c13

Please sign in to comment.