NixOS configuration for HPC cluster https://docs.hpc.informatik.hs-fulda.de/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
886 B

  1. { stdenv
  2. , fetchzip
  3. , openmpi
  4. , libbfd
  5. , libz
  6. , lib
  7. , which
  8. , ...
  9. }:
  10. with lib;
  11. stdenv.mkDerivation rec {
  12. pname = "scalasca";
  13. version = "2.6.1";
  14. src = fetchzip {
  15. url = "https://apps.fz-juelich.de/${pname}/releases/${pname}/${versions.majorMinor version}/dist/${pname}-${version}.tar.gz";
  16. hash = "sha256-GENZD8ep9ukWR9SgZw4bocIO6XCAyYgT5G44zkt7hbc=";
  17. };
  18. configureFlags = [
  19. "--with-mpi=openmpi"
  20. ];
  21. dontStrip = true;
  22. nativeBuildinputs = [
  23. which
  24. ];
  25. buildInputs = [
  26. openmpi
  27. libbfd
  28. libz
  29. ];
  30. preFixup = ''
  31. for f in "$out"/{bin,lib}/*; do
  32. if [ -f "$f" ] && isELF "$f"; then
  33. patchelf \
  34. --add-rpath "$out"/lib \
  35. "$f"
  36. patchelf \
  37. --shrink-rpath \
  38. --allowed-rpath-prefixes "$NIX_STORE" \
  39. "$f"
  40. fi
  41. done
  42. '';
  43. enableParallelBuilding = true;
  44. }