diff --git a/pkgs/development/compilers/nextpnr/default.nix b/pkgs/development/compilers/nextpnr/default.nix index e2713a28f0e..1efce56dc13 100644 --- a/pkgs/development/compilers/nextpnr/default.nix +++ b/pkgs/development/compilers/nextpnr/default.nix @@ -36,6 +36,13 @@ stdenv.mkDerivation rec { "-DICEBOX_ROOT=${icestorm}/share/icebox" ] ++ (stdenv.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. + patchPhase = with builtins; '' + substituteInPlace ./CMakeLists.txt \ + --replace 'git log -1 --format=%h' 'echo ${substring 0 11 src.rev}' + ''; + meta = with stdenv.lib; { description = "Place and route tool for FPGAs"; homepage = https://github.com/yosyshq/nextpnr;