mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-16 12:42:53 +08:00
fix throw condition
This commit is contained in:
+7
-4
@@ -5,10 +5,14 @@ let
|
||||
crossPkgs = if isNull target then pkgs else import <nixpkgs> { crossSystem.config = target; };
|
||||
crossSystems = import ./cross-systems.nix;
|
||||
|
||||
inherit (crossPkgs) lib;
|
||||
inherit (crossPkgs.stdenv) buildPlatform hostPlatform;
|
||||
|
||||
crossSystem = crossSystems.${buildPlatform.system}.${hostPlatform.config}
|
||||
or throw ("Platform not supported: " + hostPlatform.config);
|
||||
crossSystem =
|
||||
if lib.attrsets.hasAttrByPath [ buildPlatform.system hostPlatform.config ] crossSystems then
|
||||
crossSystems.${buildPlatform.system}.${hostPlatform.config}
|
||||
else
|
||||
throw "Platform not supported: " + hostPlatform.config;
|
||||
|
||||
runner = crossSystem.runner or (_: "./himalaya") pkgs;
|
||||
|
||||
@@ -27,8 +31,7 @@ let
|
||||
};
|
||||
|
||||
himalaya = import ./package.nix {
|
||||
inherit rustPlatform;
|
||||
lib = crossPkgs.lib;
|
||||
inherit lib rustPlatform;
|
||||
fetchFromGitHub = crossPkgs.fetchFromGitHub;
|
||||
pkg-config = crossPkgs.pkg-config;
|
||||
darwin = crossPkgs.darwin;
|
||||
|
||||
Reference in New Issue
Block a user