From 3232cadf962a0757c4b6313c8b01781f6ed9f2b0 Mon Sep 17 00:00:00 2001 From: Benjamin Hipple Date: Fri, 24 May 2019 17:40:37 -0400 Subject: [PATCH] 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. --- pkgs/development/libraries/boost/generic.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index c0c69b0fe70a..90dd8ff1744f 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -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 = ''