summary refs log tree commit diff
path: root/pkgs/development/compilers/nextpnr
diff options
context:
space:
mode:
authorEmily <vcs@emily.moe>2019-09-02 18:49:12 +0100
committerAustin Seipp <aseipp@pobox.com>2019-09-02 16:11:17 -0500
commit12ae04518b004adf949a43125954b99c05189e6f (patch)
tree9f6a99a7fe40d2d638bfe5b06bc74491360a56db /pkgs/development/compilers/nextpnr
parentd13e64641dfcfd57680ad34c2eb22cb6ac524bb0 (diff)
downloadnixpkgs-12ae04518b004adf949a43125954b99c05189e6f.tar
nixpkgs-12ae04518b004adf949a43125954b99c05189e6f.tar.gz
nixpkgs-12ae04518b004adf949a43125954b99c05189e6f.tar.bz2
nixpkgs-12ae04518b004adf949a43125954b99c05189e6f.tar.lz
nixpkgs-12ae04518b004adf949a43125954b99c05189e6f.tar.xz
nixpkgs-12ae04518b004adf949a43125954b99c05189e6f.tar.zst
nixpkgs-12ae04518b004adf949a43125954b99c05189e6f.zip
nextpnr: (hopefully) fix build on Darwin
Fixes #67898, hopefully.
Diffstat (limited to 'pkgs/development/compilers/nextpnr')
-rw-r--r--pkgs/development/compilers/nextpnr/default.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/compilers/nextpnr/default.nix b/pkgs/development/compilers/nextpnr/default.nix
index 894ef8c45fa..357f26cf314 100644
--- a/pkgs/development/compilers/nextpnr/default.nix
+++ b/pkgs/development/compilers/nextpnr/default.nix
@@ -6,6 +6,7 @@
 , enableGui ? true
 , wrapQtAppsHook
 , qtbase
+, OpenGL ? null
 }:
 
 let
@@ -41,7 +42,10 @@ with stdenv; mkDerivation rec {
       "-DSERIALIZE_CHIPDB=OFF"
       # use PyPy for icestorm if enabled
       "-DPYTHON_EXECUTABLE=${icestorm.pythonInterp}"
-    ] ++ (lib.optional (!enableGui) "-DBUILD_GUI=OFF");
+    ]
+    ++ (lib.optional (!enableGui) "-DBUILD_GUI=OFF")
+    ++ (lib.optional (enableGui && stdenv.isDarwin)
+        "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks");
 
   # Fix the version number. This is a bit stupid (and fragile) in practice
   # but works ok. We should probably make this overrideable upstream.
@@ -61,7 +65,7 @@ with stdenv; mkDerivation rec {
     description = "Place and route tool for FPGAs";
     homepage    = https://github.com/yosyshq/nextpnr;
     license     = licenses.isc;
-    platforms   = platforms.linux;
+    platforms   = platforms.all;
     maintainers = with maintainers; [ thoughtpolice emily ];
   };
 }