lief: build shared library when stdenv is not static (#391478)
This commit is contained in:
@@ -1,26 +1,35 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, python
|
||||
, cmake
|
||||
, ninja
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
python,
|
||||
cmake,
|
||||
ninja,
|
||||
}:
|
||||
|
||||
let
|
||||
pyEnv = python.withPackages (ps: [ ps.setuptools ps.tomli ps.pip ps.setuptools ]);
|
||||
pyEnv = python.withPackages (ps: [
|
||||
ps.setuptools
|
||||
ps.tomli
|
||||
ps.pip
|
||||
ps.setuptools
|
||||
]);
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "lief";
|
||||
version = "0.16.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lief-project";
|
||||
repo = "LIEF";
|
||||
rev = version;
|
||||
sha256 = "sha256-3rLnT/zs7YrAYNc8I2EJevl98LHGcXFf7bVlJJfxqRc=";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-3rLnT/zs7YrAYNc8I2EJevl98LHGcXFf7bVlJJfxqRc=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "py" ];
|
||||
outputs = [
|
||||
"out"
|
||||
"py"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
@@ -38,6 +47,8 @@ stdenv.mkDerivation rec {
|
||||
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
|
||||
@@ -55,6 +66,9 @@ stdenv.mkDerivation rec {
|
||||
homepage = "https://lief.quarkslab.com/";
|
||||
license = [ licenses.asl20 ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
maintainers = with maintainers; [ lassulus genericnerdyusername ];
|
||||
maintainers = with maintainers; [
|
||||
lassulus
|
||||
genericnerdyusername
|
||||
];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user