diff options
Diffstat (limited to 'pkgs/development/tools/apksigner/default.nix')
-rw-r--r-- | pkgs/development/tools/apksigner/default.nix | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/pkgs/development/tools/apksigner/default.nix b/pkgs/development/tools/apksigner/default.nix index 1df733c183b40..0a918df061a75 100644 --- a/pkgs/development/tools/apksigner/default.nix +++ b/pkgs/development/tools/apksigner/default.nix @@ -3,7 +3,6 @@ , fetchgit , jdk_headless , gradle -, perl , makeWrapper }: @@ -39,41 +38,14 @@ stdenv.mkDerivation rec { sed -i -e '/conscrypt/s/testImplementation/implementation/' build.gradle ''; - # fake build to pre-download deps into fixed-output derivation - deps = stdenv.mkDerivation { - pname = "${pname}-deps"; - inherit src version postPatch; - nativeBuildInputs = [ gradle perl ]; - buildPhase = '' - export GRADLE_USER_HOME=$(mktemp -d) - gradle --no-daemon build - ''; - # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) - installPhase = '' - find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)' \ - | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/''${\($5 =~ s/okio-jvm/okio/r)}" #e' \ - | sh - ''; - # Don't move info to share/ - forceShare = [ "dummy" ]; - outputHashMode = "recursive"; - # Downloaded jars differ by platform - outputHash = "sha256-cs95YI0SpvzCo5x5trMXlVUGepNKIH9oZ95AfLErKIU="; + mitmCache = gradle.fetchDeps { + inherit pname; + data = ./deps.json; }; - preBuild = '' - # Use the local packages from -deps - sed -i -e '/repositories {/a maven { url uri("${deps}") }' build.gradle - ''; - - buildPhase = '' - runHook preBuild + __darwinAllowLocalNetworking = true; - export GRADLE_USER_HOME=$(mktemp -d) - gradle --offline --no-daemon build - - runHook postBuild - ''; + doCheck = true; nativeBuildInputs = [ gradle makeWrapper ]; @@ -83,8 +55,6 @@ stdenv.mkDerivation rec { --add-flags "-jar $out/lib/apksigner.jar" ''; - __darwinAllowLocalNetworking = true; - meta = with lib; { description = "Command line tool to sign and verify Android APKs"; mainProgram = "apksigner"; |