lief: build shared library when stdenv is not static (#391478)

authored by lassulus and committed by GitHub 827c0a44 e0f24240

+27 -13
+27 -13
pkgs/development/libraries/lief/default.nix
··· 1 - { lib 2 - , stdenv 3 - , fetchFromGitHub 4 - , python 5 - , cmake 6 - , ninja 7 }: 8 9 let 10 - pyEnv = python.withPackages (ps: [ ps.setuptools ps.tomli ps.pip ps.setuptools ]); 11 in 12 - stdenv.mkDerivation rec { 13 pname = "lief"; 14 version = "0.16.4"; 15 16 src = fetchFromGitHub { 17 owner = "lief-project"; 18 repo = "LIEF"; 19 - rev = version; 20 - sha256 = "sha256-3rLnT/zs7YrAYNc8I2EJevl98LHGcXFf7bVlJJfxqRc="; 21 }; 22 23 - outputs = [ "out" "py" ]; 24 25 nativeBuildInputs = [ 26 cmake ··· 37 pydantic 38 scikit-build-core 39 ]; 40 41 postBuild = '' 42 pushd ../api/python ··· 55 homepage = "https://lief.quarkslab.com/"; 56 license = [ licenses.asl20 ]; 57 platforms = with platforms; linux ++ darwin; 58 - maintainers = with maintainers; [ lassulus genericnerdyusername ]; 59 }; 60 - }
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + python, 6 + cmake, 7 + ninja, 8 }: 9 10 let 11 + pyEnv = python.withPackages (ps: [ 12 + ps.setuptools 13 + ps.tomli 14 + ps.pip 15 + ps.setuptools 16 + ]); 17 in 18 + stdenv.mkDerivation (finalAttrs: { 19 pname = "lief"; 20 version = "0.16.4"; 21 22 src = fetchFromGitHub { 23 owner = "lief-project"; 24 repo = "LIEF"; 25 + tag = finalAttrs.version; 26 + hash = "sha256-3rLnT/zs7YrAYNc8I2EJevl98LHGcXFf7bVlJJfxqRc="; 27 }; 28 29 + outputs = [ 30 + "out" 31 + "py" 32 + ]; 33 34 nativeBuildInputs = [ 35 cmake ··· 46 pydantic 47 scikit-build-core 48 ]; 49 + 50 + cmakeFlags = [ (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) ]; 51 52 postBuild = '' 53 pushd ../api/python ··· 66 homepage = "https://lief.quarkslab.com/"; 67 license = [ licenses.asl20 ]; 68 platforms = with platforms; linux ++ darwin; 69 + maintainers = with maintainers; [ 70 + lassulus 71 + genericnerdyusername 72 + ]; 73 }; 74 + })