2021-01-23 12:26:19 +00:00
|
|
|
{lib, stdenv, fetchurl, tex}:
|
2015-10-12 04:46:49 +00:00
|
|
|
|
2020-06-07 21:11:08 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-10-12 04:46:49 +00:00
|
|
|
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "nuweb";
|
2020-03-16 06:28:35 +00:00
|
|
|
version = "1.60";
|
2015-10-12 04:46:49 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "mirror://sourceforge/project/nuweb/${pname}-${version}.tar.gz";
|
2020-03-16 06:28:35 +00:00
|
|
|
sha256 = "08xmwq48biy2c1fr8wnyknyvqs9jfsj42cb7fw638xqv35f0xxvl";
|
2015-10-12 04:46:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ tex ];
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -ie 's|nuweb -r|./nuweb -r|' Makefile
|
|
|
|
'';
|
2022-05-22 16:44:37 +00:00
|
|
|
|
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: global.o:/build/nuweb-1.60/global.h:91: multiple definition of
|
|
|
|
# `current_sector'; main.o:/build/nuweb-1.60/global.h:91: first defined here
|
|
|
|
NIX_CFLAGS_COMPILE = "-fcommon";
|
|
|
|
|
2015-10-12 04:46:49 +00:00
|
|
|
buildPhase = ''
|
|
|
|
make nuweb
|
|
|
|
make nuweb.pdf nuwebdoc.pdf all
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
2019-08-15 12:41:18 +00:00
|
|
|
install -d $out/bin $out/share/man/man1 $out/share/doc/${pname}-${version} $out/share/emacs/site-lisp
|
2015-10-12 04:46:49 +00:00
|
|
|
cp nuweb $out/bin
|
|
|
|
cp nuweb.el $out/share/emacs/site-lisp
|
|
|
|
gzip -c nuweb.1 > $out/share/man/man1/nuweb.1.gz
|
2019-08-15 12:41:18 +00:00
|
|
|
cp htdocs/index.html nuweb.w nuweb.pdf nuwebdoc.pdf README $out/share/doc/${pname}-${version}
|
2015-10-12 04:46:49 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2015-10-12 04:46:49 +00:00
|
|
|
description = "A simple literate programming tool";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://nuweb.sourceforge.net";
|
2015-10-12 04:46:49 +00:00
|
|
|
license = licenses.free;
|
|
|
|
maintainers = [ maintainers.AndersonTorres ];
|
2020-03-16 06:28:54 +00:00
|
|
|
platforms = platforms.unix;
|
2015-10-12 04:46:49 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
# TODO: nuweb.el Emacs integration
|