summary refs log tree commit diff
path: root/pkgs/tools/security/ssss/0.5.nix
blob: a6e8429a9df0ef513957d851e9b4e79e735fd7d5 (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; with builderDefs;
	let localDefs = builderDefs.passthru.function (rec {
		src = /* put a fetchurl here */
		fetchurl {
			url = http://point-at-infinity.org/ssss/ssss-0.5.tar.gz;
			sha256 = "15grn2fp1x8p92kxkwbmsx8rz16g93y9grl3hfqbh1jn21ama5jx";
		};

		buildInputs = [gmp];
		configureFlags = [];
		doPatch = FullDepEntry (''
			sed -e s@/usr/@$out/@g -i Makefile
			cp ssss.manpage.xml ssss.1
			cp ssss.manpage.xml ssss.1.html
			ensureDir $out/bin $out/share/man/man1
			echo -e 'install:\n\tcp ssss-combine ssss-split '"$out"'/bin' >>Makefile
		'') ["minInit" "doUnpack" "defEnsureDir"];
	});
	in with localDefs;
stdenv.mkDerivation rec {
	name = "ssss-"+version;
	builder = writeScript (name + "-builder")
		(textClosure localDefs 
			["doPatch" doMakeInstall doForceShare doPropagate]);
	meta = {
		description = "Shamir Secret Sharing Scheme";
		inherit src;
	};
}