diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming')
6 files changed, 210 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/Literate/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/Literate/default.nix new file mode 100644 index 000000000000..428e6e444a21 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/Literate/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchgit, dmd, dub }: + +stdenv.mkDerivation { + pname = "Literate"; + version = "unstable-2020-09-02"; + + src = fetchgit { + url = "https://github.com/zyedidia/Literate.git"; + rev = "533991cca6ec7a608a778396d32d51b35182d944"; + sha256 = "09h1as01z0fw0bj0kf1g9nlhvinya7sqq2x8qb6zmhvqqm6v4n49"; + }; + + buildInputs = [ dmd dub ]; + + installPhase = "install -D bin/lit $out/bin/lit"; + + meta = with stdenv.lib; { + description = "A literate programming tool for any language"; + homepage = "http://literate.zbyedidia.webfactional.com/"; + license = licenses.mit; + platforms = platforms.unix; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/eweb/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/eweb/default.nix new file mode 100644 index 000000000000..82805af5804f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/eweb/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, python3, asciidoc }: + +stdenv.mkDerivation rec { + pname = "eweb"; + version = "9.10"; + + src = fetchurl { + url = "mirror://sourceforge/project/eweb/${pname}-${version}.tar.bz2"; + sha256 = "1xy7vm2sj5q6s620fm25klmnwnz9xkrxmx4q2f8h6c85ydisayd5"; + }; + + buildInputs = [ python3 asciidoc ]; + + installPhase = '' + install -d $out/bin $out/share/doc/${pname}-${version} + cp etangle.py $out/bin + cp etangle.w etangle.html $out/share/doc/${pname}-${version} + ''; + + meta = with stdenv.lib; { + homepage = "http://eweb.sourceforge.net/"; + description = "An Asciidoc-based literate programming tool, written in Python"; + platforms = platforms.linux; + license = licenses.gpl3Plus; + maintainers = [ maintainers.AndersonTorres ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/funnelweb/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/funnelweb/default.nix new file mode 100644 index 000000000000..9d27351f15d4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/funnelweb/default.nix @@ -0,0 +1,31 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation rec { + + name = "funnelweb-${meta.version}"; + src = fetchurl { + url = "http://www.ross.net/funnelweb/download/funnelweb_v320/funnelweb_v320_source.tar.gz"; + sha256 = "0zqhys0j9gabrd12mnk8ibblpc8dal4kbl8vnhxmdlplsdpwn4wg"; + }; + + buildPhase = '' + cd source + ${stdenv.cc}/bin/cc -D__linux__ -o fw *.c + ''; + + installPhase = '' + install -d $out/bin + install fw $out/bin/fw + ''; + + meta = with stdenv.lib; { + version = "3.20"; + description = "A simple, reliable literate-programming macro preprocessor"; + homepage = "http://www.ross.net/funnelweb/"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ maintainers.AndersonTorres ]; + }; +} +#TODO: implement it for other platforms +#TODO: Documentation files diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/noweb/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/noweb/default.nix new file mode 100644 index 000000000000..52586939c1df --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/noweb/default.nix @@ -0,0 +1,80 @@ +{ stdenv, fetchFromGitHub, gawk, groff, icon-lang ? null }: + +let noweb = stdenv.mkDerivation rec { + pname = "noweb"; + version = "2.12"; + + src = fetchFromGitHub { + owner = "nrnrnr"; + repo = "noweb"; + rev = "v${builtins.replaceStrings ["."] ["_"] version}"; + sha256 = "1160i2ghgzqvnb44kgwd6s3p4jnk9668rmc15jlcwl7pdf3xqm95"; + }; + + patches = [ ./no-FAQ.patch ]; + + nativeBuildInputs = [ groff ] ++ stdenv.lib.optionals (!isNull icon-lang) [ icon-lang ]; + + preBuild = '' + mkdir -p "$out/lib/noweb" + cd src + ''; + + makeFlags = stdenv.lib.optionals (!isNull icon-lang) [ + "LIBSRC=icon" + "ICONC=icont" + ] ++ stdenv.lib.optionals stdenv.isDarwin [ + "CC=clang" + ]; + + + installFlags = [ + ]; + + preInstall = '' + mkdir -p "$tex/tex/latex/noweb" + installFlagsArray+=( \ + "BIN=${placeholder "out"}/bin" \ + "ELISP=${placeholder "out"}/share/emacs/site-lisp" \ + "LIB=${placeholder "out"}/lib/noweb" \ + "MAN=${placeholder "out"}/share/man" \ + "TEXINPUTS=${placeholder "tex"}/tex/latex/noweb" \ + ) + ''; + + installTargets = [ "install-code" "install-tex" "install-elisp" ]; + + postInstall = '' + substituteInPlace "$out/bin/cpif" --replace "PATH=/bin:/usr/bin" "" + + for f in $out/bin/no{index,roff,roots,untangle,web} \ + $out/lib/noweb/to{ascii,html,roff,tex} \ + $out/lib/noweb/{bt,empty}defn \ + $out/lib/noweb/{noidx,unmarkup}; do + # NOTE: substituteInPlace breaks Icon binaries, so make sure the script + # uses (n)awk before calling. + if grep -q nawk "$f"; then + substituteInPlace "$f" --replace "nawk" "${gawk}/bin/awk" + fi + done + + # HACK: This is ugly, but functional. + PATH=$out/bin:$PATH make -BC xdoc + make "''${installFlagsArray[@]}" install-man + + ln -s "$tex" "$out/share/texmf" + ''; + + outputs = [ "out" "tex" ]; + + tlType = "run"; + passthru.pkgs = [ noweb.tex ]; + + meta = with stdenv.lib; { + description = "A simple, extensible literate-programming tool"; + homepage = "https://www.cs.tufts.edu/~nr/noweb"; + license = licenses.bsd2; + maintainers = with maintainers; [ yurrriq ]; + platforms = with platforms; linux ++ darwin; + }; +}; in noweb diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/noweb/no-FAQ.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/noweb/no-FAQ.patch new file mode 100644 index 000000000000..3230924990b8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/noweb/no-FAQ.patch @@ -0,0 +1,11 @@ +--- a/src/Makefile 2006-06-12 22:14:20.000000000 +0200 ++++ b/src/Makefile 2010-06-17 11:30:11.804018145 +0200 +@@ -198,7 +198,7 @@ + (cd elisp; ci -l $(CINAME) $(CIMSG) *.el) + ci -l $(CINAME) $(CIMSG) Makefile.nw INSTALL INSTALL.DOS README FAQ COPYRIGHT nwmake *.nw + +-source: FAQ ++source: + for i in c shell lib xdoc icon awk tex; do (cd $$i; make CPIF=">" source); done + sleep 1 + for i in c shell lib xdoc icon awk tex; do (cd $$i; make touch); done diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/nuweb/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/nuweb/default.nix new file mode 100644 index 000000000000..1f4fba681c35 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/literate-programming/nuweb/default.nix @@ -0,0 +1,38 @@ +{stdenv, fetchurl, tex}: + +stdenv.mkDerivation rec { + + pname = "nuweb"; + version = "1.60"; + + src = fetchurl { + url = "mirror://sourceforge/project/nuweb/${pname}-${version}.tar.gz"; + sha256 = "08xmwq48biy2c1fr8wnyknyvqs9jfsj42cb7fw638xqv35f0xxvl"; + }; + + buildInputs = [ tex ]; + + patchPhase = '' + sed -ie 's|nuweb -r|./nuweb -r|' Makefile + ''; + buildPhase = '' + make nuweb + make nuweb.pdf nuwebdoc.pdf all + ''; + installPhase = '' + install -d $out/bin $out/share/man/man1 $out/share/doc/${pname}-${version} $out/share/emacs/site-lisp + cp nuweb $out/bin + cp nuweb.el $out/share/emacs/site-lisp + gzip -c nuweb.1 > $out/share/man/man1/nuweb.1.gz + cp htdocs/index.html nuweb.w nuweb.pdf nuwebdoc.pdf README $out/share/doc/${pname}-${version} + ''; + + meta = with stdenv.lib; { + description = "A simple literate programming tool"; + homepage = "http://nuweb.sourceforge.net"; + license = licenses.free; + maintainers = [ maintainers.AndersonTorres ]; + platforms = platforms.unix; + }; +} +# TODO: nuweb.el Emacs integration |