bscpkgs/bsc/paraver/default.nix
Rodrigo Arias Mallo e65c801a20 paraver: Downgrade wx to 2.8 and add wxpropgrid
Fixes a problem with i3 when opening a new timeline view, which caused a
rapid switch between paraver main window and the timeline.
2020-11-19 16:36:47 +01:00

68 lines
1.5 KiB
Nix

{
stdenv
, fetchFromGitHub
, boost
, libxml2
, xml2
, fetchurl
, wxGTK28
, autoconf
, automake
, wxpropgrid
}:
let
wx = wxGTK28;
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";
};
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 's|-lparaver-kernel -lparaver-api|-L../../paraver-kernel/src/.libs -L../../paraver-kernel/api/.libs -lparaver-kernel -lparaver-api|g' src/Makefile.am
sed -i 's|^wxparaver_bin_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
#sed -i '1524d' src/wxparaver/src/gtimeline.cpp
#sed -i '806d' src/wxparaver/src/gtimeline.cpp
#sed -i '142d' src/wxparaver/src/paravermain.cpp
'';
#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"
"--with-wxpropgrid-dir=${wxpropgrid}"
];
buildInputs = [
boost
xml2
libxml2.dev
wx
autoconf
automake
];
}