2021-01-22 11:25:31 +00:00
|
|
|
{ lib, stdenv, libgcrypt, fetchFromGitHub, ocamlPackages, perl }:
|
2016-10-06 16:47:50 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "obliv-c";
|
2018-08-28 05:32:56 +01:00
|
|
|
version = "0.0pre20180624";
|
2017-10-12 07:01:24 +01:00
|
|
|
buildInputs = [ perl ]
|
|
|
|
++ (with ocamlPackages; [ ocaml findlib ocamlbuild ]);
|
2016-10-06 16:47:50 +01:00
|
|
|
propagatedBuildInputs = [ libgcrypt ];
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "samee";
|
|
|
|
repo = "obliv-c";
|
2018-08-28 05:32:56 +01:00
|
|
|
rev = "3d6804ca0fd85868207a0ccbd2509ec064723ac2";
|
|
|
|
sha256 = "1ib21ngn7zr58xxq4sjigrpaxb0wx35x3k9l4qvwflzrmvnman20";
|
2016-10-06 16:47:50 +01:00
|
|
|
};
|
2017-08-29 20:17:00 +01:00
|
|
|
|
2017-11-28 10:40:37 +00:00
|
|
|
patches = [ ./ignore-complex-float128.patch ];
|
|
|
|
|
2017-08-29 20:17:00 +01:00
|
|
|
preBuild = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2016-10-06 16:47:50 +01:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
cp bin/* "$out/bin"
|
|
|
|
mkdir -p "$out/share/doc/obliv-c"
|
|
|
|
cp -r doc/* README* CHANGE* Change* LICEN* TODO* "$out/share/doc/obliv-c"
|
|
|
|
mkdir -p "$out/share/obliv-c"
|
|
|
|
cp -r test "$out/share/obliv-c"
|
|
|
|
mkdir -p "$out/include"
|
|
|
|
cp src/ext/oblivc/*.h "$out/include"
|
|
|
|
mkdir -p "$out/lib"
|
|
|
|
gcc $(ar t _build/libobliv.a | sed -e 's@^@_build/@') --shared -o _build/libobliv.so
|
|
|
|
cp _build/lib*.a _build/lib*.so* "$out/lib"
|
|
|
|
'';
|
2017-08-29 20:17:00 +01:00
|
|
|
|
2016-10-06 16:47:50 +01:00
|
|
|
meta = {
|
|
|
|
inherit version;
|
2021-01-16 04:20:42 +00:00
|
|
|
description = "A GCC wrapper that makes it easy to embed secure computation protocols inside regular C programs";
|
2021-01-22 11:25:31 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = [lib.maintainers.raskin];
|
|
|
|
platforms = lib.platforms.linux;
|
2016-10-06 16:47:50 +01:00
|
|
|
};
|
|
|
|
}
|