2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, ghostscript }:
|
2018-07-01 20:29:55 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "hmetis";
|
2018-07-01 20:29:55 +02:00
|
|
|
version = "1.5";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/hmetis/hmetis-${version}-linux.tar.gz";
|
|
|
|
sha256 = "e835a098c046e9c26cecb8addfea4d18ff25214e49585ffd87038e72819be7e1";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ ghostscript ];
|
|
|
|
|
|
|
|
binaryFiles = "hmetis khmetis shmetis";
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
for binaryfile in $binaryFiles; do
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 \
|
|
|
|
--set-rpath ${stdenv.glibc}/lib \
|
|
|
|
$binaryfile
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
gs -sOutputFile=manual.pdf -sDEVICE=pdfwrite -SNOPAUSE -dBATCH manual.ps
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/doc/hmetis $out/lib
|
|
|
|
mv $binaryFiles $out/bin
|
|
|
|
mv manual.pdf $out/share/doc/hmetis
|
|
|
|
mv libhmetis.a $out/lib
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-07-01 20:29:55 +02:00
|
|
|
description = "hMETIS is a set of programs for partitioning hypergraphs";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://glaros.dtc.umn.edu/gkhome/metis/hmetis/overview";
|
2018-07-01 20:29:55 +02:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|