Skip to content

Commit 95f87a0

Browse files
committed
we can build binman!
1 parent c33678e commit 95f87a0

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ compile_commands.json
4040
# Twister test output directories
4141
twister-out*
4242
flash.bin
43+
/venv
44+
/result

flake.nix

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,33 +53,50 @@
5353
packages.binman = pythonPkgs.buildPythonPackage {
5454
name = "binman";
5555
src = "${u-boot}/tools/binman";
56-
pyproject = true;
56+
pyproject = false;
57+
build-system = [pythonPkgs.setuptools];
5758

58-
buildInputs = [pythonPkgs.setuptools];
59-
propagatedBuildInputs = [pythonPkgs.libfdt];
59+
buildInputs = [
60+
pythonPkgs.pypaBuildHook
61+
pythonPkgs.pipInstallHook
62+
];
63+
dependencies = [
64+
pythonPkgs.setuptools
65+
packages.u_boot_pylib
66+
pythonPkgs.libfdt
67+
packages.dtoc
68+
];
6069

6170
postPatch = ''
62-
#sed -e 's/>=61.0/==68.2.2/' -i pyproject.toml
6371
sed -e 's/"pylibfdt"/"libfdt"/' -i pyproject.toml
6472
${setProjectDynamicToLicense}
6573
'';
74+
75+
makeWrapperArgs = ["--set DYLD_LIBRARY_PATH ${pkgs.dtc}/lib"];
6676
};
6777

6878
packages.dtoc = pythonPkgs.buildPythonPackage {
6979
name = "dtoc";
7080
src = "${u-boot}/tools/dtoc";
71-
pyproject = true;
81+
pyproject = false;
82+
build-system = [pythonPkgs.setuptools];
7283

7384
buildInputs = [
74-
pythonPkgs.setuptools
75-
pythonPkgs.libfdt
85+
pythonPkgs.pypaBuildHook
86+
pythonPkgs.pipInstallHook
87+
];
88+
89+
dependencies = [
7690
packages.u_boot_pylib
91+
pythonPkgs.libfdt
7792
];
7893

7994
postPatch = ''
8095
sed -e 's/"pylibfdt"/"libfdt"/' -i pyproject.toml
8196
${setProjectDynamicToLicense}
8297
'';
98+
99+
makeWrapperArgs = ["--set DYLD_LIBRARY_PATH ${pkgs.dtc}/lib"];
83100
};
84101

85102
packages.u_boot_pylib = pythonPkgs.buildPythonPackage {

0 commit comments

Comments
 (0)