-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathdefault.nix
29 lines (24 loc) · 859 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ pkgs ? import <nixpkgs> { }
, system ? pkgs.stdenv.system
, channel ? "stable"
}:
with pkgs;
let
androidSdk = callPackage ./pkgs/android { };
isSupported = _: pkg:
(!lib.isDerivation pkg) ||
lib.meta.availableOn hostPlatform pkg ||
config.allowUnsupportedSystem ||
builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1";
filterIsSupported = lib.filterAttrs isSupported;
channelPkgs = rec {
stable = filterIsSupported (androidSdk.callPackage ./channels/stable { });
beta = filterIsSupported (androidSdk.callPackage ./channels/beta { });
preview = filterIsSupported (androidSdk.callPackage ./channels/preview { });
canary = filterIsSupported (androidSdk.callPackage ./channels/canary { });
};
in
rec {
packages = channelPkgs."${channel}";
sdk = callPackage ./pkgs/android/sdk.nix { inherit packages; };
}