Skip to content

Commit ff33d6b

Browse files
authored
Merge pull request #668 from onekey-sec/update_flake_lock_action
Update flake.lock
2 parents 5c23165 + e71232a commit ff33d6b

File tree

6 files changed

+126
-121
lines changed

6 files changed

+126
-121
lines changed

flake.lock

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

nix/_sources/generated.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,26 @@
1414
},
1515
"version": "0.4.5"
1616
},
17+
"lief": {
18+
"cargoLocks": null,
19+
"date": null,
20+
"extract": null,
21+
"name": "lief",
22+
"passthru": null,
23+
"pinned": false,
24+
"src": {
25+
"deepClone": false,
26+
"fetchSubmodules": false,
27+
"leaveDotGit": false,
28+
"name": null,
29+
"owner": "lief-project",
30+
"repo": "LIEF",
31+
"rev": "0.13.2",
32+
"sha256": "sha256-lH4SqwPB2Jp/wUI2Cll67PQbHbwMqpNuLy/ei8roiHg=",
33+
"type": "github"
34+
},
35+
"version": "0.13.2"
36+
},
1737
"lzallright": {
1838
"cargoLocks": {
1939
"Cargo.lock": [

nix/_sources/generated.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@
99
sha256 = "sha256-+cPOzzO3bCQAu8LrbjUJ5S/SR5OFitOYLIu5L9t/q+k=";
1010
};
1111
};
12+
lief = {
13+
pname = "lief";
14+
version = "0.13.2";
15+
src = fetchFromGitHub {
16+
owner = "lief-project";
17+
repo = "LIEF";
18+
rev = "0.13.2";
19+
fetchSubmodules = false;
20+
sha256 = "sha256-lH4SqwPB2Jp/wUI2Cll67PQbHbwMqpNuLy/ei8roiHg=";
21+
};
22+
};
1223
lzallright = {
1324
pname = "lzallright";
1425
version = "v0.2.3";

nix/pyfatfs/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ python3.pkgs.buildPythonApplication rec {
99

1010
nativeBuildInputs = with python3.pkgs; [ pytest-runner setuptools-scm ];
1111

12-
propagatedBuildInputs = with python3.pkgs; [ fs ];
12+
propagatedBuildInputs = with python3.pkgs; [ pip fs ];
1313

1414
postPatch = ''
1515
substituteInPlace ./setup.py --replace 'setuptools_scm~=5.0.0' setuptools_scm

nvfetcher.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ fetch.pypi = "treelib"
1818
[pyfatfs]
1919
src.pypi = "pyfatfs"
2020
fetch.pypi = "pyfatfs"
21+
22+
[lief]
23+
src.github_tag = "lief-project/LIEF"
24+
fetch.github = "lief-project/LIEF"

overlay.nix

Lines changed: 59 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,68 @@ inputs: final: prev:
1111
hardeningDisable = (super.hardeningDisable or [ ]) ++ [ "fortify3" ];
1212
});
1313

14-
# Lief 12.3 incompatibility with Cmake 3.26
15-
lief = prev.lief.overrideAttrs (super: {
16-
postPatch = ''
17-
substituteInPlace setup.py \
18-
--replace \
19-
'cmake_args = ["-DLIEF_FORCE_API_EXPORTS=ON", "-DLIEF_PYTHON_API=on"]' \
20-
'cmake_args = ["-DLIEF_FORCE_API_EXPORTS=ON", "-DLIEF_PYTHON_API=on", "-DLIEF_EXAMPLES=off"]'
21-
'';
22-
});
23-
2414
# Own package updated independently of nixpkgs
2515
jefferson = final.callPackage ./nix/jefferson { };
2616

17+
lief = prev.lief.overrideAttrs (super: with final; {
18+
19+
outputs = [ "out" "py" ];
20+
21+
nativeBuildInputs = [
22+
cmake
23+
ninja
24+
];
25+
26+
# Not a propagatedBuildInput because only the $py output needs it; $out is
27+
# just the library itself (e.g. C/C++ headers).
28+
buildInputs = with python3.pkgs; [
29+
python3
30+
setuptools
31+
tomli
32+
];
33+
34+
CXXFLAGS = lib.optional stdenv.isLinux [ "-ffunction-sections" "-fdata-sections" "-fvisibility-inlines-hidden" "-static-libstdc++" "-static-libgcc" ]
35+
++ lib.optional stdenv.isDarwin [ "-faligned-allocation" "-fno-aligned-new" "-fvisibility=hidden" ];
36+
37+
CFLAGS = lib.optional stdenv.isLinux [ "-ffunction-sections" "-fdata-sections" "-static-libstdc++" "-static-libgcc" ];
38+
LDFLAGS = lib.optional stdenv.isLinux [ "-Wl,--gc-sections" "-Wl,--exclude-libs,ALL" ];
39+
40+
41+
dontUseCmakeConfigure = true;
42+
43+
buildPhase = ''
44+
runHook preBuild
45+
46+
mkdir -p build
47+
cmake -S . -B build -GNinja -DCMAKE_LINK_WHAT_YOU_USE=on -DBUILD_SHARED_LIBS=on -DLIEF_INSTALL_COMPILED_EXAMPLES=off -DCMAKE_INSTALL_PREFIX=$out -DCMAKE_BUILD_TYPE=Release
48+
49+
cmake --build build --target all
50+
51+
runHook postBuild
52+
'';
53+
54+
postBuild = ''
55+
pushd api/python
56+
${python3.interpreter} setup.py build --parallel=$NIX_BUILD_CORES
57+
popd
58+
'';
59+
60+
installPhase = ''
61+
runHook preInstall
62+
63+
cmake --build build --target install
64+
65+
runHook postInstall
66+
'';
67+
68+
postInstall = ''
69+
pushd api/python
70+
${python3.interpreter} setup.py install --skip-build --root=/ --prefix=$py
71+
popd
72+
'';
73+
74+
});
75+
2776
python3 = prev.python3 // {
2877
pkgs = prev.python3.pkgs.overrideScope
2978
(pyFinal: pyPrev: {

0 commit comments

Comments
 (0)