10 pyEnv = python.withPackages (ps: [ ps.setuptools ps.tomli ps.pip ps.setuptools ]);
12 stdenv.mkDerivation rec {
16 src = fetchFromGitHub {
17 owner = "lief-project";
20 sha256 = "sha256-2W/p6p7YXqSNaVs8yPAnLQhbBVIQWEbUVnhx9edV5gI=";
23 outputs = [ "out" "py" ];
30 # Not in propagatedBuildInputs because only the $py output needs it; $out is
31 # just the library itself (e.g. C/C++ headers).
32 buildInputs = with python.pkgs; [
41 env.CXXFLAGS = toString (lib.optional stdenv.hostPlatform.isDarwin [ "-faligned-allocation" "-fno-aligned-new" "-fvisibility=hidden" ]);
45 ${pyEnv.interpreter} -m build --no-isolation --wheel --skip-dependency-check --config-setting=--parallel=$NIX_BUILD_CORES
51 ${pyEnv.interpreter} -m pip install --prefix $py dist/*.whl
56 description = "Library to Instrument Executable Formats";
57 homepage = "https://lief.quarkslab.com/";
58 license = [ licenses.asl20 ];
59 platforms = with platforms; linux ++ darwin;
60 maintainers = with maintainers; [ lassulus genericnerdyusername ];