depot/third_party/nixpkgs/pkgs/applications/science/misc/gephi/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

49 lines
1.4 KiB
Nix

{ lib, fetchFromGitHub, jdk11, maven, jogl }:
let
mavenJdk11 = maven.override {
jdk = jdk11;
};
in
mavenJdk11.buildMavenPackage rec {
pname = "gephi";
version = "0.10.1";
src = fetchFromGitHub {
owner = "gephi";
repo = "gephi";
rev = "v${version}";
hash = "sha256-ZNSEaiD32zFfF2ISKa1CmcT9Nq6r5i2rNHooQAcVbn4=";
};
mvnHash = "sha256-/2/Yb26Ry0NHQQ3j0LXnjwC0wQqJiztvTgWixyMJqvg=";
nativeBuildInputs = [ jdk11 ];
installPhase = ''
cp -r modules/application/target/gephi $out
# remove garbage
find $out -type f -name .lastModified -delete
find $out -type f -regex '.+\.exe' -delete
# use self-compiled JOGL to avoid patchelf'ing .so inside jars
rm $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-{jogl,gluegen}/*.jar
cp ${jogl}/share/java/jogl*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-jogl/
cp ${jogl}/share/java/glue*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-gluegen/
printf "\n\njdkhome=${jdk11}\n" >> $out/etc/gephi.conf
'';
meta = with lib; {
description = "Platform for visualizing and manipulating large graphs";
mainProgram = "gephi";
homepage = "https://gephi.org";
sourceProvenance = with sourceTypes; [
fromSource
binaryBytecode # deps
];
license = licenses.gpl3;
maintainers = [ maintainers.taeer ];
};
}