diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/mbedtls')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/mbedtls/2.nix | 6 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/mbedtls/3.nix | 6 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/mbedtls/generic.nix (renamed from nixpkgs/pkgs/development/libraries/mbedtls/default.nix) | 32 |
3 files changed, 30 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/development/libraries/mbedtls/2.nix b/nixpkgs/pkgs/development/libraries/mbedtls/2.nix new file mode 100644 index 000000000000..2dd5ae6dae58 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/mbedtls/2.nix @@ -0,0 +1,6 @@ +{ callPackage }: + +callPackage ./generic.nix { + version = "2.28.3"; + hash = "sha256-w5bJErCNRZLE8rHcuZlK3bOqel97gPPMKH2cPGUR6Zw="; +} diff --git a/nixpkgs/pkgs/development/libraries/mbedtls/3.nix b/nixpkgs/pkgs/development/libraries/mbedtls/3.nix new file mode 100644 index 000000000000..67269717bb99 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/mbedtls/3.nix @@ -0,0 +1,6 @@ +{ callPackage }: + +callPackage ./generic.nix { + version = "3.4.0"; + hash = "sha256-1YA4hp/VEjph5k0qJqhhH4nBbTP3Qu2pl7WpuvPkVfg="; +} diff --git a/nixpkgs/pkgs/development/libraries/mbedtls/default.nix b/nixpkgs/pkgs/development/libraries/mbedtls/generic.nix index 4fa4a5c4503f..adc46adb75fb 100644 --- a/nixpkgs/pkgs/development/libraries/mbedtls/default.nix +++ b/nixpkgs/pkgs/development/libraries/mbedtls/generic.nix @@ -1,4 +1,7 @@ -{ lib, stdenv +{ lib +, stdenv +, version +, hash , fetchFromGitHub , cmake @@ -11,17 +14,13 @@ stdenv.mkDerivation rec { pname = "mbedtls"; - # Auto updates are disabled due to repology listing dev releases as release - # versions. See - # * https://github.com/NixOS/nixpkgs/pull/119838#issuecomment-822100428 - # * https://github.com/NixOS/nixpkgs/commit/0ee02a9d42b5fe1825b0f7cee7a9986bb4ba975d - version = "2.28.0"; # nixpkgs-update: no auto update + inherit version; src = fetchFromGitHub { - owner = "ARMmbed"; + owner = "Mbed-TLS"; repo = "mbedtls"; rev = "${pname}-${version}"; - sha256 = "sha256-VDoIUBaK2e0E5nkwU1u3Wvxc+s6OzBSdIeHsJKJuZ2g="; + inherit hash; }; nativeBuildInputs = [ cmake ninja perl python3 ]; @@ -33,17 +32,22 @@ stdenv.mkDerivation rec { perl scripts/config.pl set MBEDTLS_THREADING_PTHREAD # POSIX thread wrapper layer for the threading layer. ''; - cmakeFlags = [ "-DUSE_SHARED_MBEDTLS_LIBRARY=on" ]; - NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ - "-Wno-error=format" - "-Wno-error=format-truncation" + cmakeFlags = [ + "-DUSE_SHARED_MBEDTLS_LIBRARY=${if stdenv.hostPlatform.isStatic then "off" else "on"}" + + # Avoid a dependency on jsonschema and jinja2 by not generating source code + # using python. In releases, these generated files are already present in + # the repository and do not need to be regenerated. See: + # https://github.com/Mbed-TLS/mbedtls/releases/tag/v3.3.0 below "Requirement changes". + "-DGEN_FILES=off" ]; meta = with lib; { - homepage = "https://tls.mbed.org/"; + homepage = "https://www.trustedfirmware.org/projects/mbed-tls/"; + changelog = "https://github.com/Mbed-TLS/mbedtls/blob/${pname}-${version}/ChangeLog"; description = "Portable cryptographic and TLS library, formerly known as PolarSSL"; license = licenses.asl20; platforms = platforms.all; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ raphaelr ]; }; } |