nixpkgs/pkgs/by-name/ge/gephi/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

46 lines
1.3 KiB
Nix

{ lib, fetchFromGitHub, jdk11, maven, jogl }:
maven.buildMavenPackage rec {
pname = "gephi";
version = "0.10.1";
src = fetchFromGitHub {
owner = "gephi";
repo = "gephi";
rev = "v${version}";
hash = "sha256-ZNSEaiD32zFfF2ISKa1CmcT9Nq6r5i2rNHooQAcVbn4=";
};
mvnJdk = jdk11;
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 ];
};
}