summaryrefslogtreecommitdiff
path: root/mobile/nix/androidsdk.nix
blob: cf1ea049a541bea35fdcefd20a2a175ed3bd3c4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
with (import <nixpkgs> {});
let
  android-composition = import ./android-composition.nix;
in
stdenv.mkDerivation {
  name = "androidsdk";

  buildInputs = [
    python3Full
  ];

  src = "${android-composition.androidsdk}";

  dontUnpack = true;

  buildPhase = ''
    buildDir=$PWD/android-composition
    mkdir $buildDir

    cp -r $src/* $buildDir

    chmod -R +w "$buildDir/libexec/android-sdk"
    python ${./androidsdk-fixup.py} "$buildDir/libexec/android-sdk"
  '';

  installPhase = ''
    cp -r $buildDir $out
  '';
}