nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 45 lines 1.4 kB view raw
1{lib, stdenv, fetchurl, tex}: 2 3stdenv.mkDerivation rec { 4 5 pname = "nuweb"; 6 version = "1.62"; 7 8 src = fetchurl { 9 url = "mirror://sourceforge/project/nuweb/${pname}-${version}.tar.gz"; 10 sha256 = "sha256-JVqPYkYPXBT0xLNWuW4DV6N6ZlKuBYQGT46frhnpU64="; 11 }; 12 13 buildInputs = [ tex ]; 14 15 patchPhase = '' 16 sed -ie 's|nuweb -r|./nuweb -r|' Makefile 17 ''; 18 19 # Workaround build failure on -fno-common toolchains like upstream 20 # gcc-10. Otherwise build fails as: 21 # ld: global.o:/build/nuweb-1.62/global.h:91: multiple definition of 22 # `current_sector'; main.o:/build/nuweb-1.62/global.h:91: first defined here 23 env.NIX_CFLAGS_COMPILE = "-fcommon"; 24 25 buildPhase = '' 26 make nuweb 27 make nuweb.pdf nuwebdoc.pdf all 28 ''; 29 installPhase = '' 30 install -d $out/bin $out/share/man/man1 $out/share/doc/${pname}-${version} $out/share/emacs/site-lisp 31 cp nuweb $out/bin 32 cp nuweb.el $out/share/emacs/site-lisp 33 gzip -c nuweb.1 > $out/share/man/man1/nuweb.1.gz 34 cp htdocs/index.html nuweb.w nuweb.pdf nuwebdoc.pdf README $out/share/doc/${pname}-${version} 35 ''; 36 37 meta = with lib; { 38 description = "A simple literate programming tool"; 39 homepage = "https://nuweb.sourceforge.net"; 40 license = licenses.free; 41 maintainers = [ maintainers.AndersonTorres ]; 42 platforms = platforms.unix; 43 }; 44} 45# TODO: nuweb.el Emacs integration