-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathdefault.nix
More file actions
28 lines (23 loc) · 832 Bytes
/
default.nix
File metadata and controls
28 lines (23 loc) · 832 Bytes
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
{ pkgs ? import <nixpkgs> { }
, channel ? "stable"
}:
with pkgs;
let
androidSdk = callPackage ./pkgs/android { };
isSupported = _: pkg:
(!lib.isDerivation pkg) ||
lib.meta.availableOn stdenv.hostPlatform pkg ||
config.allowUnsupportedSystem ||
builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1";
filterIsSupported = lib.filterAttrs isSupported;
channelPkgs = {
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; };
}