diff --git a/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix b/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix index a8b172f4eb5d..ccf8b4591d38 100644 --- a/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix +++ b/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix @@ -1,6 +1,6 @@ { lib, stdenv, makeWrapper , runCommand, wrapBintoolsWith, wrapCCWith, autoPatchelfHook -, buildAndroidndk, androidndk, targetAndroidndkPkgs +, llvmPackages, buildAndroidndk, androidndk, targetAndroidndkPkgs }: let @@ -63,6 +63,7 @@ rec { passthru = { inherit targetPrefix; isClang = true; # clang based cc, but bintools ld + inherit (llvmPackages.clang.cc) hardeningUnsupportedFlagsByTargetPlatform; }; dontUnpack = true; dontBuild = true; diff --git a/pkgs/development/androidndk-pkgs/default.nix b/pkgs/development/androidndk-pkgs/default.nix index b11776acebf5..93af59a85933 100644 --- a/pkgs/development/androidndk-pkgs/default.nix +++ b/pkgs/development/androidndk-pkgs/default.nix @@ -1,8 +1,8 @@ -{ lib, androidenv, buildPackages, pkgs, targetPackages +{ lib, androidenv, buildPackages, pkgs, targetPackages, androidndkPkgs_23, config }: let - makeNdkPkgs = ndkVersion: + makeNdkPkgs = ndkVersion: llvmPackages: let buildAndroidComposition = buildPackages.buildPackages.androidenv.composeAndroidPackages { includeNDK = true; @@ -22,6 +22,10 @@ let inherit (pkgs) stdenv runCommand wrapBintoolsWith wrapCCWith; + + # For hardeningUnsupportedFlagsByTargetPlatform + inherit llvmPackages; + # buildPackages.foo rather than buildPackages.buildPackages.foo would work, # but for splicing messing up on infinite recursion for the variants we # *dont't* use. Using this workaround, but also making a test to ensure @@ -33,9 +37,10 @@ let in { - "21" = makeNdkPkgs "21.0.6113669"; - "23b" = makeNdkPkgs "23.1.7779620"; - "24" = makeNdkPkgs "24.0.8215888"; - "25" = makeNdkPkgs "25.2.9519653"; - "26" = makeNdkPkgs "26.3.11579264"; + "21" = makeNdkPkgs "21.0.6113669" pkgs.llvmPackages_14; # "9" + "23" = makeNdkPkgs "23.1.7779620" pkgs.llvmPackages_14; # "12" + # Versions below 24 use a version not available in nixpkgs/old version which could be removed in the near future so use 14 for them as this is only used to get the hardening flags. + "24" = makeNdkPkgs "24.0.8215888" pkgs.llvmPackages_14; + "25" = makeNdkPkgs "25.2.9519653" pkgs.llvmPackages_14; + "26" = makeNdkPkgs "26.3.11579264" pkgs.llvmPackages_17; } diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 1844ca652f4a..11ffc911d70b 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -88,6 +88,7 @@ mapAliases ({ ansible_2_12 = throw "Ansible 2.12 goes end of life in 2023/05 and can't be supported throughout the 23.05 release cycle"; # Added 2023-05-16 ansible_2_13 = throw "Ansible 2.13 goes end of life in 2023/11"; # Added 2023-12-30 ansible_2_14 = throw "Ansible 2.14 goes end of life in 2024/05 and can't be supported throughout the 24.05 release cycle"; # Added 2024-04-11 + androidndkPkgs_23b = lib.warn "The package set `androidndkPkgs_23b` has been renamed to `androidndkPkgs_23`." androidndkPkgs_23; # Added 2024-07-21 apacheAnt_1_9 = throw "Ant 1.9 has been removed since it's not used in nixpkgs anymore"; # Added 2023-11-12 apacheKafka_2_8 = throw "apacheKafka_2_8 through _3_5 have been removed from nixpkgs as outdated"; # Added 2024-02-12 apacheKafka_3_0 = throw "apacheKafka_2_8 through _3_5 have been removed from nixpkgs as outdated"; # Added 2024-02-12 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 020f8f03bf40..3b42191c8e02 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4041,7 +4041,7 @@ with pkgs; androidndkPkgs = androidndkPkgs_26; androidndkPkgs_21 = (callPackage ../development/androidndk-pkgs {})."21"; - androidndkPkgs_23b = (callPackage ../development/androidndk-pkgs {})."23b"; + androidndkPkgs_23 = (callPackage ../development/androidndk-pkgs {})."23"; androidndkPkgs_24 = (callPackage ../development/androidndk-pkgs {})."24"; androidndkPkgs_25 = (callPackage ../development/androidndk-pkgs {})."25"; androidndkPkgs_26 = (callPackage ../development/androidndk-pkgs {})."26";