Compare commits

..

1 Commits

Author SHA1 Message Date
afdda0fb29 Clean up paraver derivations 2025-10-28 17:02:25 +01:00
5 changed files with 37 additions and 92 deletions

View File

@@ -9,9 +9,6 @@ let
bscPkgs = { bscPkgs = {
agenix = prev.callPackage ./pkgs/agenix/default.nix { }; agenix = prev.callPackage ./pkgs/agenix/default.nix { };
amd-uprof = prev.callPackage ./pkgs/amd-uprof/default.nix { }; amd-uprof = prev.callPackage ./pkgs/amd-uprof/default.nix { };
aoccUnwrapped = callPackage ./pkgs/aocc/unwrapped.nix { };
aocc = callPackage ./pkgs/aocc/default.nix { };
stdenvAocc = final.overrideCC final.stdenv final.aocc;
bench6 = callPackage ./pkgs/bench6/default.nix { }; bench6 = callPackage ./pkgs/bench6/default.nix { };
bigotes = callPackage ./pkgs/bigotes/default.nix { }; bigotes = callPackage ./pkgs/bigotes/default.nix { };
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { }; clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };

View File

@@ -1,16 +0,0 @@
{ wrapCCWith
, aoccUnwrapped
}:
let
cc = aoccUnwrapped;
in wrapCCWith {
inherit cc;
extraBuildCommands = ''
echo "-isystem ${cc}/include" >> $out/nix-support/cc-cflags
wrap aocc $wrapper $ccPath/clang
wrap aocc++ $wrapper $ccPath/clang++
'';
}

View File

@@ -1,51 +0,0 @@
{ lib
, fetchurl
, stdenv
, autoPatchelfHook
, rocmPackages
, zlib
, libffi
, elfutils
}:
let
# in newer nixpkgs the runtime is hsakmt
rocmRuntime =
if rocmPackages ? hsakmt then
rocmPackages.hsakmt
else
rocmPackages.rocm-runtime;
in
stdenv.mkDerivation {
pname = "aocc-compiler";
version = "5.0.0";
src = fetchurl {
url = "https://download.amd.com/developer/eula/aocc/aocc-5-0/aocc-compiler-5.0.0.tar";
sha256 = "sha256-lm+sLSx1np3m6WnBCtp6ezBsET9/HgfqN2gp7IY4Dao=";
};
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
elfutils
zlib
rocmRuntime
stdenv.cc.cc.lib
];
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
dontStrip = true;
installPhase = ''
mkdir -p $out
cp -a . $out/
ln -s ${lib.getLib libffi}/lib/libffi.so $out/lib/libffi.so.6
'';
passthru = {
inherit rocmRuntime;
isClang = true; # Needed for wrapCCWith
};
meta.mainProgram = "clang";
}

View File

@@ -1,5 +1,4 @@
{ { stdenv
stdenv
, lib , lib
, fetchFromGitHub , fetchFromGitHub
, autoreconfHook , autoreconfHook
@@ -13,14 +12,17 @@
, openssl , openssl
, glibcLocales , glibcLocales
, wrapGAppsHook , wrapGAppsHook
, enableDebug ? false
}: }:
let let
wx = wxGTK32; wx = wxGTK32;
in
stdenv.mkDerivation rec {
pname = "wxparaver";
version = "4.12.0"; version = "4.12.0";
in
stdenv.mkDerivation {
pname = "wxparaver";
inherit version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "bsc-performance-tools"; owner = "bsc-performance-tools";
@@ -37,21 +39,26 @@ stdenv.mkDerivation rec {
./fix-boost-87.patch ./fix-boost-87.patch
]; ];
hardeningDisable = [ "all" ];
# Fix the PARAVER_HOME variable # Fix the PARAVER_HOME variable
postPatch = '' postPatch = ''
sed -i 's@^PARAVER_HOME=.*$@PARAVER_HOME='$out'@g' docs/wxparaver sed -i 's@^PARAVER_HOME=.*$@PARAVER_HOME='$out'@g' docs/wxparaver
sed -i '1aexport LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"' docs/wxparaver sed -i '1aexport LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"' docs/wxparaver
''; '';
dontStrip = true;
enableParallelBuilding = true; enableParallelBuilding = true;
preConfigure = '' hardeningDisable = [ "all" ];
export CFLAGS="-O3"
export CXXFLAGS="-O3" dontStrip = true;
'';
env =
let
flags = if enableDebug then "-ggdb -Og" else "-O3";
in
{
CFLAGS = flags;
CXXFLAGS = flags;
};
configureFlags = [ configureFlags = [
"--with-boost=${boost}" "--with-boost=${boost}"
@@ -69,11 +76,11 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
boost boost
libxml2.dev libxml2
xml2 xml2
wx wx
paraverKernel paraverKernel
openssl.dev openssl
]; ];
postInstall = '' postInstall = ''

View File

@@ -1,5 +1,4 @@
{ { stdenv
stdenv
, lib , lib
, fetchFromGitHub , fetchFromGitHub
, autoreconfHook , autoreconfHook
@@ -10,11 +9,16 @@
, automake , automake
, pkg-config , pkg-config
, zlib , zlib
, enableDebug ? false
}: }:
stdenv.mkDerivation rec { let
pname = "paraver-kernel";
version = "4.12.0"; version = "4.12.0";
in
stdenv.mkDerivation {
pname = "paraver-kernel";
inherit version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "bsc-performance-tools"; owner = "bsc-performance-tools";
@@ -35,10 +39,14 @@ stdenv.mkDerivation rec {
dontStrip = true; dontStrip = true;
preConfigure = '' env =
export CFLAGS="-O3 -DPARALLEL_ENABLED" let
export CXXFLAGS="-O3 -DPARALLEL_ENABLED" flags = "-DPARALLEL_ENABLED " + (if enableDebug then "-ggdb -Og" else "-O3");
''; in
{
CFLAGS = flags;
CXXFLAGS = flags;
};
configureFlags = [ configureFlags = [
"--with-boost=${boost}" "--with-boost=${boost}"