2021-01-17 00:15:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "perseus";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "4-beta";
|
2021-03-19 17:17:44 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
hardeningDisable = [ "stackprotector" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
2022-09-09 14:08:57 +00:00
|
|
|
url = "http://people.maths.ox.ac.uk/nanda/source/perseus_4_beta.zip";
|
|
|
|
sha256 = "sha256-cnkJEIC4tu+Ni7z0cKdjmLdS8QLe8iKpdA8uha2MeSU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
2022-09-09 14:08:57 +00:00
|
|
|
NIX_CFLAGS_COMPILE = [ "-std=c++14" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPhase = ''
|
|
|
|
g++ Pers.cpp -O3 -fpermissive -o perseus
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp perseus $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The Persistent Homology Software";
|
|
|
|
longDescription = ''
|
|
|
|
Persistent homology - or simply, persistence - is an algebraic
|
|
|
|
topological invariant of a filtered cell complex. Perseus
|
|
|
|
computes this invariant for a wide class of filtrations built
|
|
|
|
around datasets arising from point samples, images, distance
|
|
|
|
matrices and so forth.
|
|
|
|
'';
|
2022-09-09 14:08:57 +00:00
|
|
|
homepage = "http://people.maths.ox.ac.uk/nanda/perseus/index.html";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.gpl3;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with lib.maintainers; [ erikryb ];
|
2021-01-17 00:15:33 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|