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.

53 lines
865 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. nativeBuildinputs = [
  22. which
  23. ];
  24. buildInputs = [
  25. openmpi
  26. libbfd
  27. libz
  28. ];
  29. preFixup = ''
  30. for f in "$out"/{bin,lib}/*; do
  31. if [ -f "$f" ] && isELF "$f"; then
  32. patchelf \
  33. --add-rpath "$out"/lib \
  34. "$f"
  35. patchelf \
  36. --shrink-rpath \
  37. --allowed-rpath-prefixes "$NIX_STORE" \
  38. "$f"
  39. fi
  40. done
  41. '';
  42. enableParallelBuilding = true;
  43. }