diff options
author | Artturin <Artturin@artturin.com> | 2023-09-21 00:30:00 +0300 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2023-09-21 01:34:14 +0300 |
commit | 2557230bf62d87b753ffe3fb96c2b434843caac3 (patch) | |
tree | f5dea0f661d48e5d5e26e94c0eb14032fba65f71 /pkgs/development/androidndk-pkgs | |
parent | fd6901755debe65abf8102a61dbfb44dd09fa1dc (diff) |
androidndkPkgs: throw if targetPackages is not populated
It's better to exit with a throw than a attribute missing which cannot be caught with tryEval ``` > pkgsCross.aarch64-android-prebuilt.androidndkPkgs error: attribute 'androidndkPkgs_21' missing ``` Proper ways to to use `androidndkPkgs` AFAIK. `with import ./. { crossSystem = (import ./lib).systems.examples.aarch64-android-prebuilt; }; buildPackages.androidndkPkgs` or `pkgsCross.aarch64-android-prebuilt.buildPackages.androidndkPkgs`
Diffstat (limited to 'pkgs/development/androidndk-pkgs')
-rw-r--r-- | pkgs/development/androidndk-pkgs/default.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/androidndk-pkgs/default.nix b/pkgs/development/androidndk-pkgs/default.nix index a7001ce1d4a66..8aa7eefe4215e 100644 --- a/pkgs/development/androidndk-pkgs/default.nix +++ b/pkgs/development/androidndk-pkgs/default.nix @@ -29,7 +29,7 @@ # these two really are the same. buildAndroidndk = buildAndroidComposition.ndk-bundle; androidndk = androidComposition.ndk-bundle; - targetAndroidndkPkgs = targetPackages.androidndkPkgs_21; + targetAndroidndkPkgs = if targetPackages ? androidndkPkgs_21 then targetPackages.androidndkPkgs_21 else throw "androidndkPkgs_21: no targetPackages, use `buildPackages.androidndkPkgs_21"; }; "23b" = @@ -59,7 +59,7 @@ # these two really are the same. buildAndroidndk = buildAndroidComposition.ndk-bundle; androidndk = androidComposition.ndk-bundle; - targetAndroidndkPkgs = targetPackages.androidndkPkgs_23b; + targetAndroidndkPkgs = if targetPackages ? androidndkPkgs_23b then targetPackages.androidndkPkgs_23b else throw "androidndkPkgs_23b: no targetPackages, use `buildPackages.androidndkPkgs_23b"; }; "24" = @@ -89,7 +89,7 @@ # these two really are the same. buildAndroidndk = buildAndroidComposition.ndk-bundle; androidndk = androidComposition.ndk-bundle; - targetAndroidndkPkgs = targetPackages.androidndkPkgs_24; + targetAndroidndkPkgs = if targetPackages ? androidndkPkgs_24 then targetPackages.androidndkPkgs_24 else throw "androidndkPkgs_24: no targetPackages, use `buildPackages.androidndkPkgs_24"; }; } |