diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-09-01 11:51:02 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-09-01 11:51:02 +0000 |
commit | aa4353b499e6950b7333578f936455a628145c31 (patch) | |
tree | c6332cedece2327a18d08794755b3fc0f9f1905b /nixpkgs/pkgs/development/libraries/lief | |
parent | ac456d475f4e50818499b804359355c0f3b4bbf7 (diff) | |
parent | 52185f4d76c18d8348f963795dfed1de018e8dfe (diff) | |
download | nixlib-aa4353b499e6950b7333578f936455a628145c31.tar nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.gz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.bz2 nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.lz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.xz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.zst nixlib-aa4353b499e6950b7333578f936455a628145c31.zip |
Merge https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/lief')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/lief/default.nix | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/nixpkgs/pkgs/development/libraries/lief/default.nix b/nixpkgs/pkgs/development/libraries/lief/default.nix index e7e8d2032ed5..44f82f15852a 100644 --- a/nixpkgs/pkgs/development/libraries/lief/default.nix +++ b/nixpkgs/pkgs/development/libraries/lief/default.nix @@ -3,26 +3,28 @@ , fetchFromGitHub , python , cmake +, ninja }: let - pyEnv = python.withPackages (ps: [ ps.setuptools ]); + pyEnv = python.withPackages (ps: [ ps.setuptools ps.tomli ps.pip ps.setuptools ]); in stdenv.mkDerivation rec { pname = "lief"; - version = "0.12.3"; + version = "0.13.2"; src = fetchFromGitHub { owner = "lief-project"; repo = "LIEF"; rev = version; - sha256 = "sha256-wZgv4AFc7DrMCyxMLKQxO1mUTDAU4klK8aZAySqGJoY="; + sha256 = "sha256-lH4SqwPB2Jp/wUI2Cll67PQbHbwMqpNuLy/ei8roiHg="; }; outputs = [ "out" "py" ]; nativeBuildInputs = [ cmake + ninja ]; # Not a propagatedBuildInput because only the $py output needs it; $out is @@ -31,33 +33,16 @@ stdenv.mkDerivation rec { python ]; - dontUseCmakeConfigure = true; - - buildPhase = '' - runHook preBuild - - substituteInPlace setup.py \ - --replace 'cmake_args = []' "cmake_args = [ \"-DCMAKE_INSTALL_PREFIX=$prefix\" ]" - ${pyEnv.interpreter} setup.py --sdk build --parallel=$NIX_BUILD_CORES - - runHook postBuild + postBuild = '' + pushd /build/source/api/python + ${pyEnv.interpreter} setup.py build --parallel=$NIX_BUILD_CORES + popd ''; - # I was unable to find a way to build the library itself and have it install - # to $out, while also installing the Python bindings to $py without building - # the project twice (using cmake), so this is the best we've got. It uses - # something called CPack to create the tarball, but it's not obvious to me - # *how* that happens, or how to intercept it to just get the structured - # library output. - installPhase = '' - runHook preInstall - - mkdir -p $out $py/nix-support - echo "${python}" >> $py/nix-support/propagated-build-inputs - tar xf build/*.tar.gz --directory $out --strip-components 1 + postInstall = '' + pushd /build/source/api/python ${pyEnv.interpreter} setup.py install --skip-build --root=/ --prefix=$py - - runHook postInstall + popd ''; meta = with lib; { @@ -65,6 +50,6 @@ stdenv.mkDerivation rec { homepage = "https://lief.quarkslab.com/"; license = [ licenses.asl20 ]; platforms = with platforms; linux ++ darwin; - maintainers = [ maintainers.lassulus ]; + maintainers = with maintainers; [ lassulus genericnerdyusername ]; }; } |