nixpkgs-suyu/pkgs/development/libraries/mbedtls/default.nix

58 lines
1.8 KiB
Nix
Raw Normal View History

2018-01-28 02:10:04 +01:00
{ stdenv, fetchFromGitHub, perl }:
2015-04-06 23:41:54 +02:00
stdenv.mkDerivation rec {
mbedtls: 2.8.0 -> 2.9.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. These checks were done: - built on NixOS - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_aescrypt2 -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_aescrypt2 --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_aescrypt2 help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_hello -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_hello --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_hello help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ecdh_curve25519 -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ecdh_curve25519 --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ecdh_curve25519 help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_key_app -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_key_app --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_key_app help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_mpi_demo -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_mpi_demo --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_mpi_demo help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_pk_decrypt -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_pk_decrypt --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_pk_decrypt help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_rsa_genkey -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_rsa_genkey --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_rsa_genkey help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_rsa_sign -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_rsa_sign --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_rsa_sign help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_entropy -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_entropy --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_entropy help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_random_ctr_drbg -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_random_ctr_drbg --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_random_ctr_drbg help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_random_havege -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_random_havege --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_random_havege help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ssl_mail_client -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ssl_mail_client --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ssl_mail_client help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_benchmark -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_benchmark --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_benchmark help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ssl_cert_test -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ssl_cert_test --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ssl_cert_test help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_pem2der -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_pem2der --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_pem2der help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_strerror -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_strerror --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_strerror help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_crl_app -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_crl_app --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_crl_app help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_req_app -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_req_app --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_req_app help’ got 0 exit code - found 2.9.0 with grep in /nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0 - directory tree listing: https://gist.github.com/fc0f8e7848649388caae66bddc561fb8
2018-05-07 09:14:33 +02:00
name = "mbedtls-2.9.0";
2015-04-06 23:41:54 +02:00
2018-01-28 02:10:04 +01:00
src = fetchFromGitHub {
owner = "ARMmbed";
repo = "mbedtls";
rev = name;
mbedtls: 2.8.0 -> 2.9.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. These checks were done: - built on NixOS - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_aescrypt2 -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_aescrypt2 --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_aescrypt2 help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_hello -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_hello --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_hello help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ecdh_curve25519 -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ecdh_curve25519 --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ecdh_curve25519 help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_key_app -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_key_app --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_key_app help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_mpi_demo -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_mpi_demo --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_mpi_demo help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_pk_decrypt -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_pk_decrypt --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_pk_decrypt help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_rsa_genkey -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_rsa_genkey --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_rsa_genkey help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_rsa_sign -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_rsa_sign --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_rsa_sign help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_entropy -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_entropy --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_entropy help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_random_ctr_drbg -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_random_ctr_drbg --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_random_ctr_drbg help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_random_havege -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_random_havege --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_gen_random_havege help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ssl_mail_client -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ssl_mail_client --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ssl_mail_client help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_benchmark -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_benchmark --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_benchmark help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ssl_cert_test -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ssl_cert_test --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_ssl_cert_test help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_pem2der -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_pem2der --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_pem2der help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_strerror -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_strerror --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_strerror help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_crl_app -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_crl_app --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_crl_app help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_req_app -h’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_req_app --help’ got 0 exit code - ran ‘/nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0/bin/mbedtls_req_app help’ got 0 exit code - found 2.9.0 with grep in /nix/store/3k23m5xwfjjwmyj7q311blpk4wl204ks-mbedtls-2.9.0 - directory tree listing: https://gist.github.com/fc0f8e7848649388caae66bddc561fb8
2018-05-07 09:14:33 +02:00
sha256 = "1pb1my8wwa757hvd06qwidkj58fa1wayf16g98q600xhya5fj3vx";
2015-04-06 23:41:54 +02:00
};
nativeBuildInputs = [ perl ];
postPatch = ''
patchShebangs .
'' + stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace library/Makefile --replace "-soname" "-install_name"
substituteInPlace tests/scripts/run-test-suites.pl --replace "LD_LIBRARY_PATH" "DYLD_LIBRARY_PATH"
# Necessary for install_name_tool below
echo "LOCAL_LDFLAGS += -headerpad_max_install_names" >> programs/Makefile
'';
2015-04-06 23:41:54 +02:00
makeFlags = [
"SHARED=1"
] ++ stdenv.lib.optionals stdenv.isDarwin [
"DLEXT=dylib"
2015-04-06 23:41:54 +02:00
];
installFlags = [
"DESTDIR=\${out}"
];
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
2018-05-07 20:11:18 +02:00
install_name_tool -change libmbedcrypto.dylib $out/lib/libmbedcrypto.dylib $out/lib/libmbedtls.dylib
install_name_tool -change libmbedcrypto.dylib $out/lib/libmbedcrypto.dylib $out/lib/libmbedx509.dylib
install_name_tool -change libmbedx509.dylib $out/lib/libmbedx509.dylib $out/lib/libmbedtls.dylib
for exe in $out/bin/*; do
if [[ $exe != *.sh ]]; then
install_name_tool -change libmbedtls.dylib $out/lib/libmbedtls.dylib $exe
install_name_tool -change libmbedx509.dylib $out/lib/libmbedx509.dylib $exe
install_name_tool -change libmbedcrypto.dylib $out/lib/libmbedcrypto.dylib $exe
fi
done
'';
2015-04-06 23:41:54 +02:00
doCheck = true;
meta = with stdenv.lib; {
2016-07-10 01:06:24 +02:00
homepage = https://tls.mbed.org/;
2015-04-06 23:41:54 +02:00
description = "Portable cryptographic and SSL/TLS library, aka polarssl";
license = licenses.gpl3;
platforms = platforms.all;
2016-07-10 01:06:24 +02:00
maintainers = with maintainers; [ wkennington fpletz ];
2015-04-06 23:41:54 +02:00
};
}