mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-16 21:53:17 +00:00
use flakes shell
This commit is contained in:
parent
7cdc8c9eb1
commit
c5970afe5b
26
flake.lock
Normal file
26
flake.lock
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1662019588,
|
||||
"narHash": "sha256-oPEjHKGGVbBXqwwL+UjsveJzghWiWV0n9ogo1X6l4cw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2da64a81275b68fdad38af669afeda43d401e94b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
22
flake.nix
Normal file
22
flake.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
inputs.nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = { self, nixpkgs-unstable }:
|
||||
let
|
||||
pkgs = import nixpkgs-unstable { config.allowUnfree = true; config.android_sdk.accept_license = true; };
|
||||
androidComposition = pkgs.androidenv.composeAndroidPackages {
|
||||
toolsVersion = "26.1.1";
|
||||
platformToolsVersion = "33.0.2";
|
||||
buildToolsVersions = [ "30.0.3" ];
|
||||
platformVersions = [ "31" "30" "29" ];
|
||||
};
|
||||
in {
|
||||
devShell.x86_64-linux = pkgs.mkShell {
|
||||
JAVA_HOME = "${pkgs.openjdk11_headless.home}";
|
||||
ANDROID_HOME = "${androidComposition.androidsdk}/libexec/android-sdk";
|
||||
ANDROID_SDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk";
|
||||
|
||||
buildInputs = with pkgs; [ bash git androidComposition.androidsdk flutter openjdk11_headless ];
|
||||
};
|
||||
};
|
||||
}
|
15
shell.nix
15
shell.nix
|
@ -1,15 +0,0 @@
|
|||
{ pkgs ? import <unstable> { config.android_sdk.accept_license = true; } }:
|
||||
|
||||
let
|
||||
androidComposition = pkgs.androidenv.composeAndroidPackages {
|
||||
toolsVersion = "26.1.1";
|
||||
platformToolsVersion = "33.0.2";
|
||||
buildToolsVersions = [ "30.0.3" ];
|
||||
platformVersions = [ "31" "30" "29" ];
|
||||
};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
ANDROID_HOME = "${androidComposition.androidsdk}/libexec/android-sdk";
|
||||
ANDROID_SDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk";
|
||||
nativeBuildInputs = with pkgs; [ flutter openjdk11_headless ];
|
||||
}
|
Loading…
Reference in a new issue