diff --git a/packages/pdtoolkit/default.nix b/packages/pdtoolkit/default.nix new file mode 100644 index 0000000..4693a66 --- /dev/null +++ b/packages/pdtoolkit/default.nix @@ -0,0 +1,37 @@ +{ stdenv +, fetchzip +, coreutils +, ... +}: + +stdenv.mkDerivation rec { + pname = "pdtoolkit"; + version = "3.25.1"; + + src = fetchzip { + url = "https://www.cs.uoregon.edu/research/tau/pdt_releases/pdtoolkit-${version}.tar.gz"; + hash = "sha256-IfSc5hlTFqW+y81z0jucVvBiRXQ9SllDsS3K8M2c5Is="; + }; + + nativeBuildInputs = [ + coreutils + ]; + + prePatch = '' + patchShebangs --build configure + + for file in configure Makefile; do + substituteInPlace $file \ + --replace /bin/rm rm \ + --replace /bin/cp cp + done + ''; + + prefixKey = "-prefix="; + + postInstall = '' + chmod -R u=rwX,g=rX,o=rX $out + ''; + + enableParallelBuilding = true; +} diff --git a/packages/tau/default.nix b/packages/tau/default.nix new file mode 100644 index 0000000..d3fada4 --- /dev/null +++ b/packages/tau/default.nix @@ -0,0 +1,54 @@ +{ stdenv +, fetchzip +, coreutils +, which +, callPackage +, libbfd +, pdtoolkit ? callPackage ../pdtoolkit { } +, ... +}: + +stdenv.mkDerivation rec { + pname = "tau"; + version = "2.32"; + + src = fetchzip { + url = "https://www.cs.uoregon.edu/research/tau/tau_releases/tau-${version}.tar.gz"; + hash = "sha256-0wAvssUHtB4gxRDEq7HMpBB1etLa7zHk8TK27SRmJOE="; + }; + + nativeBuildInputs = [ + coreutils + which + ]; + + buildInputs = [ + pdtoolkit + libbfd + ]; + + configureFlags = [ + "-pdt=${pdtoolkit}" + ]; + + prePatch = '' + patchShebangs --build configure + + for file in configure $(find . -name "Makefile") $(find . -name "Makefile.skel") utils/FixMakefile; do + substituteInPlace $file \ + --replace /bin/rm rm \ + --replace /bin/cp cp \ + --replace /bin/ln ln + done + ''; + + preBuild = '' + cd $out + ''; + + prefixKey = "-prefix="; + + dontDisableStatic = true; + + enableParallelBuilding = true; +} diff --git a/shared/packages.nix b/shared/packages.nix index ed5d88e..4978ffc 100644 --- a/shared/packages.nix +++ b/shared/packages.nix @@ -1,7 +1,3 @@ -{ pkgs, lib, ... }: - -with lib; - { nixpkgs.overlays = [ (self: super: { @@ -12,6 +8,9 @@ with lib; openmpi = self.callPackage ../packages/openmpi { }; + pdtoolkit = self.callPackage ../packages/pdtoolkit { }; + tau = self.callPackage ../packages/tau { }; + ucx = super.ucx.overrideAttrs (final: prev: rec { version = "1.16.0";