2020-11-18 14:00:19 +01:00
|
|
|
{
|
|
|
|
stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, boost
|
|
|
|
, libxml2
|
|
|
|
, xml2
|
|
|
|
, fetchurl
|
2020-11-19 16:36:47 +01:00
|
|
|
, wxGTK28
|
2020-11-18 14:00:19 +01:00
|
|
|
, autoconf
|
|
|
|
, automake
|
2020-11-19 16:36:47 +01:00
|
|
|
, wxpropgrid
|
2020-11-30 20:07:59 +01:00
|
|
|
# Custom patches :)
|
|
|
|
, enableMouseLabel ? false
|
2020-11-18 14:00:19 +01:00
|
|
|
}:
|
|
|
|
|
2020-11-30 20:07:59 +01:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2020-11-18 14:00:19 +01:00
|
|
|
let
|
2020-11-19 16:36:47 +01:00
|
|
|
wx = wxGTK28;
|
2020-11-18 14:00:19 +01:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
|
2020-11-30 20:07:59 +01:00
|
|
|
patches = []
|
|
|
|
++ optional (enableMouseLabel) ./mouse-label.patch;
|
|
|
|
|
2020-11-18 14:00:19 +01:00
|
|
|
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
|
|
|
|
|
2020-11-19 16:36:47 +01:00
|
|
|
#sed -i '1524d' src/wxparaver/src/gtimeline.cpp
|
|
|
|
#sed -i '806d' src/wxparaver/src/gtimeline.cpp
|
|
|
|
#sed -i '142d' src/wxparaver/src/paravermain.cpp
|
2020-11-18 14:00:19 +01:00
|
|
|
'';
|
|
|
|
#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"
|
2020-11-19 16:36:47 +01:00
|
|
|
"--with-wxpropgrid-dir=${wxpropgrid}"
|
2020-11-18 14:00:19 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
xml2
|
|
|
|
libxml2.dev
|
|
|
|
wx
|
|
|
|
autoconf
|
|
|
|
automake
|
|
|
|
];
|
|
|
|
|
|
|
|
}
|