jungle/pkgs/osu/default.nix
Aleix Boné 32a2b87313
All checks were successful
CI / build:cross (pull_request) Successful in 12s
CI / build:all (pull_request) Successful in 15s
Fix osu cross-compilation
2025-10-31 12:01:53 +01:00

55 lines
1.1 KiB
Nix

{
stdenv
, fetchurl
, mpi
, lib
, symlinkJoin
}:
let
mpiAll = symlinkJoin {
name = "mpi-all";
paths = [ mpi.all ];
};
in
stdenv.mkDerivation rec {
version = "7.1-1";
name = "osu-micro-benchmarks-${version}";
src = fetchurl {
url = "https://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-${version}.tar.gz";
sha256 = "sha256-hfTdi+HfMSVeIyhSdprluC6HpfsUvi+Ouhrp3o/+ORo=";
};
doCheck = true;
enableParallelBuilding = true;
nativeBuildInputs = [ mpiAll ];
buildInputs = [ mpiAll ];
hardeningDisable = [ "all" ];
configureFlags = [
"CC=mpicc"
"CXX=mpicxx"
];
env = {
MPICH_CC="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc";
MPICH_CXX="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++";
};
postInstall = ''
mkdir -p $out/bin
for f in $(find $out -executable -type f); do
ln -s "$f" $out/bin/$(basename "$f")
done
'';
meta = {
description = "OSU Micro-Benchmarks";
homepage = "http://mvapich.cse.ohio-state.edu/benchmarks/";
maintainers = [ ];
platforms = lib.platforms.all;
cross = true;
};
}