about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMax Hausch2024-08-05 23:08:46 +0200
committerMax Hausch2024-08-19 16:27:09 +0200
commita468bfc94288627df0c8c5b6c804e4d318d34dc1 (patch)
treeeaf1cdf7195743304770ba1ecad5c77634e327d0
parentdb2396c7f9af99da25daf2a8e6baa05d75f6501a (diff)
parmetis: Use KarypisLab GitHub mirror instead of glaros source
-rw-r--r--pkgs/by-name/pa/parmetis/package.nix40
1 files changed, 26 insertions, 14 deletions
diff --git a/pkgs/by-name/pa/parmetis/package.nix b/pkgs/by-name/pa/parmetis/package.nix
index 5023390a182c..a2289eea3069 100644
--- a/pkgs/by-name/pa/parmetis/package.nix
+++ b/pkgs/by-name/pa/parmetis/package.nix
@@ -1,31 +1,43 @@
-{ lib, stdenv
-, fetchurl
-, cmake
-, mpi
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  cmake,
+  metis,
+  mpi,
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
   pname = "parmetis";
   version = "4.0.3";
 
-  src = fetchurl {
-    url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-${version}.tar.gz";
-    sha256 = "0pvfpvb36djvqlcc3lq7si0c5xpb2cqndjg8wvzg35ygnwqs5ngj";
+  src = fetchFromGitHub {
+    owner = "KarypisLab";
+    repo = "ParMETIS";
+    rev = "d90a2a6cf08d1d35422e060daa28718376213659";
+    hash = "sha256-22YQxwC0phdMLX660wokRgmAif/9tRbUmQWwNMZ//7M=";
   };
 
   nativeBuildInputs = [ cmake ];
+  enableParallelBuilding = true;
   buildInputs = [ mpi ];
 
-  # metis and GKlib are packaged with distribution
-  # AUR https://aur.archlinux.org/packages/parmetis/ has reported that
-  # it easier to build with the included packages as opposed to using the metis
-  # package. Compilation time is short.
   configurePhase = ''
-    make config metis_path=$PWD/metis gklib_path=$PWD/metis/GKlib prefix=$out
+    tar xf ${metis.src}
+    mv metis-* metis
+    make config metis_path=metis gklib_path=metis/GKlib prefix=$out
   '';
 
   meta = with lib; {
-    description = "MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices";
+    description = "Parallel Graph Partitioning and Fill-reducing Matrix Ordering";
+    longDescription = ''
+      MPI-based parallel library that implements a variety of algorithms for
+      partitioning unstructured graphs, meshes, and for computing fill-reducing
+      orderings of sparse matrices.
+      The algorithms implemented in ParMETIS are based on the multilevel
+      recursive-bisection, multilevel k-way, and multi-constraint partitioning
+      schemes
+    '';
     homepage = "http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview";
     platforms = platforms.all;
     license = licenses.unfree;