Skip to content

Commit

Permalink
parmetis: Use KarypisLab GitHub mirror instead of glaros source
Browse files Browse the repository at this point in the history
  • Loading branch information
cheriimoya committed Aug 6, 2024
1 parent db2396c commit 8ce6a3c
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions pkgs/by-name/pa/parmetis/package.nix
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
{ 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 = "MPI-based parallel library for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices";
homepage = "http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview";
platforms = platforms.all;
license = licenses.unfree;
Expand Down

0 comments on commit 8ce6a3c

Please sign in to comment.