summary refs log tree commit diff
path: root/pkgs/development/libraries/boost
diff options
context:
space:
mode:
authorBenjamin Hipple <bhipple@protonmail.com>2019-05-24 17:40:37 -0400
committerBenjamin Hipple <bhipple@protonmail.com>2019-05-24 17:46:46 -0400
commit3232cadf962a0757c4b6313c8b01781f6ed9f2b0 (patch)
treeee8f4813f749b2244779ca738db1b55a6d91b56d /pkgs/development/libraries/boost
parent084d75adb8eef4c40bb07248f6f5477940ed0171 (diff)
downloadnixpkgs-3232cadf962a0757c4b6313c8b01781f6ed9f2b0.tar
nixpkgs-3232cadf962a0757c4b6313c8b01781f6ed9f2b0.tar.gz
nixpkgs-3232cadf962a0757c4b6313c8b01781f6ed9f2b0.tar.bz2
nixpkgs-3232cadf962a0757c4b6313c8b01781f6ed9f2b0.tar.lz
nixpkgs-3232cadf962a0757c4b6313c8b01781f6ed9f2b0.tar.xz
nixpkgs-3232cadf962a0757c4b6313c8b01781f6ed9f2b0.tar.zst
nixpkgs-3232cadf962a0757c4b6313c8b01781f6ed9f2b0.zip
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.
Diffstat (limited to 'pkgs/development/libraries/boost')
-rw-r--r--pkgs/development/libraries/boost/generic.nix17
1 files changed, 11 insertions, 6 deletions
diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix
index c0c69b0fe70..90dd8ff1744 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 = ''