git.iko.soy/typeable/nixpkgs
on master help sign in
nextpnr: fix version string output

Signed-off-by: Austin Seipp <aseipp@pobox.com>

commit651679c257cef88f309f3f7f719a1dce216b6fcc authorAustin Seipp <aseipp@pobox.com> dateTue 8 Jan 2019, 16:18 (8 years ago) parent412e02c
1 file changed+7
pkgs/development/compilers/nextpnr/default.nix+7
pkgs/development/compilers/nextpnr/default.nix+7
@@ -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;