@@ -14,15 +14,26 @@ let
1414in
1515with stdenv; mkDerivation rec {
1616 pname = "nextpnr";
17− version = "2019.09.28";
17+ version = "2019.10.13";
1818
19− src = fetchFromGitHub {
20− owner = "yosyshq";
21− repo = "nextpnr";
22− rev = "7cd1e0495122847611b17a8d1f007d97a05b288c";
23− sha256 = "13y739l92plb22g73jf35pyh3y94b2vq0i65r9c31r2rb7fw4bbl";
24− fetchSubmodules = true;
25− };
19+ srcs = [
20+ (fetchFromGitHub {
21+ owner = "YosysHQ";
22+ repo = "nextpnr";
23+ rev = "c365dd1cabc3a4308ab9110534918623622c246b";
24+ sha256 = "1344pyq9xb5y1vxsnfgr488drfjsa6ls1jck0z9hwam6vg55s10r";
25+ name = "nextpnr";
26+ })
27+ (fetchFromGitHub {
28+ owner = "YosysHQ";
29+ repo = "nextpnr-tests";
30+ rev = "8f93e7e0f897b1b5da469919c9a43ba28b623b2a";
31+ sha256 = "0zpd0w49k9l7rs3wmi2v8z5s4l4lad5rprs5l83w13667himpzyc";
32+ name = "nextpnr-tests";
33+ })
34+ ];
35+
36+ sourceRoot = "nextpnr";
2637
2738 nativeBuildInputs
2839 = [ cmake ]
@@ -51,13 +62,17 @@ with stdenv; mkDerivation rec {
5162 # but works ok. We should probably make this overrideable upstream.
5263 patchPhase = with builtins; ''
5364 substituteInPlace ./CMakeLists.txt \
54− --replace 'git log -1 --format=%h' 'echo ${substring 0 11 src.rev}'
65+ --replace 'git log -1 --format=%h' 'echo ${substring 0 11 (elemAt srcs 0).rev}'
5566
5667 # use PyPy for icestorm if enabled
5768 substituteInPlace ./ice40/family.cmake \
5869 --replace ''\'''${PYTHON_EXECUTABLE}' '${icestorm.pythonInterp}'
5970 '';
6071
72+ preBuild = ''
73+ ln -s ../nextpnr-tests tests
74+ '';
75+
6176 doCheck = true;
6277
6378 postFixup = lib.optionalString enableGui ''