forked from mirrors/nixpkgs
boost: run build and install hooks
Users who want to patch boost may put a postInstall hook in an overlay, which requires that that expression runs them on the buildPhase and installPhase.
This commit is contained in:
parent
084d75adb8
commit
3232cadf96
|
@ -97,9 +97,9 @@ let
|
|||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "boost-${version}";
|
||||
pname = "boost";
|
||||
|
||||
inherit src;
|
||||
inherit src version;
|
||||
|
||||
patchFlags = "";
|
||||
|
||||
|
@ -112,11 +112,10 @@ stdenv.mkDerivation {
|
|||
meta = {
|
||||
homepage = http://boost.org/;
|
||||
description = "Collection of C++ libraries";
|
||||
license = stdenv.lib.licenses.boost;
|
||||
|
||||
license = licenses.boost;
|
||||
platforms = platforms.unix ++ platforms.windows;
|
||||
badPlatforms = stdenv.lib.optional (versionOlder version "1.59") "aarch64-linux"
|
||||
++ stdenv.lib.optional ((versionOlder version "1.57") || version == "1.58") "x86_64-darwin";
|
||||
badPlatforms = optional (versionOlder version "1.59") "aarch64-linux"
|
||||
++ optional ((versionOlder version "1.57") || version == "1.58") "x86_64-darwin";
|
||||
maintainers = with maintainers; [ peti ];
|
||||
};
|
||||
|
||||
|
@ -158,16 +157,22 @@ stdenv.mkDerivation {
|
|||
++ optional (toolset != null) "--with-toolset=${toolset}";
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
./b2 ${b2Args}
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
# boostbook is needed by some applications
|
||||
mkdir -p $dev/share/boostbook
|
||||
cp -a tools/boostbook/{xsl,dtd} $dev/share/boostbook/
|
||||
|
||||
# Let boost install everything else
|
||||
./b2 ${b2Args} install
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
|
|
Loading…
Reference in a new issue