Move packages from bsc/ to pkgs/

This commit is contained in:
2023-10-02 10:45:10 +02:00
parent 8fe7458969
commit 916e4f49a6
82 changed files with 27 additions and 27 deletions

73
pkgs/paraver/default.nix Normal file
View File

@@ -0,0 +1,73 @@
{
stdenv
, autoreconfHook
, boost
, libxml2
, xml2
, wxGTK32
, autoconf
, automake
, paraverKernel
, openssl
, glibcLocales
}:
let
wx = wxGTK32;
in
stdenv.mkDerivation rec {
pname = "wxparaver";
version = "4.10.6";
src = builtins.fetchGit {
url = "https://github.com/bsc-performance-tools/wxparaver.git";
rev = "fe55c724ab59a5b0e60718919297bdf95582badb"; # v4.10.6 (missing tag)
ref = "master";
};
hardeningDisable = [ "all" ];
# Fix the PARAVER_HOME variable
postPatch = ''
sed -i 's@^PARAVER_HOME=.*$@PARAVER_HOME='$out'@g' docs/wxparaver
sed -i '1aexport LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"' docs/wxparaver
'';
dontStrip = true;
enableParallelBuilding = true;
preConfigure = ''
export CFLAGS="-O3"
export CXXFLAGS="-O3"
'';
configureFlags = [
"--with-boost=${boost}"
"--with-wx-config=${wx}/bin/wx-config"
"--with-paraver=${paraverKernel}"
"--with-openssl=${openssl.dev}"
];
buildInputs = [
autoreconfHook
boost
libxml2.dev
xml2
wx
autoconf
automake
paraverKernel
openssl.dev
paraverKernel
];
postInstall = ''
mkdir -p $out/include
mkdir -p $out/lib/paraver-kernel
mkdir -p $out/share/filters-config
cp -p ${paraverKernel}/bin/* $out/bin
# cp -p ${paraverKernel}/include/* $out/include
cp -a ${paraverKernel}/lib/paraver-kernel $out/lib/paraver-kernel
cp -p ${paraverKernel}/share/filters-config/* $out/share/filters-config
'';
}

View File

@@ -0,0 +1,120 @@
commit c2fa29f7f1bbde86f41417b198610253fff93667
Author: Rodrigo Arias <rodarima@gmail.com>
Date: Thu Mar 2 13:14:56 2023 +0100
Add the PCF option DONT_EXPAND_COLORS
Allows the user to specify the complete palette in the PCF, preventing
Paraver from expanding the colors.
diff --git a/api/semanticcolor.cpp b/api/semanticcolor.cpp
index 9f86960..22859eb 100644
--- a/api/semanticcolor.cpp
+++ b/api/semanticcolor.cpp
@@ -232,8 +232,9 @@ rgb CodeColor::getColor( PRV_UINT32 pos ) const
{
if( pos == 0 && ParaverConfig::getInstance()->getColorsTimelineUseZero() )
return ParaverConfig::getInstance()->getColorsTimelineColorZero();
- pos = pos % colors.size();
- return colors[ pos ];
+ // Skip the black at 0
+ pos = pos % (colors.size() - 1);
+ return colors[ pos + 1 ];
}
void CodeColor::setColor( PRV_UINT32 whichPos, rgb whichColor )
@@ -250,6 +251,12 @@ void CodeColor::setColor( PRV_UINT32 whichPos, rgb whichColor )
colors[ whichPos ] = whichColor;
}
+void CodeColor::cutAfter( PRV_UINT32 pos )
+{
+ if ( pos < colors.size() )
+ colors.erase( colors.begin() + pos, colors.end() );
+}
+
void CodeColor::setCustomColor( TSemanticValue whichValue, rgb color )
{
customPalette[ whichValue ] = color;
diff --git a/api/semanticcolor.h b/api/semanticcolor.h
index a079556..bddf3d8 100644
--- a/api/semanticcolor.h
+++ b/api/semanticcolor.h
@@ -98,6 +98,7 @@ class CodeColor: public SemanticColor
PRV_UINT32 getNumColors() const;
void setColor( PRV_UINT32 pos, rgb color );
+ void cutAfter( PRV_UINT32 pos );
void setCustomColor( TSemanticValue whichValue, rgb color );
bool existCustomColors() const;
const std::map<TSemanticValue, rgb>& getCustomPalette() const;
diff --git a/api/trace.cpp b/api/trace.cpp
index b0d2050..ee2ab69 100644
--- a/api/trace.cpp
+++ b/api/trace.cpp
@@ -461,12 +461,21 @@ void TraceProxy::parsePCF( const string& whichFile )
rgb tmpColor;
const std::map< uint32_t, PCFFileParser<>::rgb >& semanticColors = pcfParser.getSemanticColors();
+ uint32_t maxValue = 0;
+
for ( auto it : semanticColors )
{
std::tie( tmpColor.red, tmpColor.green, tmpColor.blue ) = it.second;
myCodeColor.setColor( it.first, tmpColor );
+ if (it.first > maxValue)
+ maxValue = it.first;
}
+ // Cut the palette after the highest defined value, so there are no
+ // extra expanded values
+ if ( !pcfParser.expandColors )
+ myCodeColor.cutAfter(maxValue);
+
myEventLabels = EventLabels( pcfParser );
myStateLabels = StateLabels( pcfParser );
diff --git a/utils/traceparser/pcffileparser.cpp b/utils/traceparser/pcffileparser.cpp
index 9245955..3a1aecb 100644
--- a/utils/traceparser/pcffileparser.cpp
+++ b/utils/traceparser/pcffileparser.cpp
@@ -286,6 +286,7 @@ constexpr char PCF_LABEL_SPEED[] = "SPEED";
constexpr char PCF_LABEL_FLAG_ICONS[] = "FLAG_ICONS";
constexpr char PCF_LABEL_NUM_OF_STATE_COLORS[] = "NUM_OF_STATE_COLORS";
constexpr char PCF_LABEL_YMAX_SCALE[] = "YMAX_SCALE";
+constexpr char PCF_LABEL_DONT_EXPAND_COLORS[] = "DONT_EXPAND_COLORS";
template< typename dummyParser = std::nullptr_t >
class DefaultOptionsParser : public PCFFileParser<>::SectionParser<>
@@ -293,12 +294,13 @@ class DefaultOptionsParser : public PCFFileParser<>::SectionParser<>
public:
DefaultOptionsParser( PCFFileParser<> *whichMainParser ) : PCFFileParser<>::SectionParser<>( whichMainParser )
{
- parameterSetter[ PCF_LABEL_LEVEL ] = [this]( std::string line ) { mainParser->level = line; };
- parameterSetter[ PCF_LABEL_UNITS ] = [this]( std::string line ) { mainParser->units = line; };
- parameterSetter[ PCF_LABEL_LOOK_BACK ] = [this]( std::string line ) { mainParser->lookBack = line; };
- parameterSetter[ PCF_LABEL_SPEED ] = [this]( std::string line ) { mainParser->speed = line; };
- parameterSetter[ PCF_LABEL_FLAG_ICONS ] = [this]( std::string line ) { mainParser->flagIcons = line; };
- parameterSetter[ PCF_LABEL_YMAX_SCALE ] = [this]( std::string line ) { mainParser->ymaxScale = line; };
+ parameterSetter[ PCF_LABEL_LEVEL ] = [this]( std::string line ) { mainParser->level = line; };
+ parameterSetter[ PCF_LABEL_UNITS ] = [this]( std::string line ) { mainParser->units = line; };
+ parameterSetter[ PCF_LABEL_LOOK_BACK ] = [this]( std::string line ) { mainParser->lookBack = line; };
+ parameterSetter[ PCF_LABEL_SPEED ] = [this]( std::string line ) { mainParser->speed = line; };
+ parameterSetter[ PCF_LABEL_FLAG_ICONS ] = [this]( std::string line ) { mainParser->flagIcons = line; };
+ parameterSetter[ PCF_LABEL_YMAX_SCALE ] = [this]( std::string line ) { mainParser->ymaxScale = line; };
+ parameterSetter[ PCF_LABEL_DONT_EXPAND_COLORS ] = [this]( std::string line ) { mainParser->expandColors = false; };
}
virtual ~DefaultOptionsParser() = default;
diff --git a/utils/traceparser/pcffileparser.h b/utils/traceparser/pcffileparser.h
index 5fe2634..c12ecc8 100644
--- a/utils/traceparser/pcffileparser.h
+++ b/utils/traceparser/pcffileparser.h
@@ -100,6 +100,7 @@ class PCFFileParser
void setEventLabel( TEventType eventType, const std::string& label );
void setEventValues( TEventType eventType, const std::map< TEventValue, std::string >& values );
void setEventValueLabel( TEventType eventType, TEventValue eventValue, const std::string& label );
+ bool expandColors = true;
private:
struct EventTypeData

View File

@@ -0,0 +1,49 @@
{
stdenv
, autoreconfHook
, boost
, libxml2
, xml2
, wxpropgrid
, wxGTK28
, autoconf
, automake
}:
let
wx = wxGTK28;
in
stdenv.mkDerivation rec {
pname = "paraverKernelFast";
version = "${src.shortRev}";
src = builtins.fetchGit {
url = "git@bscpm03.bsc.es:rpenacob/paraver-kernel.git";
rev = "76f508095c35528ad89078473dc70b9600e507ff";
ref = "fast";
};
hardeningDisable = [ "all" ];
enableParallelBuilding = true;
dontStrip = true;
preConfigure = ''
export CFLAGS="-O3 -DPARALLEL_ENABLED"
export CXXFLAGS="-std=c++17 -O3 -DPARALLEL_ENABLED"
'';
configureFlags = [
"--with-boost=${boost}"
"--enable-openmp"
];
buildInputs = [
autoreconfHook
boost
libxml2.dev
xml2
autoconf
automake
];
}

55
pkgs/paraver/kernel.nix Normal file
View File

@@ -0,0 +1,55 @@
{
stdenv
, autoreconfHook
, boost
, libxml2
, xml2
, wxGTK30
, autoconf
, automake
, pkg-config
}:
let
wx = wxGTK30;
in
stdenv.mkDerivation rec {
pname = "paraver-kernel";
version = "${src.shortRev}";
src = builtins.fetchGit {
url = "https://github.com/bsc-performance-tools/paraver-kernel.git";
rev = "3f89ec68da8e53ee227c57a2024bf789fa68ba98"; # master (missing tag)
ref = "master";
};
patches = [
# https://github.com/bsc-performance-tools/paraver-kernel/pull/11
./dont-expand-colors.patch
];
hardeningDisable = [ "all" ];
enableParallelBuilding = true;
dontStrip = true;
preConfigure = ''
export CFLAGS="-O3 -DPARALLEL_ENABLED"
export CXXFLAGS="-O3 -DPARALLEL_ENABLED"
'';
configureFlags = [
"--with-boost=${boost}"
"--enable-openmp"
];
buildInputs = [
autoreconfHook
boost
libxml2.dev
xml2
autoconf
automake
pkg-config
];
}

View File

@@ -0,0 +1,286 @@
--- a/src/wxparaver/src/gtimeline.cpp 2019-09-13 13:18:03.000000000 +0200
+++ b/src/wxparaver/src/gtimeline.cpp 2020-11-30 13:18:50.121429888 +0100
@@ -607,8 +607,8 @@
// Paint blank image while redrawing
wxClientDC dc( drawZone );
#ifdef __WXGTK__
- dc.DrawBitmap( bufferImage, 0, 0, false );
- drawZone->Update();
+// dc.DrawBitmap( bufferImage, 0, 0, false );
+// drawZone->Update();
#endif
if( !drawAxis( bufferDraw, selectedSet ) )
@@ -1365,13 +1365,66 @@
void gTimeline::drawRowEvents( wxDC& eventdc, wxDC& eventmaskdc, TObjectOrder rowPos, hash_set< PRV_INT32 >& eventsToDraw )
{
+ int last_x = -100, x, xx;
+ int i, neigh, max_x;
+
+ /* Keep track of other events in nearby pixels */
+ max_x = myWindow->getWidth();
+ int *table = new int[max_x];
+
+ for(i=0; i<max_x; i++)
+ {
+ table[i] = 0;
+ }
+
for( hash_set< PRV_INT32 >::iterator it = eventsToDraw.begin(); it != eventsToDraw.end(); ++it )
{
+ /* Add a new event in the x position in the table */
+ x = *it;
+ assert(0 <= x);
+ assert(x < max_x);
+ table[*it]++;
+ }
+
+ for( hash_set< PRV_INT32 >::iterator it = eventsToDraw.begin(); it != eventsToDraw.end(); ++it )
+ {
+ /*
+ * Draws an event with 4 segments: AE, BF, CG and DH
+ *
+ * A B C D
+ * * * * *
+ * * * * *
+ * * * * *
+ * * F G H
+ * *
+ * *
+ * E
+ */
+
+ /* If the event is very close to another one, we paint it red, so we
+ * now that we may need to zoom to see more closely how many events
+ * are there. Otherwise we paint it green. */
+ x = *it;
+
+ /* Count neighbour events */
+ neigh = 0;
+ for(xx=x-5; xx<=x+5; xx++)
+ {
+ if(0 <= xx && xx < max_x)
+ neigh += table[xx];
+ }
+
+ /* Paint the event red if there are more events close */
+ if(neigh > 1)
+ eventdc.SetPen( *wxRED_PEN );
+ else
+ eventdc.SetPen( *wxGREEN_PEN );
+
eventdc.DrawLine( *it, rowPos - 6, *it, rowPos );
- eventdc.DrawLine( *it+1, rowPos - 6, *it+1, rowPos-3 );
- eventdc.DrawLine( *it+2, rowPos - 6, *it+2, rowPos-3 );
- eventdc.DrawLine( *it+3, rowPos - 6, *it+3, rowPos-3 );
- eventdc.DrawLine( *it+4, rowPos - 6, *it+4, rowPos-3 );
+// eventdc.DrawLine( *it+1, rowPos - 6, *it+1, rowPos-3 );
+// eventdc.DrawLine( *it+2, rowPos - 6, *it+2, rowPos-3 );
+// eventdc.DrawLine( *it+3, rowPos - 6, *it+3, rowPos-3 );
+// eventdc.DrawLine( *it+4, rowPos - 6, *it+4, rowPos-3 );
#ifndef __WXMAC__
eventmaskdc.DrawLine( *it, rowPos - 6, *it, rowPos );
eventmaskdc.DrawLine( *it+1, rowPos - 6, *it+1, rowPos-3 );
@@ -1379,8 +1432,12 @@
eventmaskdc.DrawLine( *it+3, rowPos - 6, *it+3, rowPos-3 );
eventmaskdc.DrawLine( *it+4, rowPos - 6, *it+4, rowPos-3 );
#endif
+
+ last_x = x;
}
+ delete table;
+
}
@@ -2427,7 +2484,7 @@
motionEvent = event;
if( !event.ShiftDown() )
- timerMotion->Start( 20, true );
+ timerMotion->Start( 2, true );
wxMemoryDC dc( bufferImage );
// PRV_UINT32 precision = ParaverConfig::getInstance()->getTimelinePrecision();
@@ -4651,12 +4708,18 @@
void gTimeline::OnTimerMotion( wxTimerEvent& event )
{
+ int mx, my;
+
+ mx = motionEvent.GetX();
+ my = motionEvent.GetY();
+
if( motionEvent.GetX() < objectAxisPos + 1 || motionEvent.GetX() > bufferImage.GetWidth() - drawBorder ||
motionEvent.GetY() < drawBorder || motionEvent.GetY() > timeAxisPos - 1 )
return;
wxMemoryDC dc( bufferImage );
wxColour tmpColor;
+ wxClientDC paintDC( drawZone );
wxString label;
if( zooming || timing || wxGetApp().GetGlobalTiming() )
@@ -4704,7 +4767,11 @@
#endif
if( tmpColor == backgroundColour )
+ {
+ /* Just clean and exit */
+ paintDC.DrawBitmap( drawImage, 0, 0 );
return;
+ }
rgb color = { (ParaverColor)tmpColor.Red(), (ParaverColor)tmpColor.Green(), (ParaverColor)tmpColor.Blue() };
TSemanticValue firstValue, secondValue;
@@ -4762,38 +4829,109 @@
}
}
-#ifndef __WXGTK__
- wxClientDC paintDC( drawZone );
- #ifdef __WXMAC__
- drawStackedImages( paintDC );
- #else
- paintDC.DrawBitmap( drawImage, 0, 0 );
- #endif
-#else
- #if wxMAJOR_VERSION<3
- wxPaintDC paintDC( drawZone );
- #else
- wxClientDC paintDC( drawZone );
- #endif
- paintDC.DrawBitmap( drawImage, 0, 0 );
-#endif
-
paintDC.SetFont( semanticFont );
+ paintDC.SetPen( backgroundColour );
+ paintDC.SetBrush( backgroundColour );
+ paintDC.SetTextForeground( foregroundColour );
+
+ /* Draw the label close to the mouse, so it's easier to follow */
+ int label_x0, label_y0;
+ label_x0 = mx + 20;
+ label_y0 = my + 20;
+ paintDC.SetPen( *wxBLACK_PEN );
+ paintDC.SetBrush( *wxBLACK_BRUSH );
+
+ /* Draw a filled black rectangle behind the label, so is easy to read
+ * when placed over multiple colors from the trace */
+ int rect_x0, rect_y0, rect_w, rect_h;
+ rect_x0 = label_x0 - 5;
+ rect_y0 = label_y0 - 5;
+
+ TObjectOrder row;
+ TTime time;
+
+ /* Fills "row" and "time" objects if is over a TimeObject (?) */
+ bool print_duration = true;
+ double tp, tn;
+
+ /* This whole thing to get the event is completely crap. We may get a
+ * pixel here that belong to a different event, probably due to
+ * rounding operations when dealing with time.
+ *
+ * To avoid giving misleading information, we only print the time when
+ * both neighbour pixels are also from the same event */
+ print_duration &= pixelToTimeObject(mx, my, time, row);
+ print_duration &= pixelToTimeObject(mx-2, my, tp, row);
+ print_duration &= pixelToTimeObject(mx+2, my, tn, row);
+
+ if(time <= tp) print_duration = false;
+ if(tn <= time) print_duration = false;
+
+ //computeWhatWhere(time, row, 0.0, false, false);
+
+ //printf("time = %e\n", time);
+ //printf("begin time = %e\n", myWindow->getBeginTime(row));
+
+ if(print_duration)
+ {
+ double t0, t1, t, dt;
+ t = time;
+
+ myWindow->init(t, CREATEEVENTS + CREATECOMMS, false );
+ myWindow->initRow(row, t, CREATEEVENTS + CREATECOMMS, false );
+
+ t0 = myWindow->getBeginTime(row);
+ t1 = myWindow->getEndTime(row);
+
+ //printf("t0=%e t=%e t1=%e\n", t0, t, t1);
+ while(!(t0 <= t && t <= t1))
+ {
+ myWindow->calcNext(row);
+ t0 = myWindow->getBeginTime(row);
+ t1 = myWindow->getEndTime(row);
+ //printf("t0=%e t=%e t1=%e\n", t0, t, t1);
+ if(t0 > t)
+ {
+ //printf("we are out\n");
+ break;
+ }
+ }
+
+ /* Only add the duration if we are more than one pixel away from the
+ * border */
+ if(t0 < tp && tn < t1)
+ {
+ if(t0 > t)
+ dt = 0;
+ else
+ dt = t1 - t0;
+
+ assert(t0 <= time);
+ assert(time <= t1);
+
+ wxString duration = wxString::FromAscii( LabelConstructor::timeLabel(
+ myWindow->traceUnitsToWindowUnits( dt ),
+ myWindow->getTimeUnit(),
+ ParaverConfig::getInstance()->getTimelinePrecision() ).c_str() );
+
+ label << wxT( " (" ) << duration << wxT(")");
+ }
+ }
+
wxSize objectExt = paintDC.GetTextExtent( label );
+ rect_w = objectExt.GetWidth() + 10;
+ rect_h = objectExt.GetHeight() + 10;
+
+ /* Erase previous bitmap */
+ paintDC.DrawBitmap( drawImage, 0, 0 );
+
+ /* Draw black rectangle */
+ paintDC.DrawRectangle( rect_x0, rect_y0, rect_w, rect_h );
+ /* Then place the label */
+ paintDC.DrawText( label, label_x0, label_y0);
paintDC.SetPen( backgroundColour );
paintDC.SetBrush( backgroundColour );
-// paintDC.DrawRectangle( ( bufferImage.GetWidth() - objectAxisPos ) / 2, timeAxisPos + 1, objectExt.GetWidth() + 30, bufferImage.GetHeight() - timeAxisPos );
- if( !( zooming || timing || wxGetApp().GetGlobalTiming() ) )
- {
- paintDC.SetBrush( tmpColor );
- paintDC.DrawRectangle( ( bufferImage.GetWidth() - objectAxisPos ) / 2, timeAxisPos + 2, 10, bufferImage.GetHeight() - timeAxisPos - 3 );
- }
- paintDC.SetTextForeground( foregroundColour );
- if( zooming )
- paintDC.DrawText( label, ( bufferImage.GetWidth() - objectAxisPos ) / 2 + objectAxisPos - ( objectExt.GetWidth() / 2 ), timeAxisPos + 3 );
- else
- paintDC.DrawText( label, ( bufferImage.GetWidth() - objectAxisPos ) / 2 + 12, timeAxisPos + 3 );
}
void gTimeline::OnTimerWheel( wxTimerEvent& event )
@@ -5075,7 +5213,11 @@
endRow = TObjectOrder( floor( ( y - drawBorder - 1 ) / heightPerRow ) );
if( endRow >= numObjects )
+ {
endRow = numObjects - 1;
+ printf("endRow exceeds numObjects, capped to %d\n", endRow);
+ }
+ //printf("endRow = %d\n", endRow);
onObject = selected[ endRow ];
return true;

