Merge pull request #295463 from NickCao/systemc-cmake

systemc: build with cmake, expand platforms to unix

authored by Nick Cao and committed by GitHub 4d47ff9e e4d41522

+25 -6
+10 -5
pkgs/applications/science/electronics/systemc/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, autoreconfHook }: 2 3 stdenv.mkDerivation rec { 4 pname = "systemc"; ··· 11 sha256 = "0sj8wlkp68cjhmkd9c9lvm3lk3sckczpz7w9vby64inc1f9fnf0b"; 12 }; 13 14 - enableParallelBuilding = true; 15 - nativeBuildInputs = [ autoreconfHook ]; 16 17 - configureFlags = [ "--with-unix-layout" ]; 18 19 meta = with lib; { 20 description = "The language for System-level design, modeling and verification"; 21 homepage = "https://systemc.org/"; 22 license = licenses.asl20; 23 - platforms = platforms.linux; 24 maintainers = with maintainers; [ victormignot amiloradovsky ]; 25 }; 26 }
··· 1 + { lib, stdenv, fetchFromGitHub, cmake }: 2 3 stdenv.mkDerivation rec { 4 pname = "systemc"; ··· 11 sha256 = "0sj8wlkp68cjhmkd9c9lvm3lk3sckczpz7w9vby64inc1f9fnf0b"; 12 }; 13 14 + nativeBuildInputs = [ cmake ]; 15 + 16 + cmakeFlags = [ 17 + # Undefined reference to the sc_core::sc_api_version_2_3_4_XXX 18 + # https://github.com/accellera-official/systemc/issues/21 19 + "-DCMAKE_CXX_STANDARD=17" 20 + ]; 21 22 + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 23 24 meta = with lib; { 25 description = "The language for System-level design, modeling and verification"; 26 homepage = "https://systemc.org/"; 27 license = licenses.asl20; 28 + platforms = platforms.unix; 29 maintainers = with maintainers; [ victormignot amiloradovsky ]; 30 }; 31 }
+15 -1
pkgs/applications/science/electronics/verilator/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, perl, flex, bison, python3, autoconf, 2 which, cmake, ccache, help2man, makeWrapper, glibcLocales, 3 systemc, git, numactl }: 4 ··· 13 hash = "sha256-Ya3lqK8BfvMVLZUrD2Et6OmptteWXp5VmZb2x2G/V/E="; 14 }; 15 16 enableParallelBuilding = true; 17 buildInputs = [ perl python3 systemc ]; # ccache 18 nativeBuildInputs = [ makeWrapper flex bison autoconf help2man git ]; ··· 36 wrapProgram "$x" --set LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive" 37 done 38 ''; 39 40 meta = with lib; { 41 description = "Fast and robust (System)Verilog simulator/compiler and linter";
··· 1 + { lib, stdenv, fetchFromGitHub, fetchpatch, perl, flex, bison, python3, autoconf, 2 which, cmake, ccache, help2man, makeWrapper, glibcLocales, 3 systemc, git, numactl }: 4 ··· 13 hash = "sha256-Ya3lqK8BfvMVLZUrD2Et6OmptteWXp5VmZb2x2G/V/E="; 14 }; 15 16 + patches = [ 17 + (fetchpatch { 18 + # Fix try-lock spuriously fail in V3ThreadPool destructor 19 + # https://github.com/verilator/verilator/pull/4938 20 + url = "https://github.com/verilator/verilator/commit/4b9cce4369c78423779238e585ed693c456d464e.patch"; 21 + hash = "sha256-sGrk/pxqZqUcmJdzQoPlzXMmYqHCOmd9Y2n6ieVNg1U="; 22 + }) 23 + ]; 24 + 25 enableParallelBuilding = true; 26 buildInputs = [ perl python3 systemc ]; # ccache 27 nativeBuildInputs = [ makeWrapper flex bison autoconf help2man git ]; ··· 45 wrapProgram "$x" --set LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive" 46 done 47 ''; 48 + 49 + env = { 50 + SYSTEMC_INCLUDE = "${lib.getDev systemc}/include"; 51 + SYSTEMC_LIBDIR = "${lib.getLib systemc}/lib"; 52 + }; 53 54 meta = with lib; { 55 description = "Fast and robust (System)Verilog simulator/compiler and linter";