@@ -1,5 +1,14 @@
11{ stdenv, fetchFromGitHub, cmake
2−, icestorm, python3, boost, qtbase
2+, boost, python3
3+
4+# TODO: also add libtrellis, later on
5+, icestorm
6+
7+# TODO(thoughtpolice) Currently the GUI build seems broken at runtime on my
8+# laptop (and over a remote X server on my server...), so mark it broken for
9+# now, with intent to fix later.
10+, enableGui ? false
11+, qtbase
312}:
413
514let
@@ -17,13 +26,15 @@ stdenv.mkDerivation rec {
1726 };
1827
1928 nativeBuildInputs = [ cmake ];
20− buildInputs = [ boostPython python3 qtbase ];
29+ buildInputs
30+ = [ boostPython python3 ]
31+ ++ (stdenv.lib.optional enableGui qtbase);
2132
2233 enableParallelBuilding = true;
2334 cmakeFlags =
2435 [ "-DARCH=generic;ice40"
2536 "-DICEBOX_ROOT=${icestorm}/share/icebox"
26− ];
37+ ] ++ (stdenv.lib.optional (!enableGui) "-DBUILD_GUI=OFF");
2738
2839 meta = with stdenv.lib; {
2940 description = "Place and route tool for FPGAs";
@@ -31,5 +42,7 @@ stdenv.mkDerivation rec {
3142 license = licenses.isc;
3243 platforms = platforms.linux;
3344 maintainers = with maintainers; [ thoughtpolice ];
45+
46+ broken = enableGui;
3447 };
3548}