Fix indent build

svn path=/nixpkgs/trunk/; revision=15572
This commit is contained in:
Michael Raskin 2009-05-12 16:00:26 +00:00
parent 908b2b6d47
commit 852603e4df

View File

@ -1,4 +1,5 @@
args : with args; args : with args;
let bd = builderDefs; in
let localDefs = builderDefs.passthru.function { let localDefs = builderDefs.passthru.function {
src = /* put a fetchurl here */ src = /* put a fetchurl here */
fetchurl { fetchurl {
@ -8,19 +9,17 @@ args : with args;
buildInputs = []; buildInputs = [];
configureFlags = []; configureFlags = [];
}; preBuild = bd.stringsWithDeps.fullDepEntry ("
in with localDefs;
let
preBuild = FullDepEntry ("
sed -e '/extern FILE [*]output/i#ifndef OUTPUT_DEFINED_ELSEWHERE' -i src/indent.h sed -e '/extern FILE [*]output/i#ifndef OUTPUT_DEFINED_ELSEWHERE' -i src/indent.h
sed -e '/extern FILE [*]output/a#endif' -i src/indent.h sed -e '/extern FILE [*]output/a#endif' -i src/indent.h
sed -e '1i#define OUTPUT_DEFINED_ELSEWHERE 1' -i src/output.c sed -e '1i#define OUTPUT_DEFINED_ELSEWHERE 1' -i src/output.c
") [minInit doUnpack]; ") ["minInit" "doUnpack"];
in };
in with localDefs;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "indent"; name = "indent";
builder = writeScript (name + "-builder") builder = writeScript (name + "-builder")
(textClosure localDefs [doConfigure preBuild doMakeInstall doForceShare doPropagate]); (textClosure localDefs ["doConfigure" "preBuild" "doMakeInstall" "doForceShare" "doPropagate"]);
meta = { meta = {
description = "GNU Indent - a source text formatter"; description = "GNU Indent - a source text formatter";
inherit src; inherit src;