-
-
Notifications
You must be signed in to change notification settings - Fork 19.8k
android-tools: init at 31.0.0p1 #124992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android-tools: init at 31.0.0p1 #124992
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| { lib, stdenv, fetchurl | ||
| , cmake, perl, go | ||
| , protobuf, zlib, gtest, brotli, lz4, zstd, libusb1, pcre2 | ||
| }: | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| pname = "android-tools"; | ||
| version = "31.0.0p1"; | ||
|
|
||
| src = fetchurl { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could this be using
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to use release tarball as the repo only have build-system and documentation. Upstream doesn't vendorize platform-tools source code in repo. They use CPack to create tarball from used source files.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How many sources would we need to declare in Nix to achieve the same? I'd prefer if all sources were declared transparently instead of relying on an opaque tarball.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well in that case we need to checkout some of AOSP repositories. Those repositories are actually HUGE and Google doesn't provide snapshots from tags. Checking out repositories takes nearly 1 hour on my computer.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The whole tree is obviously huge but we shouldn't need all of it. That's why I was asking.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can declare the source files but there is 13-14 repos and lots of files all aroud the tree. Leaving the tracking job to CPack would be much easier. I don't agree tarballs are opaque as you can reproduce them. We can create our tarballs or vendorize CPack output in a repository.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it legally OK if we mirror some of Google's repositories on other platforms like this one?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah, that's a bit much.
The problem with that is that the reproduction is not transparent and in this case probably not even reproducible at a different point in time. As I said though, too many repos. I was hoping for, like, 5 which would've been a feasible amount to maintain ourselves.
The APL2 allows you to redistribute source code in any way you like but, why?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It makes sense now. Thanks for the definition!
Yep there is lots of repos.
Just asked, offtopic. |
||
| url = "https://github.com/nmeum/android-tools/releases/download/${version}/android-tools-${version}.tar.xz"; | ||
| sha256 = "1dn7v10gdx1pi0pkddznd5sdz941qz0x4jww8h2mk50nbyxc792i"; | ||
| }; | ||
|
|
||
| nativeBuildInputs = [ cmake perl go ]; | ||
| buildInputs = [ protobuf zlib gtest brotli lz4 zstd libusb1 pcre2 ]; | ||
|
|
||
| # Don't try to fetch any Go modules via the network: | ||
| GOFLAGS = [ "-mod=vendor" ]; | ||
|
|
||
| preConfigure = '' | ||
| export GOCACHE=$TMPDIR/go-cache | ||
| ''; | ||
|
|
||
| meta = with lib; { | ||
| description = "Android SDK platform tools"; | ||
| longDescription = '' | ||
| Android SDK Platform-Tools is a component for the Android SDK. It | ||
| includes tools that interface with the Android platform, such as adb and | ||
| fastboot. These tools are required for Android app development. They're | ||
| also needed if you want to unlock your device bootloader and flash it | ||
| with a new system image. | ||
| Currently the following tools are supported: | ||
| - adb | ||
| - fastboot | ||
| - mke2fs.android (required by fastboot) | ||
| - simg2img, img2simg, append2simg | ||
| ''; | ||
| # https://developer.android.com/studio/command-line#tools-platform | ||
| # https://developer.android.com/studio/releases/platform-tools | ||
| homepage = "https://github.com/nmeum/android-tools"; | ||
| license = with licenses; [ asl20 unicode-dfs-2015 ]; | ||
| platforms = platforms.linux; | ||
| maintainers = with maintainers; [ primeos ]; | ||
| }; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1039,6 +1039,10 @@ in | |
|
|
||
| analog = callPackage ../tools/admin/analog {}; | ||
|
|
||
| android-tools = lowPrio (callPackage ../tools/misc/android-tools { | ||
| stdenv = if stdenv.targetPlatform.isAarch64 then gcc10Stdenv else stdenv; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this needed?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was likely required for #124992 (comment) ;) |
||
| }); | ||
|
|
||
| angle-grinder = callPackage ../tools/text/angle-grinder {}; | ||
|
|
||
| ansifilter = callPackage ../tools/text/ansifilter {}; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.