@@ -1,4 +1,4 @@
1−{ stdenv, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, makeSetupHook
1+{ stdenv, icu, expat, zlib, bzip2, python, fixDarwinDylibNames
22, toolset ? null
33, enableRelease ? true
44, enableDebug ? false
@@ -90,7 +90,7 @@ let
9090
9191 # Create a derivation which encompasses everything, making buildInputs nicer
9292 mkdir -p $out/nix-support
93− echo "${stripHeaderPathHook} $dev $lib" > $out/nix-support/propagated-native-build-inputs
93+ echo "$dev $lib" > $out/nix-support/propagated-native-build-inputs
9494 '';
9595
9696 commonConfigureFlags = [
@@ -98,7 +98,13 @@ let
9898 "--libdir=$(lib)/lib"
9999 ];
100100
101− stripHeaderPathHook = makeSetupHook { } ./strip-header-path.sh;
101+ fixup = ''
102+ # Make boost header paths relative so that they are not runtime dependencies
103+ (
104+ cd "$dev"
105+ find include \( -name '*.hpp' -or -name '*.h' \) -exec sed '1i#line 1 "{}"' -i '{}' \;
106+ )
107+ '';
102108
103109in
104110
@@ -144,6 +150,8 @@ stdenv.mkDerivation {
144150
145151 installPhase = installer nativeB2Args;
146152
153+ postFixup = fixup;
154+
147155 outputs = [ "out" "dev" "lib" ];
148156
149157 crossAttrs = rec {
@@ -162,5 +170,6 @@ stdenv.mkDerivation {
162170 '';
163171 buildPhase = builder crossB2Args;
164172 installPhase = installer crossB2Args;
173+ postFixup = fixup;
165174 };
166175}