From 31fdd466208ecbad496d6d2624833533e54449e2 Mon Sep 17 00:00:00 2001 From: Dustin Frisch Date: Wed, 14 Feb 2024 13:24:16 +0100 Subject: [PATCH] packages: add cube and related packages --- packages/cubelib/default.nix | 27 +++++++++++ packages/cubelib/result | 1 + packages/cubew/default.nix | 27 +++++++++++ packages/cubew/result | 1 + packages/{edumpi.nix => edumpi/default.nix} | 0 packages/opari2/default.nix | 21 ++++++++ packages/opari2/result | 1 + packages/otf2/default.nix | 15 ++++++ packages/otf2/result | 1 + packages/scalasca/default.nix | 53 +++++++++++++++++++++ packages/scalasca/result | 1 + packages/scorep/default.nix | 46 ++++++++++++++++++ packages/scorep/result | 1 + shared/default.nix | 1 + shared/edumpi.nix | 2 +- shared/packages.nix | 17 +++++++ shared/userenv.nix | 3 ++ 17 files changed, 217 insertions(+), 1 deletion(-) create mode 100644 packages/cubelib/default.nix create mode 120000 packages/cubelib/result create mode 100644 packages/cubew/default.nix create mode 120000 packages/cubew/result rename packages/{edumpi.nix => edumpi/default.nix} (100%) create mode 100644 packages/opari2/default.nix create mode 120000 packages/opari2/result create mode 100644 packages/otf2/default.nix create mode 120000 packages/otf2/result create mode 100644 packages/scalasca/default.nix create mode 120000 packages/scalasca/result create mode 100644 packages/scorep/default.nix create mode 120000 packages/scorep/result create mode 100644 shared/packages.nix diff --git a/packages/cubelib/default.nix b/packages/cubelib/default.nix new file mode 100644 index 0000000..aee6d7a --- /dev/null +++ b/packages/cubelib/default.nix @@ -0,0 +1,27 @@ +{ stdenv +, fetchzip +, zlib +, which +, pkg-config +, ... +}: + +stdenv.mkDerivation rec { + name = "cubelib"; + version = "4.8.2"; + + src = fetchzip { + url = "https://perftools.pages.jsc.fz-juelich.de/cicd/${name}/tags/${name}-${version}/${name}-${version}.tar.gz"; + hash = "sha256-Ky6p6jAdHABQJs64VuIBDBWcujEBDVlyVTa8pZyQ2rM="; + }; + + nativeBuildInputs = [ + pkg-config + which + ]; + + buildInputs = [ + zlib + ]; +} + diff --git a/packages/cubelib/result b/packages/cubelib/result new file mode 120000 index 0000000..12cfae0 --- /dev/null +++ b/packages/cubelib/result @@ -0,0 +1 @@ +/nix/store/zaxgv6nc3mia1lgwwkfazmqazdh299hf-cubelib \ No newline at end of file diff --git a/packages/cubew/default.nix b/packages/cubew/default.nix new file mode 100644 index 0000000..53d2705 --- /dev/null +++ b/packages/cubew/default.nix @@ -0,0 +1,27 @@ +{ stdenv +, fetchzip +, zlib +, which +, pkg-config +, ... +}: + +stdenv.mkDerivation rec { + name = "cubew"; + version = "4.8.2"; + + src = fetchzip { + url = "https://perftools.pages.jsc.fz-juelich.de/cicd/${name}/tags/${name}-${version}/${name}-${version}.tar.gz"; + hash = "sha256-Ky6p6jAdHABQJs64VuIBDBWcujEBDVlyVTa8pZyQ2rM="; + }; + + nativeBuildInputs = [ + pkg-config + which + ]; + + buildInputs = [ + zlib + ]; +} + diff --git a/packages/cubew/result b/packages/cubew/result new file mode 120000 index 0000000..c39e0dd --- /dev/null +++ b/packages/cubew/result @@ -0,0 +1 @@ +/nix/store/lzdccb2yrwnsif0rvb8rcnraw4yvb3fp-cubew \ No newline at end of file diff --git a/packages/edumpi.nix b/packages/edumpi/default.nix similarity index 100% rename from packages/edumpi.nix rename to packages/edumpi/default.nix diff --git a/packages/opari2/default.nix b/packages/opari2/default.nix new file mode 100644 index 0000000..34ffc3c --- /dev/null +++ b/packages/opari2/default.nix @@ -0,0 +1,21 @@ +{ stdenv +, fetchzip +, ... +}: + +stdenv.mkDerivation rec { + name = "opari2"; + version = "2.0.8"; + + src = fetchzip { + url = "https://perftools.pages.jsc.fz-juelich.de/cicd/${name}/tags/${name}-${version}/${name}-${version}.tar.gz"; + hash = "sha256-vrgoUIV+dyVvYJigdu3XXVDzDQrZZo2mHrmm2orVMXI="; + }; + + nativeBuildInputs = [ + ]; + + buildInputs = [ + ]; +} + diff --git a/packages/opari2/result b/packages/opari2/result new file mode 120000 index 0000000..e7c96e4 --- /dev/null +++ b/packages/opari2/result @@ -0,0 +1 @@ +/nix/store/m9bi6nky6ldb7dim9l4dw1vhck06dfvd-opari2 \ No newline at end of file diff --git a/packages/otf2/default.nix b/packages/otf2/default.nix new file mode 100644 index 0000000..b939a62 --- /dev/null +++ b/packages/otf2/default.nix @@ -0,0 +1,15 @@ +{ stdenv +, fetchzip +, ... +}: + +stdenv.mkDerivation rec { + name = "otf2"; + version = "3.0.3"; + + src = fetchzip { + url = "https://perftools.pages.jsc.fz-juelich.de/cicd/${name}/tags/${name}-${version}/${name}-${version}.tar.gz"; + hash = "sha256-SELtnvnN6VNqJRZFU5SdOd19rAZHL8P9KZv8qu2uqu0="; + }; +} + diff --git a/packages/otf2/result b/packages/otf2/result new file mode 120000 index 0000000..8dd42f5 --- /dev/null +++ b/packages/otf2/result @@ -0,0 +1 @@ +/nix/store/ibpvvkjkqg79j8jnm7539yjy938jlf9a-otf2 \ No newline at end of file diff --git a/packages/scalasca/default.nix b/packages/scalasca/default.nix new file mode 100644 index 0000000..10b7005 --- /dev/null +++ b/packages/scalasca/default.nix @@ -0,0 +1,53 @@ +{ stdenv +, fetchzip +, openmpi +, libbfd +, libz +, lib +, which +, ... +}: + +with lib; + +stdenv.mkDerivation rec { + pname = "scalasca"; + version = "2.6.1"; + + src = fetchzip { + url = "https://apps.fz-juelich.de/${pname}/releases/${pname}/${versions.majorMinor version}/dist/${pname}-${version}.tar.gz"; + hash = "sha256-GENZD8ep9ukWR9SgZw4bocIO6XCAyYgT5G44zkt7hbc="; + }; + + configureFlags = [ + "--with-mpi=openmpi" + ]; + + nativeBuildinputs = [ + which + ]; + + buildInputs = [ + openmpi + libbfd + libz + ]; + + preFixup = '' + for f in "$out"/{bin,lib}/*; do + if [ -f "$f" ] && isELF "$f"; then + patchelf \ + --add-rpath "$out"/lib \ + "$f" + patchelf \ + --shrink-rpath \ + --allowed-rpath-prefixes "$NIX_STORE" \ + "$f" + fi + done + ''; + + + enableParallelBuilding = true; +} + diff --git a/packages/scalasca/result b/packages/scalasca/result new file mode 120000 index 0000000..45438e0 --- /dev/null +++ b/packages/scalasca/result @@ -0,0 +1 @@ +/nix/store/fy2y6jh57ps5vlfi0h3ll2dz4qsfh2k0-scalasca-2.6.1 \ No newline at end of file diff --git a/packages/scorep/default.nix b/packages/scorep/default.nix new file mode 100644 index 0000000..98e0ec1 --- /dev/null +++ b/packages/scorep/default.nix @@ -0,0 +1,46 @@ +{ stdenv +, fetchzip +, openmpi +, libbfd +, papi +, which +, pkg-config +, callPackage +, cubew ? callPackage ../cubew { } +, cubelib ? callPackage ../cubelib { } +, otf2 ? callPackage ../otf2 { } +, opari2 ? callPackage ../opari2 { } +, ... +}: + +stdenv.mkDerivation rec { + pname = "scorep"; + version = "8.3"; + + src = fetchzip { + url = "https://perftools.pages.jsc.fz-juelich.de/cicd/${pname}/tags/${pname}-${version}/${pname}-${version}.tar.gz"; + hash = "sha256-YGF+qG4BSpj2HoyQD/Tnm3vGMtwN4iSSxFyF3coceOY="; + }; + + configureFlags = [ + "--with-mpi=openmpi" + ]; + + nativeBuildInputs = [ + pkg-config + which + ]; + + buildInputs = [ + openmpi + libbfd + papi + cubew + cubelib + otf2 + opari2 + ]; + + enableParallelBuilding = true; +} + diff --git a/packages/scorep/result b/packages/scorep/result new file mode 120000 index 0000000..4c7b8c4 --- /dev/null +++ b/packages/scorep/result @@ -0,0 +1 @@ +/nix/store/6z986prqcs7l4jyhyf90q9nmpxh716ml-scorep-8.3 \ No newline at end of file diff --git a/shared/default.nix b/shared/default.nix index 82dd7f1..9fd802d 100644 --- a/shared/default.nix +++ b/shared/default.nix @@ -2,6 +2,7 @@ { imports = [ + ./packages.nix ./network.nix ./users.nix ./userenv.nix diff --git a/shared/edumpi.nix b/shared/edumpi.nix index 7162222..e5a44f2 100644 --- a/shared/edumpi.nix +++ b/shared/edumpi.nix @@ -3,7 +3,7 @@ with lib; let - edumpi = pkgs.callPackage ../packages/edumpi.nix { }; + edumpi = pkgs.callPackage ../packages/edumpi { }; in { diff --git a/shared/packages.nix b/shared/packages.nix new file mode 100644 index 0000000..2bb256b --- /dev/null +++ b/shared/packages.nix @@ -0,0 +1,17 @@ +{ pkgs, lib, ... }: + +with lib; + +{ + nixpkgs.overlays = [ + (self: super: { + cubelib = self.callPackage ../packages/cubelib { }; + cubew = self.callPackage ../packages/cubew { }; + opari2 = self.callPackage ../packages/opari2 { }; + otf2 = self.callPackage ../packages/otf2 { }; + scalasca = self.callPackage ../packages/scalasca { }; + scorep = self.callPackage ../packages/scorep { }; + }) + ]; +} + diff --git a/shared/userenv.nix b/shared/userenv.nix index 164e7fa..013568f 100644 --- a/shared/userenv.nix +++ b/shared/userenv.nix @@ -48,6 +48,9 @@ let vim wget (getDev zlib) + + (getBin scorep) + (getBin scalasca) ]; ignoreCollisions = false;