@@ -36,6 +36,13 @@ stdenv.mkDerivation rec {
3636 "-DICEBOX_ROOT=${icestorm}/share/icebox"
3737 ] ++ (stdenv.lib.optional (!enableGui) "-DBUILD_GUI=OFF");
3838
39+ # Fix the version number. This is a bit stupid (and fragile) in practice
40+ # but works ok. We should probably make this overrideable upstream.
41+ patchPhase = with builtins; ''
42+ substituteInPlace ./CMakeLists.txt \
43+ --replace 'git log -1 --format=%h' 'echo ${substring 0 11 src.rev}'
44+ '';
45+
3946 meta = with stdenv.lib; {
4047 description = "Place and route tool for FPGAs";
4148 homepage = https://github.com/yosyshq/nextpnr;