summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2019-01-08 16:18:12 -0600
committerAustin Seipp <aseipp@pobox.com>2019-01-08 19:15:24 -0600
commit651679c257cef88f309f3f7f719a1dce216b6fcc (patch)
tree1feee0f74a4ca754ba95dfe68641cea719a4061c /pkgs/development/compilers
parent412e02c78448187d1b4a67db4336686cd0672d2d (diff)
downloadnixpkgs-651679c257cef88f309f3f7f719a1dce216b6fcc.tar
nixpkgs-651679c257cef88f309f3f7f719a1dce216b6fcc.tar.gz
nixpkgs-651679c257cef88f309f3f7f719a1dce216b6fcc.tar.bz2
nixpkgs-651679c257cef88f309f3f7f719a1dce216b6fcc.tar.lz
nixpkgs-651679c257cef88f309f3f7f719a1dce216b6fcc.tar.xz
nixpkgs-651679c257cef88f309f3f7f719a1dce216b6fcc.tar.zst
nixpkgs-651679c257cef88f309f3f7f719a1dce216b6fcc.zip
nextpnr: fix version string output
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/nextpnr/default.nix7
1 files changed, 7 insertions, 0 deletions
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;