git.iko.soy/typeable/nixpkgs
on master help sign in
cwebbin: fix build on darwin and fix cross-compilation
commitd727b87f5a56d04ed11b9d68f4cb4efa93444457 authorBen Siraphob <bensiraphob@gmail.com> dateTue 2 Mar 2021, 22:22 (6 years ago) parenta48cf5c
1 file changed+10−2
pkgs/development/tools/misc/cwebbin/default.nix+10−2
pkgs/development/tools/misc/cwebbin/default.nix+10−2
@@ -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 = ''