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