diff --git a/pkgs/paraver/default.nix b/pkgs/paraver/default.nix index 9eaaca8..fc8127a 100644 --- a/pkgs/paraver/default.nix +++ b/pkgs/paraver/default.nix @@ -1,5 +1,6 @@ { stdenv +, fetchFromGitHub , autoreconfHook , boost , libxml2 @@ -11,6 +12,7 @@ , openssl , glibcLocales , wrapGAppsHook +, installShellFiles }: let @@ -18,14 +20,17 @@ let in stdenv.mkDerivation rec { pname = "wxparaver"; - version = "4.11.2"; + version = "4.12.0"; - src = builtins.fetchGit { - url = "https://github.com/bsc-performance-tools/wxparaver.git"; - rev = "129e6b4a4f061e5a319049db8db1620f5de3bd70"; # v4.11.2 (missing tag) - ref = "master"; + src = fetchFromGitHub { + owner = "bsc-performance-tools"; + repo = "wxparaver"; + rev = "v${version}"; + sha256 = "sha256-YsO5gsuEFQdki3lQudEqgo5WXOt/fPdvNw5OxZQ86Zo="; }; + patches = [ ./do-not-steal-focus-on-redraw.patch ]; + hardeningDisable = [ "all" ]; # Fix the PARAVER_HOME variable @@ -51,6 +56,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ wrapGAppsHook + installShellFiles ]; buildInputs = [ @@ -75,7 +81,6 @@ stdenv.mkDerivation rec { cp -p ${paraverKernel}/share/filters-config/* $out/share/filters-config # Move man files to proper location - mkdir -p $out/share/man - mv $out/share/doc/wxparaver_help_contents/man $out/share/man/man1 + installManPage $out/share/doc/wxparaver_help_contents/man/* ''; } diff --git a/pkgs/paraver/do-not-steal-focus-on-redraw.patch b/pkgs/paraver/do-not-steal-focus-on-redraw.patch new file mode 100644 index 0000000..3c66967 --- /dev/null +++ b/pkgs/paraver/do-not-steal-focus-on-redraw.patch @@ -0,0 +1,26 @@ +From 2b185e1b5ce52808b3026334851dbcd5a640ed4d Mon Sep 17 00:00:00 2001 +From: aleixbonerib +Date: Mon, 10 Jun 2024 20:59:45 +0200 +Subject: [PATCH] fix: do not set focus on redraw + +Some wm can change the window size without focusing. Right now, when the +plot is resized it takes back focus. +--- + src/gtimeline.cpp | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/gtimeline.cpp b/src/gtimeline.cpp +index 23ebef2..a896066 100644 +--- a/src/gtimeline.cpp ++++ b/src/gtimeline.cpp +@@ -899,7 +899,6 @@ void gTimeline::redraw() + + drawZone->Refresh(); + +- SetFocus(); + } + + +-- +2.44.1 + diff --git a/pkgs/paraver/dont-expand-colors.patch b/pkgs/paraver/dont-expand-colors.patch index ff45d78..a5e449b 100644 --- a/pkgs/paraver/dont-expand-colors.patch +++ b/pkgs/paraver/dont-expand-colors.patch @@ -11,7 +11,7 @@ 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 +@@ -295,8 +295,9 @@ rgb SemanticColor::getColor( PRV_UINT32 pos ) const { if( pos == 0 && ParaverConfig::getInstance()->getColorsTimelineUseZero() ) return ParaverConfig::getInstance()->getColorsTimelineColorZero(); @@ -22,26 +22,26 @@ index 9f86960..22859eb 100644 + return colors[ pos + 1 ]; } - void CodeColor::setColor( PRV_UINT32 whichPos, rgb whichColor ) -@@ -250,6 +251,12 @@ void CodeColor::setColor( PRV_UINT32 whichPos, rgb whichColor ) + void SemanticColor::setColor( PRV_UINT32 whichPos, rgb whichColor ) +@@ -314,6 +315,12 @@ void SemanticColor::setColor( PRV_UINT32 whichPos, rgb whichColor ) colors[ whichPos ] = whichColor; } -+void CodeColor::cutAfter( PRV_UINT32 pos ) ++void SemanticColor::cutAfter( PRV_UINT32 pos ) +{ + if ( pos < colors.size() ) + colors.erase( colors.begin() + pos, colors.end() ); +} + - void CodeColor::setCustomColor( TSemanticValue whichValue, rgb color ) + void SemanticColor::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 - +@@ -114,6 +114,7 @@ class SemanticColor + // Code Color methods PRV_UINT32 getNumColors() const; void setColor( PRV_UINT32 pos, rgb color ); + void cutAfter( PRV_UINT32 pos ); @@ -61,7 +61,7 @@ index b0d2050..ee2ab69 100644 for ( auto it : semanticColors ) { std::tie( tmpColor.red, tmpColor.green, tmpColor.blue ) = it.second; - myCodeColor.setColor( it.first, tmpColor ); + mySemanticColor.setColor( it.first, tmpColor ); + if (it.first > maxValue) + maxValue = it.first; } @@ -69,7 +69,7 @@ index b0d2050..ee2ab69 100644 + // Cut the palette after the highest defined value, so there are no + // extra expanded values + if ( !pcfParser.expandColors ) -+ myCodeColor.cutAfter(maxValue); ++ mySemanticColor.cutAfter(maxValue); + myEventLabels = EventLabels( pcfParser ); myStateLabels = StateLabels( pcfParser ); diff --git a/pkgs/paraver/fix-libxml2-deprecation.patch b/pkgs/paraver/fix-libxml2-deprecation.patch new file mode 100644 index 0000000..f7bb2aa --- /dev/null +++ b/pkgs/paraver/fix-libxml2-deprecation.patch @@ -0,0 +1,23 @@ +commit 60aa3ffa05f6b40db191a880e9e622d608744c1f +Author: Aleix Boné +Date: Sun Jul 21 12:11:30 2025 +0200 + + fix libxml2 deprecated macro + +diff --git a/configure.ac b/configure.ac +index 7fe1876..3ce1091 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -46,7 +46,10 @@ AC_PROG_CPP + AC_PROG_CXXCPP + AC_PROG_SED + +-AM_PATH_XML2 ++PKG_PROG_PKG_CONFIG ++PKG_CHECK_MODULES([XML], [libxml-2.0]) ++ ++AC_SUBST(XML_CPPFLAGS, $XML_CFLAGS) + + AX_BOOST_BASE(1.36) + AX_BOOST_SERIALIZATION + diff --git a/pkgs/paraver/kernel.nix b/pkgs/paraver/kernel.nix index eb3e60d..3dc8c27 100644 --- a/pkgs/paraver/kernel.nix +++ b/pkgs/paraver/kernel.nix @@ -1,5 +1,6 @@ { stdenv +, fetchFromGitHub , autoreconfHook , boost , libxml2 @@ -16,17 +17,19 @@ let in stdenv.mkDerivation rec { pname = "paraver-kernel"; - version = "${src.shortRev}"; + version = "4.12.0"; - src = builtins.fetchGit { - url = "https://github.com/bsc-performance-tools/paraver-kernel.git"; - rev = "2e167da3cee78ca11e31b74faefb23f12bac2b8c"; # master (missing tag) - ref = "master"; + src = fetchFromGitHub { + owner = "bsc-performance-tools"; + repo = "paraver-kernel"; + rev = "v${version}"; + sha256 = "sha256-Xs7g8ITZhPt00v7o2WlTddbou8C8Rc9kBMFpl2WsCS4="; }; patches = [ # https://github.com/bsc-performance-tools/paraver-kernel/pull/11 ./dont-expand-colors.patch + ./fix-libxml2-deprecation.patch ]; hardeningDisable = [ "all" ];