about summary refs log tree commit diff
path: root/pkgs/by-name/pa/parmetis/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/pa/parmetis/package.nix')
-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;