Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.5 kB · 74 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475{ lib, stdenv, fetchFromGitHub, python3, cmake, ninja,}:
let pyEnv = python3.withPackages (ps: [ ps.setuptools ps.tomli ps.pip ps.setuptools ]);instdenv.mkDerivation (finalAttrs: { pname = "lief"; version = "0.16.6";
src = fetchFromGitHub { owner = "lief-project"; repo = "LIEF"; tag = finalAttrs.version; hash = "sha256-SvwFyhIBuG0u5rE7+1OaO7VZu4/X4jVI6oFOm5+yCd8="; };
outputs = [ "out" "py" ];
nativeBuildInputs = [ cmake ninja ];
# Not in propagatedBuildInputs because only the $py output needs it; $out is # just the library itself (e.g. C/C++ headers). buildInputs = with python3.pkgs; [ python build pathspec pip pydantic scikit-build-core ];
cmakeFlags = [ (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) ];
postBuild = '' pushd ../api/python ${pyEnv.interpreter} -m build --no-isolation --wheel --skip-dependency-check --config-setting=--parallel=$NIX_BUILD_CORES popd '';
postInstall = '' pushd ../api/python ${pyEnv.interpreter} -m pip install --prefix $py dist/*.whl popd '';
meta = with lib; { description = "Library to Instrument Executable Formats"; homepage = "https://lief.quarkslab.com/"; license = [ licenses.asl20 ]; platforms = with platforms; linux ++ darwin; maintainers = with maintainers; [ lassulus genericnerdyusername ]; };})