diff --git a/pkgs/tools/typesetting/lout/builder.sh b/pkgs/tools/typesetting/lout/builder.sh new file mode 100755 index 000000000000..8f8febad125a --- /dev/null +++ b/pkgs/tools/typesetting/lout/builder.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# Prepare a makefile specifying the appropriate output directories. + +source "$stdenv/setup" || exit 1 + +nixMakefile="nix-makefile" + +unpackPhase && \ +cd lout-*.* && \ +cat makefile | \ + sed -e "s|^PREFIX[[:blank:]]*=.*\$|PREFIX = $out|g ; \ + s|^LOUTLIBDIR[[:blank:]]*=.*$|LOUTLIBDIR = \$(PREFIX)/include|g ; \ + s|^LOUTDOCDIR[[:blank:]]*=.*$|LOUTDOCDIR = \$(PREFIX)/doc|g ; \ + s|^MANDIR[[:blank:]]*=.*$|MANDIR = \$(PREFIX)/man|g" \ + > "$nixMakefile" && \ +mkdir -p "$out/bin" && \ +make -f "$nixMakefile" install diff --git a/pkgs/tools/typesetting/lout/default.nix b/pkgs/tools/typesetting/lout/default.nix new file mode 100644 index 000000000000..0758b7dfb7c5 --- /dev/null +++ b/pkgs/tools/typesetting/lout/default.nix @@ -0,0 +1,19 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "lout-3.36"; + src = fetchurl { + url = ftp://ftp.cs.usyd.edu.au/jeff/lout/lout-3.36.tar.gz; + sha256 = "b689cbe12074be8817c90070b162593fc9cc51f2f8868701833ff599b24fd4ad"; + }; + + builder = ./builder.sh; + + meta = { + description = ''Lout is a document layout system, similar in functionality + to TeX/LaTeX, but based on a purely functional programming + language. It can produce PostScript output.''; + homepage = http://www.cs.usyd.edu.au/~jeff/; + license = "GPL"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4061fb8ef145..69709990d7ac 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -619,6 +619,10 @@ rec { inherit fetchurl stdenv ghc tetex polytable; }; + lout = import ../tools/typesetting/lout { + inherit fetchurl stdenv; + }; + lzma = import ../tools/compression/lzma { inherit fetchurl stdenv; };