build-unit-test-docker: Add function2

This is a drop-in replacement for std::function that is planned to be
adopted by sdeventplus for storing callback functions. The major benefit
here is the unique_function type that can store functions bound with
move-only types like unique_ptr.

Change-Id: Id3abedf1c1adb237d2ddcdc20c9720a300d203fe
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/build-unit-test-docker.sh b/build-unit-test-docker.sh
index 7cfa2e5..5c79a58 100755
--- a/build-unit-test-docker.sh
+++ b/build-unit-test-docker.sh
@@ -92,6 +92,8 @@
   [boost]=1.69.0
   [cereal]=v1.2.2
   [CLI11]=v1.7.1
+  # Snapshot from 2019-03-10
+  [function2]=e3695b4b4fa3c672e25c6462d7900f8d2417a417
   # Snapshot from 2018-12-17
   [googletest]=9ab640ce5e5120021c5972d7e60f258bfca64d71
   [json]=v3.3.0
@@ -225,6 +227,9 @@
 make -j$(nproc) && \
 make install
 
+FROM openbmc-base as openbmc-function2
+RUN curl --create-dirs -L -o ${PREFIX}/include/function2/function.hpp https://raw.githubusercontent.com/Naios/function2/${PKG_REV['function2']}/include/function2/function2.hpp
+
 FROM openbmc-base as openbmc-googletest
 RUN curl -L https://github.com/google/googletest/archive/${PKG_REV['googletest']}.tar.gz | tar -xz && \
 cd googletest-* && \