diff options
author | Emily <vcs@emily.moe> | 2019-08-19 22:02:35 -0700 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2019-08-23 02:14:40 -0500 |
commit | c1620c4635e3d4fb52a698a16c0c9faaad3dde00 (patch) | |
tree | 7d558cb1d1aa0fe4255f0f9d26faeeb504f9617b /pkgs/development/compilers/nextpnr | |
parent | 35994c61d6ea2ca76b034414571f36fbae9a17d8 (diff) |
nextpnr: fix GUI
Diffstat (limited to 'pkgs/development/compilers/nextpnr')
-rw-r--r-- | pkgs/development/compilers/nextpnr/default.nix | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/pkgs/development/compilers/nextpnr/default.nix b/pkgs/development/compilers/nextpnr/default.nix index 7ce57146cf8f9..c1e01ef77828c 100644 --- a/pkgs/development/compilers/nextpnr/default.nix +++ b/pkgs/development/compilers/nextpnr/default.nix @@ -2,17 +2,15 @@ , boost, python3, eigen , icestorm, trellis -# TODO(thoughtpolice) Currently the GUI build seems broken at runtime on my -# laptop (and over a remote X server on my server...), so mark it broken for -# now, with intent to fix later. -, enableGui ? false -, qtbase, wrapQtAppsHook +, enableGui ? true +, wrapQtAppsHook +, qtbase }: let boostPython = boost.override { python = python3; enablePython = true; }; in -stdenv.mkDerivation rec { +with stdenv; mkDerivation rec { pname = "nextpnr"; version = "2019.08.21"; @@ -25,10 +23,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ] - ++ (stdenv.lib.optional enableGui wrapQtAppsHook); + ++ (lib.optional enableGui wrapQtAppsHook); buildInputs = [ boostPython python3 eigen ] - ++ (stdenv.lib.optional enableGui qtbase); + ++ (lib.optional enableGui qtbase); enableParallelBuilding = true; cmakeFlags = @@ -41,7 +39,7 @@ stdenv.mkDerivation rec { "-DSERIALIZE_CHIPDB=OFF" # use PyPy for icestorm if enabled "-DPYTHON_EXECUTABLE=${icestorm.pythonInterp}" - ] ++ (stdenv.lib.optional (!enableGui) "-DBUILD_GUI=OFF"); + ] ++ (lib.optional (!enableGui) "-DBUILD_GUI=OFF"); # Fix the version number. This is a bit stupid (and fragile) in practice # but works ok. We should probably make this overrideable upstream. @@ -50,13 +48,18 @@ stdenv.mkDerivation rec { --replace 'git log -1 --format=%h' 'echo ${substring 0 11 src.rev}' ''; - meta = with stdenv.lib; { + + postFixup = lib.optionalString enableGui '' + wrapQtApp $out/bin/nextpnr-generic + wrapQtApp $out/bin/nextpnr-ice40 + wrapQtApp $out/bin/nextpnr-ecp5 + ''; + + meta = with lib; { description = "Place and route tool for FPGAs"; homepage = https://github.com/yosyshq/nextpnr; license = licenses.isc; platforms = platforms.all; maintainers = with maintainers; [ thoughtpolice emily ]; - - broken = enableGui; }; } |