Skip to content
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

Update flake.lock #690

Merged
merged 3 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 0 additions & 59 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,65 +15,6 @@ final: prev:
# Own package updated independently of nixpkgs
jefferson = final.callPackage ./nix/jefferson { };

lief = prev.lief.overrideAttrs (super: with final; {

outputs = [ "out" "py" ];

nativeBuildInputs = [
cmake
ninja
];

# Not a propagatedBuildInput because only the $py output needs it; $out is
# just the library itself (e.g. C/C++ headers).
buildInputs = with python3.pkgs; [
python3
setuptools
tomli
];

env.CXXFLAGS = toString (lib.optional stdenv.isLinux [ "-ffunction-sections" "-fdata-sections" "-fvisibility-inlines-hidden" "-static-libstdc++" "-static-libgcc" ]
++ lib.optional stdenv.isDarwin [ "-faligned-allocation" "-fno-aligned-new" "-fvisibility=hidden" ]);

env.CFLAGS = toString (lib.optional stdenv.isLinux [ "-ffunction-sections" "-fdata-sections" "-static-libstdc++" "-static-libgcc" ]);
env.LDFLAGS = toString (lib.optional stdenv.isLinux [ "-Wl,--gc-sections" "-Wl,--exclude-libs,ALL" ]);


dontUseCmakeConfigure = true;

buildPhase = ''
runHook preBuild

mkdir -p build
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

cmake --build build --target all

runHook postBuild
'';

postBuild = ''
pushd api/python
${python3.interpreter} setup.py build --parallel=$NIX_BUILD_CORES
popd
'';

installPhase = ''
runHook preInstall

cmake --build build --target install

runHook postInstall
'';

postInstall = ''
pushd api/python
${python3.interpreter} setup.py install --skip-build --root=/ --prefix=$py
popd
'';

});

pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(python-final: python-prev: {
# Missing from nixpkgs
Expand Down
Loading