diff options
author | Artturi <Artturin@artturin.com> | 2022-11-09 02:09:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-09 02:09:35 +0200 |
commit | 3e2445be79265715ba008a69c8e87209f486d7bb (patch) | |
tree | eebfe8623792ad4f1f0b1eb12c79b765a2fe7587 /pkgs | |
parent | 47a62893e69d22ee6e107a19899ba150ed7cffe2 (diff) | |
parent | ec912ab1dda065810d3f8344de58d0012aefe156 (diff) |
Merge pull request #200145 from hzeller/20221107-update-surelog-uhdm-plugin
Fix for darwin build.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/science/logic/surelog/default.nix | 22 | ||||
-rw-r--r-- | pkgs/applications/science/logic/uhdm/default.nix | 30 | ||||
-rw-r--r-- | pkgs/development/compilers/yosys/plugins/symbiflow.nix | 12 |
3 files changed, 49 insertions, 15 deletions
diff --git a/pkgs/applications/science/logic/surelog/default.nix b/pkgs/applications/science/logic/surelog/default.nix index b5130654c371a..c3e127282cb97 100644 --- a/pkgs/applications/science/logic/surelog/default.nix +++ b/pkgs/applications/science/logic/surelog/default.nix @@ -7,20 +7,33 @@ , libuuid , openjdk11 , gperftools +, flatbuffers +, fetchpatch }: stdenv.mkDerivation rec { pname = "surelog"; - version = "1.40"; + version = "1.45"; src = fetchFromGitHub { owner = "chipsalliance"; repo = pname; rev = "v${version}"; - hash = "sha256-5nhJilFIJJDCnJUEUgyPNtWSQUgWcvM6LDFgFatAl/k="; + hash = "sha256-/SSKcEIhmWDOKN4v3djWTwZ5/nQvR8ibflzSVFDt/rM="; fetchSubmodules = true; }; + # This prevents race conditions in unit tests that surface since we run + # ctest in parallel. + # This patch can be removed with the next version of surelog + patches = [ + (fetchpatch { + url = "https://github.com/chipsalliance/Surelog/commit/9a54efbd156becf65311a4272104810f36041fa6.patch"; + sha256 = "sha256-rU1Z/0wlVTgnPLqTN/87n+gI1iJ+6k/+sunVVd0ulhQ="; + name = "parallel-test-running.patch"; + }) + ]; + nativeBuildInputs = [ cmake pkg-config @@ -34,6 +47,11 @@ stdenv.mkDerivation rec { buildInputs = [ libuuid gperftools + flatbuffers + ]; + + cmakeFlags = [ + "-DSURELOG_USE_HOST_FLATBUFFERS=On" ]; doCheck = true; diff --git a/pkgs/applications/science/logic/uhdm/default.nix b/pkgs/applications/science/logic/uhdm/default.nix index 47b9bb0d94232..a87b6fbf35fa6 100644 --- a/pkgs/applications/science/logic/uhdm/default.nix +++ b/pkgs/applications/science/logic/uhdm/default.nix @@ -3,26 +3,46 @@ , fetchFromGitHub , cmake , python3 +, gtest +, fetchpatch }: stdenv.mkDerivation rec { pname = "UHDM"; - version = "0.9.1.40"; + version = "1.45"; src = fetchFromGitHub { owner = "chipsalliance"; repo = pname; rev = "v${version}"; - hash = "sha256-CliKU2WM8B9012aDcS/mTyIf+JcsVsc4uRRi9+FRWbM="; + hash = "sha256-mxQRmI8yUUrSUYa4kUT9URgfqYvuz3V9e1IGjtiHyhc="; fetchSubmodules = true; }; + # Add ability to use local googletest provided from nix instead of + # the version from the submodule in third_party/. The third_party/ version + # is slightly older and does not work with our hydra Darwin builds that needs + # to set a particular temp directory. + # This patch allows to choose UHDM_USE_HOST_GTEST=On in the cflags. + patches = [ + (fetchpatch { + url = "https://github.com/chipsalliance/UHDM/commit/ad60fdb65a7c49fdc8ee3fffdca791f9364af4f5.patch"; + sha256 = "sha256-IkwnepWWmBychJ0mu+kaddUEc9jkldIRq+GyJkhrO8A="; + name = "allow-local-gtest.patch"; + }) + ]; + nativeBuildInputs = [ cmake ]; buildInputs = [ (python3.withPackages (p: with p; [ orderedmultidict ])) + gtest + ]; + + cmakeFlags = [ + "-DUHDM_USE_HOST_GTEST=On" ]; doCheck = true; @@ -33,12 +53,6 @@ stdenv.mkDerivation rec { rm -rf $out/lib/uhdm ''; - prePatch = '' - substituteInPlace CMakeLists.txt --replace \ - 'capnp compile' \ - 'capnp compile --src-prefix=''${GENDIR}/..' - ''; - meta = { description = "Universal Hardware Data Model"; homepage = "https://github.com/chipsalliance/UHDM"; diff --git a/pkgs/development/compilers/yosys/plugins/symbiflow.nix b/pkgs/development/compilers/yosys/plugins/symbiflow.nix index 97f0cdb7b5faf..31e429284c068 100644 --- a/pkgs/development/compilers/yosys/plugins/symbiflow.nix +++ b/pkgs/development/compilers/yosys/plugins/symbiflow.nix @@ -9,16 +9,17 @@ , yosys-symbiflow , uhdm , surelog +, flatbuffers }: let src = fetchFromGitHub { owner = "chipsalliance"; repo = "yosys-f4pga-plugins"; - rev = "27208ce08200a5e89e3bd4f466bc68824df38c32"; - hash = "sha256-S7txjzlIp+idWIfp/DDOznluA3aMFfosMUt5dvi+g44="; + rev = "e23ff6db487da9ceea576c53ac33853566c3a84e"; + hash = "sha256-HJ4br6lQwRrcnkLgV3aecr3T3zcPzA11MfxhRjwIb0I="; }; - version = "2022.09.27"; + version = "2022.11.07"; # Supported symbiflow plugins. # @@ -60,6 +61,7 @@ in lib.genAttrs plugins (plugin: stdenv.mkDerivation (rec { patches = lib.optional ( plugin == "ql-qlf" ) ./symbiflow-pmgen.patch; preBuild = '' + export LDFLAGS="-L${flatbuffers}/lib" mkdir -p ql-qlf-plugin/pmgen '' + lib.optionalString ( plugin == "ql-qlf" ) '' @@ -68,8 +70,8 @@ in lib.genAttrs plugins (plugin: stdenv.mkDerivation (rec { # Providing a symlink avoids the need for patching the test makefile postUnpack = '' - mkdir -p source/third_party/googletest/googletest/build/ - ln -s ${static_gtest}/lib source/third_party/googletest/googletest/build/lib + mkdir -p source/third_party/googletest/build/ + ln -s ${static_gtest}/lib source/third_party/googletest/build/lib ''; makeFlags = [ |