From c3096df3d083eccee25facd46b5a25ba70b6143b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 12 Feb 2008 09:58:57 +0000 Subject: [PATCH] Add Lout, a document layout system based on a purely functional language. svn path=/nixpkgs/trunk/; revision=10634 --- pkgs/tools/typesetting/lout/builder.sh | 18 ++++++++++++++++++ pkgs/tools/typesetting/lout/default.nix | 19 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 3 files changed, 41 insertions(+) create mode 100755 pkgs/tools/typesetting/lout/builder.sh create mode 100644 pkgs/tools/typesetting/lout/default.nix 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; };