add flake
This commit is contained in:
59
default.nix
Normal file
59
default.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
#{ pkgs, ... }:
|
||||
#with pkgs;
|
||||
#
|
||||
#stdenv.mkDerivation {
|
||||
# name = "android test app";
|
||||
# src = ./.;
|
||||
# nativeBuildInputs = [ jdk11 android-studio gradle ];
|
||||
# depsBuildBuild = [ ];
|
||||
# buildInputs = [ ];
|
||||
#}
|
||||
{ pkgs, ... }:
|
||||
with pkgs;
|
||||
|
||||
let fhs = pkgs.buildFHSUserEnv {
|
||||
name = "android-env";
|
||||
targetPkgs = pkgs: with pkgs;
|
||||
[ git
|
||||
gitRepo
|
||||
gnupg
|
||||
python2
|
||||
curl
|
||||
procps
|
||||
openssl
|
||||
gnumake
|
||||
nettools
|
||||
# For nixos < 19.03, use `androidenv.platformTools`
|
||||
androidenv.androidPkgs_9_0.platform-tools
|
||||
jdk
|
||||
schedtool
|
||||
utillinux
|
||||
m4
|
||||
gperf
|
||||
perl
|
||||
libxml2
|
||||
zip
|
||||
unzip
|
||||
bison
|
||||
flex
|
||||
lzop
|
||||
python3
|
||||
];
|
||||
multiPkgs = pkgs: with pkgs;
|
||||
[ zlib
|
||||
ncurses5
|
||||
];
|
||||
runScript = "bash";
|
||||
profile = ''
|
||||
export ALLOW_NINJA_ENV=true
|
||||
export USE_CCACHE=1
|
||||
export ANDROID_JAVA_HOME=${pkgs.jdk.home}
|
||||
export LD_LIBRARY_PATH=/usr/lib:/usr/lib32
|
||||
'';
|
||||
};
|
||||
in pkgs.stdenv.mkDerivation {
|
||||
name = "android-env-shell";
|
||||
nativeBuildInputs = [ fhs jdk11 gradle qtcreator ];
|
||||
shellHook = "exec android-env";
|
||||
|
||||
}
|
||||
20
flake.nix
Normal file
20
flake.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
description = "job application repo of king kali";
|
||||
|
||||
inputs.utils.url = "github:numtide/flake-utils";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-stable";
|
||||
|
||||
outputs = { self, nixpkgs, utils }:
|
||||
|
||||
utils.lib.eachSystem [ "x86_64-linux" ]
|
||||
(system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
devShell = import ./default.nix {
|
||||
inherit pkgs;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user