bscpkgs/bsc/paraver/default.nix

75 lines
1.5 KiB
Nix
Raw Normal View History

{
stdenv
2022-09-01 16:27:29 +02:00
, lib
, fetchFromGitHub
, boost
, libxml2
, xml2
, fetchurl
, wxGTK32
, autoconf
, automake
, openssl # For boost
2020-11-30 20:07:59 +01:00
# Custom patches :)
, enableMouseLabel ? false
}:
2022-09-01 16:27:29 +02:00
with lib;
2020-11-30 20:07:59 +01:00
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=";
};
2020-11-30 20:07:59 +01:00
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
];
}