Update dependencies
This commit is contained in:
parent
d7c463c3a5
commit
175f48ce6c
2 changed files with 9 additions and 121 deletions
18
flake.lock
generated
18
flake.lock
generated
|
@ -19,11 +19,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1666689249,
|
"lastModified": 1666722663,
|
||||||
"narHash": "sha256-kKvi6wwpoiIYl0Nj0jHJwUE/lQt4LWfrhd+pmsrRvgI=",
|
"narHash": "sha256-WcIUceDTX5U7dju/HnzNAdBdaWKeenZm7haiU390xM8=",
|
||||||
"owner": "accentor",
|
"owner": "accentor",
|
||||||
"repo": "flake",
|
"repo": "flake",
|
||||||
"rev": "aa7b6aa9043e8f20bbf6c72e38534a20bb69bc66",
|
"rev": "c1640f1ba16fc00bccff6801f63ec7b4e45e1593",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -231,11 +231,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1666629043,
|
"lastModified": 1666703756,
|
||||||
"narHash": "sha256-Yoq6Ut2F3Ol73yO9hG93x6ts5c4F5BhKTbcF3DtBEAw=",
|
"narHash": "sha256-GwpMJ1hT+z1fMAUkaGtvbvofJQwdVFDEGVhfE82+AUk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b39fd6e4edef83cb4a135ebef98751ce23becc33",
|
"rev": "f994293d1eb8812f032e8919e10a594567cf6ef7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -262,11 +262,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1666676809,
|
"lastModified": 1666720945,
|
||||||
"narHash": "sha256-oZ4ECJ7N+RRM/WZ4v5HlHpU2wXpLAFbHrTX3Xb0eRCM=",
|
"narHash": "sha256-Bcb34KMVZONw6fpwNExF2Rb47dvqVf68R9XxUEycRMA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "f87ab9ff2ea215252532c9e7cf194c56fd8d6c38",
|
"rev": "c17dec1509d3a31b7fc725b455d9e9f4f3fbb8cf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1,112 +0,0 @@
|
||||||
From f5db877954c6839a2de43b3e2a4f70f0836fad3b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Yureka <yuka@yuka.dev>
|
|
||||||
Date: Sat, 15 Oct 2022 16:38:28 +0200
|
|
||||||
Subject: [PATCH] android-tools: add patch to fix build against 6.0 kernel
|
|
||||||
headers
|
|
||||||
|
|
||||||
---
|
|
||||||
.../android-tools-kernel-headers-6.0.diff | 82 +++++++++++++++++++
|
|
||||||
pkgs/tools/misc/android-tools/default.nix | 1 +
|
|
||||||
2 files changed, 83 insertions(+)
|
|
||||||
create mode 100644 pkgs/tools/misc/android-tools/android-tools-kernel-headers-6.0.diff
|
|
||||||
|
|
||||||
diff --git a/pkgs/tools/misc/android-tools/android-tools-kernel-headers-6.0.diff b/pkgs/tools/misc/android-tools/android-tools-kernel-headers-6.0.diff
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000000000..38c0c9f394911
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/pkgs/tools/misc/android-tools/android-tools-kernel-headers-6.0.diff
|
|
||||||
@@ -0,0 +1,82 @@
|
|
||||||
+diff --git a/vendor/adb/client/usb_linux.cpp b/vendor/adb/client/usb_linux.cpp
|
|
||||||
+index 25a50bd..0d09c47 100644
|
|
||||||
+--- a/vendor/adb/client/usb_linux.cpp
|
|
||||||
++++ b/vendor/adb/client/usb_linux.cpp
|
|
||||||
+@@ -59,8 +59,15 @@ using namespace std::literals;
|
|
||||||
+ #define DBGX(x...)
|
|
||||||
+
|
|
||||||
+ struct usb_handle {
|
|
||||||
++ usb_handle() : urb_in(0), urb_out(0) {
|
|
||||||
++ this->urb_in = new usbdevfs_urb;
|
|
||||||
++ this->urb_out = new usbdevfs_urb;
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
+ ~usb_handle() {
|
|
||||||
+ if (fd != -1) unix_close(fd);
|
|
||||||
++ delete urb_in;
|
|
||||||
++ delete urb_out;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ std::string path;
|
|
||||||
+@@ -72,8 +79,8 @@ struct usb_handle {
|
|
||||||
+ unsigned zero_mask;
|
|
||||||
+ unsigned writeable = 1;
|
|
||||||
+
|
|
||||||
+- usbdevfs_urb urb_in;
|
|
||||||
+- usbdevfs_urb urb_out;
|
|
||||||
++ usbdevfs_urb *urb_in;
|
|
||||||
++ usbdevfs_urb *urb_out;
|
|
||||||
+
|
|
||||||
+ bool urb_in_busy = false;
|
|
||||||
+ bool urb_out_busy = false;
|
|
||||||
+@@ -304,7 +311,7 @@ static int usb_bulk_write(usb_handle* h, const void* data, int len) {
|
|
||||||
+ std::unique_lock<std::mutex> lock(h->mutex);
|
|
||||||
+ D("++ usb_bulk_write ++");
|
|
||||||
+
|
|
||||||
+- usbdevfs_urb* urb = &h->urb_out;
|
|
||||||
++ usbdevfs_urb* urb = h->urb_out;
|
|
||||||
+ memset(urb, 0, sizeof(*urb));
|
|
||||||
+ urb->type = USBDEVFS_URB_TYPE_BULK;
|
|
||||||
+ urb->endpoint = h->ep_out;
|
|
||||||
+@@ -343,7 +350,7 @@ static int usb_bulk_read(usb_handle* h, void* data, int len) {
|
|
||||||
+ std::unique_lock<std::mutex> lock(h->mutex);
|
|
||||||
+ D("++ usb_bulk_read ++");
|
|
||||||
+
|
|
||||||
+- usbdevfs_urb* urb = &h->urb_in;
|
|
||||||
++ usbdevfs_urb* urb = h->urb_in;
|
|
||||||
+ memset(urb, 0, sizeof(*urb));
|
|
||||||
+ urb->type = USBDEVFS_URB_TYPE_BULK;
|
|
||||||
+ urb->endpoint = h->ep_in;
|
|
||||||
+@@ -388,7 +395,7 @@ static int usb_bulk_read(usb_handle* h, void* data, int len) {
|
|
||||||
+ }
|
|
||||||
+ D("[ urb @%p status = %d, actual = %d ]", out, out->status, out->actual_length);
|
|
||||||
+
|
|
||||||
+- if (out == &h->urb_in) {
|
|
||||||
++ if (out == h->urb_in) {
|
|
||||||
+ D("[ reap urb - IN complete ]");
|
|
||||||
+ h->urb_in_busy = false;
|
|
||||||
+ if (urb->status != 0) {
|
|
||||||
+@@ -397,7 +404,7 @@ static int usb_bulk_read(usb_handle* h, void* data, int len) {
|
|
||||||
+ }
|
|
||||||
+ return urb->actual_length;
|
|
||||||
+ }
|
|
||||||
+- if (out == &h->urb_out) {
|
|
||||||
++ if (out == h->urb_out) {
|
|
||||||
+ D("[ reap urb - OUT compelete ]");
|
|
||||||
+ h->urb_out_busy = false;
|
|
||||||
+ h->cv.notify_all();
|
|
||||||
+@@ -501,10 +508,10 @@ void usb_kick(usb_handle* h) {
|
|
||||||
+ ** but this ensures that a reader blocked on REAPURB
|
|
||||||
+ ** will get unblocked
|
|
||||||
+ */
|
|
||||||
+- ioctl(h->fd, USBDEVFS_DISCARDURB, &h->urb_in);
|
|
||||||
+- ioctl(h->fd, USBDEVFS_DISCARDURB, &h->urb_out);
|
|
||||||
+- h->urb_in.status = -ENODEV;
|
|
||||||
+- h->urb_out.status = -ENODEV;
|
|
||||||
++ ioctl(h->fd, USBDEVFS_DISCARDURB, h->urb_in);
|
|
||||||
++ ioctl(h->fd, USBDEVFS_DISCARDURB, h->urb_out);
|
|
||||||
++ h->urb_in->status = -ENODEV;
|
|
||||||
++ h->urb_out->status = -ENODEV;
|
|
||||||
+ h->urb_in_busy = false;
|
|
||||||
+ h->urb_out_busy = false;
|
|
||||||
+ h->cv.notify_all();
|
|
||||||
diff --git a/pkgs/tools/misc/android-tools/default.nix b/pkgs/tools/misc/android-tools/default.nix
|
|
||||||
index 5bc9e1d820fac..030486aab335c 100644
|
|
||||||
--- a/pkgs/tools/misc/android-tools/default.nix
|
|
||||||
+++ b/pkgs/tools/misc/android-tools/default.nix
|
|
||||||
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
|
|
||||||
revert = true;
|
|
||||||
excludes = [ "vendor/fmtlib" ];
|
|
||||||
})
|
|
||||||
+ ./android-tools-kernel-headers-6.0.diff
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake perl go ];
|
|
Loading…
Add table
Add a link
Reference in a new issue