8 # Docs cause an immense increase in build time, up to 2 additional hours
14 stdenv.mkDerivation rec {
15 pname = "${passthru.prettyName}-unwrapped";
16 # nixpkgs-update: no auto update
17 version = "0-unstable-2024-10-13";
19 src = fetchFromGitHub {
20 owner = "open-watcom";
21 repo = "open-watcom-v2";
22 rev = "f0a6465832643ba08b7f94fb814c552804fb395b";
23 hash = "sha256-rT3z0KrkCZ78SbsK2CEHfvJa1TEnRH2kwhzZhi8fZDo=";
30 for dateSource in bld/wipfc/configure; do
31 substituteInPlace $dateSource \
32 --replace '`date ' '`date -ud "@$SOURCE_DATE_EPOCH" '
35 substituteInPlace bld/watcom/h/banner.h \
36 --replace '__DATE__' "\"$(date -ud "@$SOURCE_DATE_EPOCH" +'%b %d %Y')\"" \
37 --replace '__TIME__' "\"$(date -ud "@$SOURCE_DATE_EPOCH" +'%T')\""
39 substituteInPlace build/makeinit \
40 --replace '$+$(%__CYEAR__)$-' "$(date -ud "@$SOURCE_DATE_EPOCH" +'%Y')"
42 + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
43 substituteInPlace build/mif/local.mif \
44 --replace '-static' ""
51 ++ lib.optionals withDocs [
58 export OWROOT=$(realpath $PWD)
59 export OWTOOLS=${if stdenv.cc.isClang then "CLANG" else "GCC"}
60 export OWDOCBUILD=${if withDocs then "1" else "0"}
61 export OWGHOSTSCRIPTPATH=${lib.optionalString withDocs "${ghostscript}/bin"}
62 export OWGUINOBUILD=${if withGUI then "0" else "1"}
65 export OWDOSBOX=${dosbox}/bin/dosbox
90 # Stripping breaks many tools
94 prettyName = "open-watcom-v2";
95 updateScript = unstableGitUpdater {
96 url = "https://github.com/open-watcom/open-watcom-v2.git";
97 # no numerical releases, monthly "YYYY-MM-DD-Build" tags and daily "Current-build", "Last-CI-build" & "Coverity-scan" retagging
98 hardcodeZeroVersion = true;
103 description = "V2 fork of the Open Watcom suite of compilers and tools";
106 A fork of Open Watcom: A C/C++/Fortran compiler and assembler suite
107 targeting a multitude of architectures (x86, IA-32, Alpha AXP, MIPS,
108 PowerPC) and operating systems (DOS, OS/2, Windows, Linux).
110 Main differences from Open Watcom 1.9:
112 - New two-phase build system - Open Watcom can be built by the host's
113 native C/C++ compiler or by itself
114 - Code generator properly initializes pointers by DLL symbol addresses
115 - DOS tools now support long file names (LFN) if appropriate LFN driver
117 - Open Watcom is ported to 64-bit hosts (Win64, Linux x64)
118 - Librarian supports x64 CPU object modules and libraries
119 - RDOS 32-bit C run-time compact memory model libraries are fixed
120 - Resource compiler and Resource editors support Win64 executables
121 - Open Watcom text editor is now self-contained, it can be used as
122 standalone tool without any requirements for any additional files or
124 - Broken C++ compiler pre-compiled header template support is fixed
125 - Many C++ compiler crashes are fixed
126 - Debugger has no length limit for any used environment variable
128 + lib.optionalString (!withDocs) ''
130 The documentation has been excluded from this build for build time reasons. It can be found here:
131 https://github.com/open-watcom/open-watcom-v2/wiki/Open-Watcom-Documentation
133 homepage = "https://open-watcom.github.io";
134 license = licenses.watcom;
135 platforms = with platforms; windows ++ unix;
136 badPlatforms = platforms.riscv ++ [
141 maintainers = with maintainers; [ OPNA2608 ];