mirror of
https://github.com/nix-packages/nixapks.git
synced 2025-11-08 19:46:11 +01:00
multi system flake
This commit is contained in:
parent
c61e5d2c69
commit
ccdc188234
1 changed files with 21 additions and 14 deletions
35
flake.nix
35
flake.nix
|
|
@ -7,22 +7,29 @@
|
|||
gradle-dot-nix.url = "github:CrazyChaoz/gradle-dot-nix";
|
||||
};
|
||||
outputs =
|
||||
inputs:
|
||||
inputs@{ nixpkgs, android-nixpkgs, gradle2nix, gradle-dot-nix, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
|
||||
android_sdk.accept_license = true;
|
||||
};
|
||||
};
|
||||
|
||||
myLib = pkgs.callPackage ./lib { inherit inputs; };
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
|
||||
in
|
||||
{
|
||||
packages.x86_64-linux = myLib.byNameOverlay ./apks;
|
||||
lib = myLib;
|
||||
packages = forAllSystems (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
android_sdk.accept_license = true;
|
||||
};
|
||||
};
|
||||
myLib = pkgs.callPackage ./lib { inherit inputs; };
|
||||
in
|
||||
myLib.byNameOverlay ./apks
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue