Compare commits

..

6 Commits

Author SHA1 Message Date
66df874b4a
Add missing pre/postInstall hooks to intel 2023
All checks were successful
CI / build:all (pull_request) Successful in 17s
2025-10-08 14:58:33 +02:00
660604a9f5
Trace addition to nix-support/private 2025-10-08 14:58:32 +02:00
30e75da14c
Add nix-support/private to unfree derivation outputs 2025-10-08 14:58:32 +02:00
f6864c7bce
Add skeleton meta to intel 2023 2025-10-08 14:58:32 +02:00
bec363d125
Add meta to packages 2025-10-08 14:58:32 +02:00
3750d0b599
Add maintainers 2025-10-08 14:58:32 +02:00
13 changed files with 77 additions and 38 deletions

View File

@ -11,7 +11,6 @@
./base/hw.nix
./base/net.nix
./base/nix.nix
./base/sys-devices.nix
./base/ntp.nix
./base/rev.nix
./base/ssh.nix

View File

@ -1,9 +0,0 @@
{
nix.settings.system-features = [ "sys-devices" ];
programs.nix-required-mounts.enable = true;
programs.nix-required-mounts.allowedPatterns.sys-devices.paths = [
"/sys/devices/system/cpu"
"/sys/devices/system/node"
];
}

View File

@ -7,6 +7,33 @@ let
callPackage = final.callPackage;
bscPkgs = {
# override stdenv to add a sentinel to know if a derivation comes
# from unfree sources.
stdenv = prev.stdenv // {
mkDerivation =
args:
let
originalDrv = prev.stdenv.mkDerivation args;
checkLicense = l: if builtins.isAttrs l then !(l.free or true) else false;
licenses = if builtins.isList args.meta.license then args.meta.license else [ args.meta.license ];
hasUnfreeLicense =
if args ? meta && args.meta ? license then builtins.any checkLicense licenses else false;
in
if hasUnfreeLicense then
builtins.traceVerbose "adding nix-support/private to ${originalDrv.name or originalDrv.pname}" (
originalDrv.overrideAttrs (old: {
postInstall = (old.postInstall or "") + ''
mkdir -p $out/nix-support
touch $out/nix-support/private
'';
}))
else
originalDrv;
};
amd-uprof = prev.callPackage ./pkgs/amd-uprof/default.nix { };
bench6 = callPackage ./pkgs/bench6/default.nix { };
bigotes = callPackage ./pkgs/bigotes/default.nix { };
@ -62,7 +89,7 @@ let
};
tests = rec {
hwloc = callPackage ./test/bugs/hwloc.nix { };
#hwloc = callPackage ./test/bugs/hwloc.nix { }; # Broken, no /sys
#sigsegv = callPackage ./test/reproducers/sigsegv.nix { };
hello-c = callPackage ./test/compilers/hello-c.nix { };
hello-cpp = callPackage ./test/compilers/hello-cpp.nix { };

View File

@ -20,7 +20,6 @@
#, python3Packages
, installShellFiles
, symlinkJoin
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
}:
let
@ -88,7 +87,7 @@ stdenv.mkDerivation rec {
--enable-sampling
--with-unwind=${libunwind.dev}
--with-xml-prefix=${libxml2.dev}
${lib.optionalString enablePapi "--with-papi=${papi}"}
--with-papi=${papi}
${if (mpi != null) then ''--with-mpi=${mpi}''
else ''--without-mpi''}
--without-dyninst)

View File

@ -43,11 +43,15 @@ let
];
phases = [ "installPhase" ];
installPhase = ''
runHook preInstall
awk -F': ' '\
BEGIN { print "[ {" } \
NR>1 && /^Package: / { print "} {"; } \
/: / { printf "%s = \"%s\";\n", $1, $2 } \
END { print "} ]" }' $srcs > $out
runHook postInstall
'';
};
@ -81,11 +85,15 @@ let
nativeBuildInputs = [ dpkg ];
phases = [ "installPhase" ];
installPhase = ''
runHook preInstall
mkdir -p $out
for src in $srcs; do
echo "unpacking $src"
dpkg -x $src $out
done
runHook postInstall
'';
meta = {
@ -129,6 +137,8 @@ let
phases = [ "installPhase" "fixupPhase" ];
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,etc,lib,include}
mkdir -p $out/share/man
@ -145,6 +155,8 @@ let
# Broken due missing libze_loader.so.1
rsync -a --exclude IMB-MPI1-GPU bin/ $out/bin/
popd
runHook postInstall
'';
preFixup = ''
for i in $out/bin/mpi* ; do
@ -188,6 +200,8 @@ let
autoPatchelfIgnoreMissingDeps = [ "libhwloc.so.5" ];
installPhase = ''
runHook preInstall
mkdir -p $out/lib
cd $src
@ -196,6 +210,8 @@ let
# Libraries
rsync -a lib/intel64/gcc4.8/ $out/lib/
popd
runHook postInstall
'';
meta = {
@ -236,6 +252,8 @@ let
autoPatchelfIgnoreMissingDeps = [ "libsycl.so.6" ];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib,include}
mkdir -p $out/share/man
@ -260,6 +278,8 @@ let
rsync -a compiler/include/ $out/include/
popd
popd
runHook postInstall
'';
meta = {
@ -306,6 +326,8 @@ let
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib,include}
mkdir -p $out/share/man
@ -331,7 +353,10 @@ let
# Fix lib_lin
ln -s $out/lib $out/lib_lin
popd
runHook postInstall
'';
meta = {
@ -399,6 +424,8 @@ let
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib}
mkdir -p $out/share/man
@ -426,6 +453,8 @@ let
# Manuals
rsync -a documentation/en/man/common/ $out/share/man/
popd
runHook postInstall
'';
meta = {

View File

@ -35,8 +35,6 @@ stdenv.mkDerivation rec {
CFLAGS=-Wno-implicit-int
CPPFLAGS=-I${libtirpc.dev}/include/tirpc
LDFLAGS=-ltirpc
CC=$CC
AR=$AR
)
'';

View File

@ -16,7 +16,6 @@
, jemallocNanos6 ? null
, cachelineBytes ? 64
, enableGlibcxxDebug ? false
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
, useGit ? false
, gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6"
, gitBranch ? "master"
@ -48,8 +47,6 @@ let
};
source = if (useGit) then git else release;
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
in
stdenv.mkDerivation (source // {
pname = "nanos6";
@ -74,13 +71,9 @@ in
"--disable-all-instrumentations"
"--enable-ovni-instrumentation"
"--with-ovni=${ovni}"
"--with-boost=${boost.dev}"
] ++
(optional enableJemalloc "--with-jemalloc=${jemallocNanos6}") ++
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG") ++
# Most nanos6 api symbols are resolved at runtime, so prefer
# ifunc by default
(optional isCross "--with-symbol-resolution=ifunc");
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
postConfigure = lib.optionalString (!enableDebug) ''
# Disable debug
@ -104,14 +97,16 @@ in
# TODO: papi_version is needed for configure:
# ./configure: line 27378: papi_version: command not found
# This probably breaks cross-compilation
] ++ lib.optionals enablePapi [ papi ];
papi
];
buildInputs = [
boost
numactl
hwloc
papi
ovni
] ++ lib.optionals enablePapi [ papi ];
];
# Create a script that sets NANOS6_HOME
postInstall = ''

View File

@ -7,7 +7,7 @@
, numactl
, hwloc
, papi
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
, enablePapi ? true
, cacheline ? 64 # bits
, ovni ? null
, useGit ? false

View File

@ -6,7 +6,6 @@
stdenv.mkDerivation {
name = "hwloc-test";
requiredSystemFeatures = [ "sys-devices" ];
src = ./.;
@ -15,7 +14,7 @@ stdenv.mkDerivation {
buildPhase = ''
ls -l /sys
gcc -lhwloc hwloc.c -o hwloc
strace ./hwloc > $out
strace ./hwloc
'';
}

View File

@ -23,8 +23,9 @@ in stdenv.mkDerivation {
dontUnpack = true;
dontConfigure = true;
# nOS-V requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
# nOS-V requires access to /sys/devices to request NUMA information. It will
# fail to run otherwise, so we disable the sandbox for this test.
__noChroot = true;
buildInputs = [ openmp ];

View File

@ -36,8 +36,9 @@ in stdenv.mkDerivation {
dontUnpack = true;
dontConfigure = true;
# nOS-V requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
# nOS-V requires access to /sys/devices to request NUMA information. It will
# fail to run otherwise, so we disable the sandbox for this test.
__noChroot = true;
buildInputs = [ nosv ];

View File

@ -24,8 +24,9 @@ in stdenv.mkDerivation {
dontUnpack = true;
dontConfigure = true;
# nOS-V requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
# nOS-V requires access to /sys/devices to request NUMA information. It will
# fail to run otherwise, so we disable the sandbox for this test.
__noChroot = true;
buildPhase = ''
set -x

View File

@ -25,10 +25,9 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "all" ];
#NIX_DEBUG = 1;
buildInputs = [ ]; #strace gdb;
# NODES requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
# NODES requires access to /sys/devices to request NUMA information. It will
# fail to run otherwise, so we disable the sandbox for this test.
__noChroot = true;
buildPhase = ''
set -x
#$CC -v