-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add flake * consolidate into flake.nix * fix build
- Loading branch information
1 parent
f96b38a
commit 3e95a0f
Showing
6 changed files
with
247 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
description = "Branch Android SDK for deep linking and attribution"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
android.url = "github:tadfisher/android-nixpkgs"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils, android }: flake-utils.lib.eachSystem [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" ] (system: | ||
let | ||
inherit (nixpkgs) lib; | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
config.allowUnfree = true; | ||
overlays = [ | ||
(final: prev: { | ||
android-sdk = android.sdk.${system} (sdkPkgs: with sdkPkgs; [ | ||
build-tools-34-0-0 | ||
cmdline-tools-latest | ||
emulator | ||
platform-tools | ||
platforms-android-34 | ||
] | ||
++ lib.optionals (system == "aarch64-darwin") [ | ||
system-images-android-34-google-apis-arm64-v8a | ||
] | ||
++ lib.optionals (system == "x86_64-darwin" || system == "x86_64-linux") [ | ||
system-images-android-34-google-apis-x86-64 | ||
]); | ||
}) | ||
]; | ||
}; | ||
in | ||
{ | ||
formatter = pkgs.nixpkgs-fmt; | ||
devShells = { | ||
default = pkgs.mkShell { | ||
name = "branch-sdk-android"; | ||
ANDROID_HOME = "${pkgs.android-sdk}/share/android-sdk"; | ||
ANDROID_SDK_ROOT = "${pkgs.android-sdk}/share/android-sdk"; | ||
JAVA_HOME = "${pkgs.jdk17.home}"; | ||
shellHook = '' | ||
echo " | ||
Entered the Branch SDK Android development environment. | ||
"; | ||
''; | ||
packages = [ | ||
pkgs.android-sdk | ||
pkgs.jdk17 # for android build-tools | ||
]; | ||
}; | ||
}; | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters