Skip to content

Commit

Permalink
Add flake.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
toasterofbread committed Jun 24, 2024
1 parent 65aa99d commit 76f2954
Show file tree
Hide file tree
Showing 2 changed files with 199 additions and 0 deletions.
153 changes: 153 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
description = "SpMp development environment";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
android-nixpkgs = {
url = "github:HPRIOR/android-nixpkgs/516bd59caa6883d1a5dad0538af03a1f521e7764";
#follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, android-nixpkgs, ... }:
let
system = "x86_64-linux";
in
{
devShells."${system}".default =
let
pkgs = import nixpkgs {
inherit system;
};

android-sdk = (android-nixpkgs.sdk.${system} (sdkPkgs: with sdkPkgs; [
cmdline-tools-latest
build-tools-34-0-0
platform-tools
platforms-android-34
]));
in
pkgs.mkShell {
packages = with pkgs; [
jdk17
android-sdk

# Runtime
libglvnd
xorg.libX11
fontconfig
];

JAVA_HOME = "${pkgs.jdk17}/lib/openjdk";

GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${android-sdk}/share/android-sdk/build-tools/34.0.0/aapt2";
};
};
}

0 comments on commit 76f2954

Please sign in to comment.