about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/cwebbin/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/cwebbin/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/misc/cwebbin/default.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/cwebbin/default.nix b/nixpkgs/pkgs/development/tools/misc/cwebbin/default.nix
index 3ab8800f3c4e..055a24f3fe0a 100644
--- a/nixpkgs/pkgs/development/tools/misc/cwebbin/default.nix
+++ b/nixpkgs/pkgs/development/tools/misc/cwebbin/default.nix
@@ -16,7 +16,15 @@ stdenv.mkDerivation rec {
     sha256 = "1hdzxfzaibnjxjzgp6d2zay8nsarnfy9hfq55hz1bxzzl23n35aj";
   };
 
-  buildInputs = [ tie ];
+  # Remove references to __DATE__ and __TIME__
+  postPatch = ''
+    substituteInPlace wmerg-patch.ch --replace ' ("__DATE__", "__TIME__")' ""
+    substituteInPlace ctang-patch.ch --replace ' ("__DATE__", "__TIME__")' ""
+    substituteInPlace ctangle.cxx --replace ' ("__DATE__", "__TIME__")' ""
+    substituteInPlace cweav-patch.ch --replace ' ("__DATE__", "__TIME__")' ""
+  '';
+
+  nativeBuildInputs = [ tie ];
 
   makeFlags = [
     "MACROSDIR=$(out)/share/texmf/tex/generic/cweb"
@@ -27,7 +35,7 @@ stdenv.mkDerivation rec {
     "CP=cp"
     "RM=rm"
     "PDFTEX=echo"
-    "CC=c++"
+    "CC=${stdenv.cc.targetPrefix}c++"
   ];
 
   buildPhase = ''