1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-11 23:24:35 +00:00
nixpkgs/pkgs/development/libraries/mbedtls/default.nix
R. RyanTM ba3b9c0eb8 mbedtls: 2.16.0 -> 2.17.0
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/mbedtls/versions
2019-05-01 03:52:16 -07:00

40 lines
1.1 KiB
Nix

{ stdenv
, fetchFromGitHub
, cmake
, ninja
, perl # Project uses Perl for scripting and testing
, python
, enableThreading ? true # Threading can be disabled to increase security https://tls.mbed.org/kb/development/thread-safety-and-multi-threading
}:
stdenv.mkDerivation rec {
name = "mbedtls-${version}";
version = "2.17.0";
src = fetchFromGitHub {
owner = "ARMmbed";
repo = "mbedtls";
rev = name;
sha256 = "1mk3xv61wvqqrzd6jnrz8csyfnwwwwpjzywj3fsfy99p51d7wqgw";
};
nativeBuildInputs = [ cmake ninja perl python ];
postConfigure = stdenv.lib.optionals enableThreading ''
perl scripts/config.pl set MBEDTLS_THREADING_C # Threading abstraction layer
perl scripts/config.pl set MBEDTLS_THREADING_PTHREAD # POSIX thread wrapper layer for the threading layer.
'';
cmakeFlags = [ "-DUSE_SHARED_MBEDTLS_LIBRARY=on" ];
meta = with stdenv.lib; {
homepage = https://tls.mbed.org/;
description = "Portable cryptographic and TLS library, formerly known as PolarSSL";
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ fpletz ];
};
}