1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "systemc";
10 version = "3.0.1";
11
12 src = fetchFromGitHub {
13 owner = "accellera-official";
14 repo = "systemc";
15 rev = version;
16 sha256 = "sha256-ReYRKx7H9rxVhvY9gAdxrMu5nlsK2FcVIzfgvZroD/E=";
17 };
18
19 nativeBuildInputs = [ cmake ];
20
21 cmakeFlags = [
22 # Undefined reference to the sc_core::sc_api_version_2_3_4_XXX
23 # https://github.com/accellera-official/systemc/issues/21
24 "-DCMAKE_CXX_STANDARD=17"
25 ];
26
27 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
28
29 meta = with lib; {
30 description = "Language for System-level design, modeling and verification";
31 homepage = "https://systemc.org/";
32 license = licenses.asl20;
33 platforms = platforms.unix;
34 maintainers = with maintainers; [ amiloradovsky ];
35 };
36}