summary refs log tree commit diff
path: root/pkgs/development/tools/misc/indent/2.2.9.nix
blob: 5e92802beed1d5adf4c7c844f6a24982a6e1466a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
args : with args;
	let localDefs = builderDefs {
		src = /* put a fetchurl here */
		fetchurl {
			url = ftp://ftp.gnu.org/gnu/indent/indent-2.2.9.tar.gz;
			sha256 = "0rp4divzv5xyflm8ixpp2isa092n0nmhgmhvz56db7k3lnyqg4qb";
		};

		buildInputs = [];
		configureFlags = [];
	} null; /* null is a terminator for sumArgs */
	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/a#endif' -i src/indent.h
		sed -e '1i#define OUTPUT_DEFINED_ELSEWHERE 1' -i src/output.c
	") [minInit doUnpack];
in
stdenv.mkDerivation rec {
	name = "indent";
	builder = writeScript (name + "-builder")
		(textClosure localDefs [doConfigure preBuild doMakeInstall doForceShare doPropagate]);
	meta = {
		description = "
	GNU Indent - a source text formatter.
";
	};
}