10 # reference: https://boringssl.googlesource.com/boringssl/+/2661/BUILDING.md
13 version = "2021-07-09";
16 url = "https://boringssl.googlesource.com/boringssl";
17 rev = "268a4a6ff3bd656ae65fe41ef1185daa85cfae21";
18 sha256 = "04fja4fdwhc69clmvg8i12zm6ks3sfl3r8i5bxn4x63b9dj5znlx";
21 nativeBuildInputs = [ cmake ninja perl ];
23 vendorSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5";
25 # hack to get both go and cmake configure phase
26 # (if we use postConfigure then cmake will loop runHook postConfigure)
29 '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
30 export GOARCH=$(go env GOHOSTARCH)
37 # CMAKE_OSX_ARCHITECTURES is set to x86_64 by Nix, but it confuses boringssl on aarch64-linux.
38 cmakeFlags = [ "-GNinja" ] ++ lib.optionals (stdenv.isLinux) [ "-DCMAKE_OSX_ARCHITECTURES=" ];
41 mkdir -p $bin/bin $dev $out/lib
45 mv ssl/libssl.a $out/lib
46 mv crypto/libcrypto.a $out/lib
47 mv decrepit/libdecrepit.a $out/lib
52 outputs = [ "out" "bin" "dev" ];
55 description = "Free TLS/SSL implementation";
56 homepage = "https://boringssl.googlesource.com";
57 maintainers = [ maintainers.thoughtpolice ];
58 license = with licenses; [ openssl isc mit bsd3 ];