74
pkgs/paraver/release.nix Normal file
View File

@@ -0,0 +1,74 @@
{
stdenv
, lib
, fetchFromGitHub
, boost
, libxml2
, xml2
, fetchurl
, wxGTK32
, autoconf
, automake
, openssl # For boost
# Custom patches :)
, enableMouseLabel ? false
}:
with lib;
let
wx = wxGTK32;
in
stdenv.mkDerivation rec {
pname = "wxparaver";
version = "4.10.6";
src = fetchurl {
url = "https://ftp.tools.bsc.es/wxparaver/wxparaver-${version}-src.tar.bz2";
sha256 = "a7L15viCXtQS9vAsdFzCFlUavUzl4Y0yOYmVSCrdWBU=";
};
patches = []
++ optional (enableMouseLabel) ./mouse-label.patch;
enableParallelBuilding = true;
# What would we do without the great gamezelda:
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=wxparaver
postPatch = ''
pushd src/wxparaver
sed -i \
-e 's|-lparaver-api -lparaver-kernel|-L../../paraver-kernel/src/.libs -L../../paraver-kernel/api/.libs -lparaver-api -lparaver-kernel -lssl -lcrypto -ldl|g' \
-e '$awxparaver_bin_CXXFLAGS = @CXXFLAGS@ -I../../paraver-kernel -I../../paraver-kernel/api' \
src/Makefile.am
sed -i 's| -L$PARAVER_LIBDIR||g' configure.ac
popd
# Patch shebang as /usr/bin/env is missing in nix
sed -i '1c#!/bin/sh' src/paraver-cfgs/install.sh
'';
#TODO: Move the sed commands to proper patches (and maybe send them upstream?)
preConfigure = ''
pushd src/wxparaver
autoreconf -i -f
popd
'';
configureFlags = [
"--with-boost=${boost}"
"--with-wx-config=${wx}/bin/wx-config"
];
buildInputs = [
boost
xml2
libxml2.dev
wx
autoconf
automake
openssl.dev
];
}

