Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 57 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 openssl, 6 perl, 7 trousers, 8 zlib, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "tboot"; 13 version = "1.11.9"; 14 15 src = fetchurl { 16 url = "mirror://sourceforge/tboot/${pname}-${version}.tar.gz"; 17 hash = "sha256-uCbJatmt1qYLuWdCATeCS4mNrpJ+UUBJa1rDgjE37Z0="; 18 }; 19 20 buildInputs = [ 21 openssl 22 trousers 23 zlib 24 ]; 25 26 enableParallelBuilding = true; 27 28 preConfigure = '' 29 substituteInPlace tboot/Makefile --replace /usr/bin/perl ${perl}/bin/perl 30 31 for a in lcptools-v2 tb_polgen utils; do 32 substituteInPlace "$a/Makefile" --replace /usr/sbin /sbin 33 done 34 substituteInPlace docs/Makefile --replace /usr/share /share 35 ''; 36 37 postPatch = '' 38 # compute the allocated size from the pointed type, to avoid the warning 39 substituteInPlace lcptools-v2/pconf_legacy.c \ 40 --replace-fail "digest = malloc(SHA1_DIGEST_SIZE);" \ 41 "digest = malloc(sizeof *digest);" 42 ''; 43 44 installFlags = [ "DESTDIR=$(out)" ]; 45 46 meta = { 47 description = "Pre-kernel/VMM module that uses Intel(R) TXT to perform a measured and verified launch of an OS kernel/VMM"; 48 homepage = "https://sourceforge.net/projects/tboot/"; 49 changelog = "https://sourceforge.net/p/tboot/code/ci/v${version}/tree/CHANGELOG"; 50 license = lib.licenses.bsd3; 51 maintainers = with lib.maintainers; [ ak ]; 52 platforms = [ 53 "x86_64-linux" 54 "i686-linux" 55 ]; 56 }; 57}