forked from rarias/bscpkgs
Compare commits
1 Commits
fix/parave
...
5e2d01b71a
| Author | SHA1 | Date | |
|---|---|---|---|
|
5e2d01b71a
|
18
flake.nix
18
flake.nix
@@ -2,23 +2,17 @@
|
|||||||
inputs.nixpkgs.url = "nixpkgs";
|
inputs.nixpkgs.url = "nixpkgs";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ...}:
|
outputs = { self, nixpkgs, ...}:
|
||||||
let
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
# For now we only support x86
|
# For now we only support x86
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs {
|
overlays = [ self.overlays.default ];
|
||||||
inherit system;
|
};
|
||||||
overlays = [ self.overlays.default ];
|
in
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
bscOverlay = import ./overlay.nix;
|
bscOverlay = import ./overlay.nix;
|
||||||
overlays.default = self.bscOverlay;
|
overlays.default = self.bscOverlay;
|
||||||
# full nixpkgs with our overlay applied
|
legacyPackages.x86_64-linux = pkgs;
|
||||||
legacyPackages.${system} = pkgs;
|
|
||||||
|
|
||||||
hydraJobs = {
|
|
||||||
inherit (self.legacyPackages.${system}.bsc-ci) test pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
# propagate nixpkgs lib, so we can do bscpkgs.lib
|
# propagate nixpkgs lib, so we can do bscpkgs.lib
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ let
|
|||||||
"printf '%s\n' ${toString (collect (x: x ? outPath) pkgs)} > $out";
|
"printf '%s\n' ${toString (collect (x: x ? outPath) pkgs)} > $out";
|
||||||
|
|
||||||
bscPkgs = {
|
bscPkgs = {
|
||||||
|
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 { };
|
||||||
@@ -88,9 +91,7 @@ in bscPkgs // {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pkgs = filterAttrs (_: isDerivation) bscPkgs;
|
pkgs = final.runCommand "ci-pkgs" { }
|
||||||
|
|
||||||
pkgsList = final.runCommand "ci-pkgs" { }
|
|
||||||
"printf '%s\n' ${toString (collect isDerivation bscPkgs)} > $out";
|
"printf '%s\n' ${toString (collect isDerivation bscPkgs)} > $out";
|
||||||
|
|
||||||
tests = final.runCommand "ci-tests" { }
|
tests = final.runCommand "ci-tests" { }
|
||||||
@@ -98,7 +99,7 @@ in bscPkgs // {
|
|||||||
|
|
||||||
all = final.runCommand "ci-all" { }
|
all = final.runCommand "ci-all" { }
|
||||||
''
|
''
|
||||||
deps="${toString [ final.bsc-ci.pkgsList final.bsc-ci.tests ]}"
|
deps="${toString [ final.bsc-ci.pkgs final.bsc-ci.tests ]}"
|
||||||
cat $deps
|
cat $deps
|
||||||
printf '%s\n' $deps > $out
|
printf '%s\n' $deps > $out
|
||||||
'';
|
'';
|
||||||
|
|||||||
16
pkgs/aocc/default.nix
Normal file
16
pkgs/aocc/default.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ 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++
|
||||||
|
'';
|
||||||
|
}
|
||||||
51
pkgs/aocc/unwrapped.nix
Normal file
51
pkgs/aocc/unwrapped.nix
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
{ 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";
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
{ stdenv
|
{
|
||||||
|
stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, autoreconfHook
|
, autoreconfHook
|
||||||
, boost
|
, boost
|
||||||
@@ -11,17 +12,14 @@
|
|||||||
, openssl
|
, openssl
|
||||||
, glibcLocales
|
, glibcLocales
|
||||||
, wrapGAppsHook
|
, wrapGAppsHook
|
||||||
|
|
||||||
, enableDebug ? false
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
wx = wxGTK32;
|
wx = wxGTK32;
|
||||||
version = "4.12.0";
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
pname = "wxparaver";
|
pname = "wxparaver";
|
||||||
inherit version;
|
version = "4.12.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "bsc-performance-tools";
|
owner = "bsc-performance-tools";
|
||||||
@@ -38,26 +36,21 @@ stdenv.mkDerivation {
|
|||||||
./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;
|
||||||
|
|
||||||
hardeningDisable = [ "all" ];
|
preConfigure = ''
|
||||||
|
export CFLAGS="-O3"
|
||||||
dontStrip = true;
|
export CXXFLAGS="-O3"
|
||||||
|
'';
|
||||||
env =
|
|
||||||
let
|
|
||||||
flags = if enableDebug then "-ggdb -Og" else "-O3";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
CFLAGS = flags;
|
|
||||||
CXXFLAGS = flags;
|
|
||||||
};
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-boost=${boost}"
|
"--with-boost=${boost}"
|
||||||
@@ -67,19 +60,19 @@ stdenv.mkDerivation {
|
|||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
autoconf
|
|
||||||
automake
|
|
||||||
autoreconfHook
|
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
autoreconfHook
|
||||||
boost
|
boost
|
||||||
libxml2
|
libxml2.dev
|
||||||
xml2
|
xml2
|
||||||
wx
|
wx
|
||||||
|
autoconf
|
||||||
|
automake
|
||||||
paraverKernel
|
paraverKernel
|
||||||
openssl
|
openssl.dev
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{ stdenv
|
{
|
||||||
|
stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, autoreconfHook
|
, autoreconfHook
|
||||||
, boost
|
, boost
|
||||||
@@ -8,16 +9,11 @@
|
|||||||
, automake
|
, automake
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, zlib
|
, zlib
|
||||||
|
|
||||||
, enableDebug ? false
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation rec {
|
||||||
version = "4.12.0";
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
pname = "paraver-kernel";
|
pname = "paraver-kernel";
|
||||||
inherit version;
|
version = "4.12.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "bsc-performance-tools";
|
owner = "bsc-performance-tools";
|
||||||
@@ -38,31 +34,24 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
|
|
||||||
env =
|
preConfigure = ''
|
||||||
let
|
export CFLAGS="-O3 -DPARALLEL_ENABLED"
|
||||||
flags = "-DPARALLEL_ENABLED " + (if enableDebug then "-ggdb -Og" else "-O3");
|
export CXXFLAGS="-O3 -DPARALLEL_ENABLED"
|
||||||
in
|
'';
|
||||||
{
|
|
||||||
CFLAGS = flags;
|
|
||||||
CXXFLAGS = flags;
|
|
||||||
};
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-boost=${boost}"
|
"--with-boost=${boost}"
|
||||||
"--enable-openmp"
|
"--enable-openmp"
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
autoreconfHook
|
|
||||||
autoconf
|
|
||||||
automake
|
|
||||||
pkg-config
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
autoreconfHook
|
||||||
boost
|
boost
|
||||||
libxml2.dev
|
libxml2.dev
|
||||||
xml2
|
xml2
|
||||||
|
autoconf
|
||||||
|
automake
|
||||||
|
pkg-config
|
||||||
zlib
|
zlib
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,16 +61,13 @@ stdenv.mkDerivation rec {
|
|||||||
"--with-wx-config=${wx}/bin/wx-config"
|
"--with-wx-config=${wx}/bin/wx-config"
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
autoconf
|
|
||||||
automake
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
boost
|
boost
|
||||||
xml2
|
xml2
|
||||||
libxml2.dev
|
libxml2.dev
|
||||||
wx
|
wx
|
||||||
|
autoconf
|
||||||
|
automake
|
||||||
openssl.dev
|
openssl.dev
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user