summary refs log tree commit diff
path: root/pkgs/development/libraries/boringssl/default.nix
blob: 67e2794c8a2930dda9bce23a0292347a35da73bf (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
30
31
32
33
34
35
36
37
38
39
{ stdenv, fetchgit, cmake, perl, go }:

# reference: https://boringssl.googlesource.com/boringssl/+/2661/BUILDING.md
stdenv.mkDerivation {
  pname = "boringssl";
  version = "2017-02-23";

  src = fetchgit {
    url    = "https://boringssl.googlesource.com/boringssl";
    rev    = "be2ee342d3781ddb954f91f8a7e660c6f59e87e5";
    sha256 = "022zq7wlkhrg6al7drr3555lam3zw5bb10ylf9mznp83s854f975";
  };

  buildInputs = [ cmake perl go ];
  enableParallelBuilding = true;
  NIX_CFLAGS_COMPILE = "-Wno-error";

  makeFlags = [ "GOCACHE=$(TMPDIR)/go-cache" ];

  installPhase = ''
    mkdir -p $out/bin $out/include $out/lib

    mv tool/bssl $out/bin

    mv ssl/libssl.a           $out/lib
    mv crypto/libcrypto.a     $out/lib
    mv decrepit/libdecrepit.a $out/lib

    mv ../include/openssl $out/include
  '';

  meta = with stdenv.lib; {
    description = "Free TLS/SSL implementation";
    homepage    = "https://boringssl.googlesource.com";
    platforms   = platforms.all;
    maintainers = [ maintainers.thoughtpolice ];
    license = with licenses; [ openssl isc mit bsd3 ];
  };
}