View File

@@ -0,0 +1,75 @@
{
stdenv
, autoreconfHook
, boost
, libxml2
, xml2
, wxpropgrid
, wxGTK28
, autoconf
, automake
, paraverKernelFast
, openssl
}:
let
wx = wxGTK28;
in
stdenv.mkDerivation rec {
pname = "paraverFast";
version = "${src.shortRev}";
src = builtins.fetchGit {
url = "https://github.com/bsc-performance-tools/wxparaver.git";
rev = "9fc61decb6d8d9b1cacb50639c3b2c85788b2292";
ref = "master";
};
hardeningDisable = [ "all" ];
patches = [ ./wxparaver-fast.patch ];
# Fix the PARAVER_HOME variable
postPatch = ''
sed -i 's@^PARAVER_HOME=.*$@PARAVER_HOME='$out'@g' docs/wxparaver
'';
dontStrip = true;
enableParallelBuilding = true;
preConfigure = ''
export CFLAGS="-O3"
export CXXFLAGS="-std=c++17 -O3"
'';
configureFlags = [
"--with-boost=${boost}"
"--with-wx-config=${wx}/bin/wx-config"
"--with-wxpropgrid-dir=${wxpropgrid}"
"--with-paraver=${paraverKernelFast}"
"--with-openssl=${openssl.dev}"
];
buildInputs = [
autoreconfHook
boost
libxml2.dev
xml2
wxpropgrid
wx
autoconf
automake
paraverKernelFast
openssl.dev
];
postInstall = ''
mkdir -p $out/include
mkdir -p $out/lib/paraver-kernel
mkdir -p $out/share/filters-config
cp -p ${paraverKernelFast}/bin/* $out/bin
# cp -p ${paraverKernelFast}/include/* $out/include
cp -a ${paraverKernelFast}/lib/paraver-kernel $out/lib/paraver-kernel
cp -p ${paraverKernelFast}/share/filters-config/* $out/share/filters-config
'';
}

View File

@@ -0,0 +1,13 @@
--- a/docs/wxparaver 1970-01-01 01:00:01.000000000 +0100
+++ b/docs/wxparaver 2021-11-02 12:08:54.670700017 +0100
@@ -31,5 +31,10 @@
@inst_LOGIN_NODE_DETECTION@
+echo "WARNING: Using paraver fast, the trace must be ordered!" >&2
+export PARAVER_FAST=1
+
+export LANG=C
+
LD_LIBRARY_PATH="@inst_BOOST_LIBDIR@${PARAVER_HOME}/${LIB_DIR}/paraver-kernel:@inst_WXWIDGETS_LIBDIR@@inst_WXPROPGRID_LIB_PATH@@inst_LIBSSL_LIBDIR@${PARAVER_HOME}/${LIB_DIR}/wxparaver:$LD_LIBRARY_PATH" "${PARAVER_HOME}/bin/wxparaver.bin" "$@"

View File

@@ -0,0 +1,47 @@
{
stdenv
, fetchFromGitHub
, boost
, libxml2
, xml2
, fetchurl
, wxGTK30-gtk3
, paraver-kernel
}:
let
wx = wxGTK30-gtk3;
in
stdenv.mkDerivation rec {
pname = "wxparaver";
version = "4.8.2";
src = fetchurl {
url = "https://ftp.tools.bsc.es/wxparaver/wxparaver-${version}-src.tar.bz2";
sha256 = "0b8rrhnf7h8j72pj6nrxkrbskgg9b5w60nxi47nxg6275qvfq8hd";
};
postUnpack = "sourceRoot=$sourceRoot/src/wxparaver";
enableParallelBuilding = true;
preConfigure = ''
configureFlagsArray=(
"--with-boost=${boost}"
"--with-wx-config=${wx}/bin/wx-config"
--with-wxpropgrid-dir=
"--with-paraver=${paraver-kernel}"
"--enable-debug=yes"
"CXXFLAGS=-g"
"CFLAGS=-g"
)
'';
buildInputs = [
boost
xml2
libxml2.dev
wx
paraver-kernel
];
}