@@ -0,0 +1,35 @@
1+{ stdenv, fetchFromGitHub, cmake
2+, icestorm, python3, boost, qtbase
3+}:
4+
5+let
6+ boostPython = boost.override { python = python3; enablePython = true; };
7+in
8+stdenv.mkDerivation rec {
9+ name = "nextpnr-${version}";
10+ version = "2018.08.09";
11+
12+ src = fetchFromGitHub {
13+ owner = "yosyshq";
14+ repo = "nextpnr";
15+ rev = "2e02f2d6166c75b1fcec73d268e97e407071a372";
16+ sha256 = "1f98mkailn75gz5fvhjhnyr0gwa0r8mm3f2sbvgl0yvys8qi08wr";
17+ };
18+
19+ nativeBuildInputs = [ cmake ];
20+ buildInputs = [ boostPython python3 qtbase ];
21+
22+ enableParallelBuilding = true;
23+ cmakeFlags =
24+ [ "-DARCH=generic;ice40"
25+ "-DICEBOX_ROOT=${icestorm}/share/icebox"
26+ ];
27+
28+ meta = with stdenv.lib; {
29+ description = "Place and route tool for FPGAs";
30+ homepage = https://github.com/yosyshq/nextpnr;
31+ license = licenses.isc;
32+ platforms = platforms.linux;
33+ maintainers = with maintainers; [ thoughtpolice ];
34+ };
35+}