@@ -16,7 +16,15 @@ stdenv.mkDerivation rec {
1616 sha256 = "1hdzxfzaibnjxjzgp6d2zay8nsarnfy9hfq55hz1bxzzl23n35aj";
1717 };
1818
19− buildInputs = [ tie ];
19+ # Remove references to __DATE__ and __TIME__
20+ postPatch = ''
21+ substituteInPlace wmerg-patch.ch --replace ' ("__DATE__", "__TIME__")' ""
22+ substituteInPlace ctang-patch.ch --replace ' ("__DATE__", "__TIME__")' ""
23+ substituteInPlace ctangle.cxx --replace ' ("__DATE__", "__TIME__")' ""
24+ substituteInPlace cweav-patch.ch --replace ' ("__DATE__", "__TIME__")' ""
25+ '';
26+
27+ nativeBuildInputs = [ tie ];
2028
2129 makeFlags = [
2230 "MACROSDIR=$(out)/share/texmf/tex/generic/cweb"
@@ -27,7 +35,7 @@ stdenv.mkDerivation rec {
2735 "CP=cp"
2836 "RM=rm"
2937 "PDFTEX=echo"
30− "CC=c++"
38+ "CC=${stdenv.cc.targetPrefix}c++"
3139 ];
3240
3341 buildPhase = ''