Skip to content

Commit 9cc53d4

Browse files
authored
Merge pull request #1128 from onekey-sec/update-ubi-reader
chore(deps): upgrade ubi-reader to 0.8.10
2 parents 1d53031 + fc87bc3 commit 9cc53d4

File tree

5 files changed

+39
-15
lines changed

5 files changed

+39
-15
lines changed

flake.nix

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,42 @@
3636
"aarch64-darwin"
3737
];
3838

39+
# Temporary patches for nixpkgs required for current unblob
40+
nixpkgsPatches = [
41+
# ubi_reader: 0.8.9 -> 0.8.10
42+
{
43+
url = "https://github.com/NixOS/nixpkgs/commit/a3b3188908f87f3c2bafd6b66ab2c0df2c059fa9.patch";
44+
hash = "sha256-MYP5q7KwbGzx01GYxvb4YwkLPV/aSzbI4Cbp+olw9a0=";
45+
}
46+
];
47+
3948
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
4049
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
4150

4251
# Nixpkgs instantiated for supported system types.
4352
nixpkgsFor = forAllSystems (
4453
system:
45-
import nixpkgs {
46-
inherit system;
47-
overlays = [
48-
self.overlays.default
49-
];
50-
}
54+
let
55+
importPkgs =
56+
nixpkgs:
57+
import nixpkgs {
58+
inherit system;
59+
overlays = [
60+
self.overlays.default
61+
];
62+
};
63+
64+
bootstrapPkgs = importPkgs nixpkgs;
65+
66+
patchedNixpkgs = bootstrapPkgs.applyPatches {
67+
name = "nixpkgs-patched";
68+
src = nixpkgs;
69+
patches = map bootstrapPkgs.fetchpatch nixpkgsPatches;
70+
};
71+
72+
finalPkgs = importPkgs patchedNixpkgs;
73+
in
74+
if builtins.length nixpkgsPatches != 0 then finalPkgs else bootstrapPkgs
5175
);
5276
in
5377
{
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:e0212dd24f80c73b10e6ef2853fdf73d3a8ca27103cfcdb8cee4360f0814057a
3-
size 896
2+
oid sha256:6181259c6b2ca629a56920b422e9a8f212a4d0bcead923df92dbd66fbb7e1c30
3+
size 7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:e0212dd24f80c73b10e6ef2853fdf73d3a8ca27103cfcdb8cee4360f0814057a
3-
size 896
2+
oid sha256:6181259c6b2ca629a56920b422e9a8f212a4d0bcead923df92dbd66fbb7e1c30
3+
size 7
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:e0212dd24f80c73b10e6ef2853fdf73d3a8ca27103cfcdb8cee4360f0814057a
3-
size 896
2+
oid sha256:6181259c6b2ca629a56920b422e9a8f212a4d0bcead923df92dbd66fbb7e1c30
3+
size 7

uv.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)