Merge pull request #218669 from avdv/gephi-0.10.1
gephi: 0.9.6 -> 0.10.1
This commit is contained in:
commit
f03155fc9f
3 changed files with 87 additions and 11 deletions
|
@ -1,20 +1,20 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, jdk, maven, javaPackages }:
|
{ lib, stdenv, fetchFromGitHub, jdk11, maven, javaPackages }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "0.9.6";
|
version = "0.10.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "gephi";
|
owner = "gephi";
|
||||||
repo = "gephi";
|
repo = "gephi";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-3+tOwcE7TUeexJCugFsx9SgsKeb7ApNqbMEIi9QaKPE=";
|
hash = "sha256-ZNSEaiD32zFfF2ISKa1CmcT9Nq6r5i2rNHooQAcVbn4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# perform fake build to make a fixed-output derivation out of the files downloaded from maven central (120MB)
|
# perform fake build to make a fixed-output derivation out of the files downloaded from maven central (120MB)
|
||||||
deps = stdenv.mkDerivation {
|
deps = stdenv.mkDerivation {
|
||||||
name = "gephi-${version}-deps";
|
name = "gephi-${version}-deps";
|
||||||
inherit src;
|
inherit src;
|
||||||
buildInputs = [ jdk maven ];
|
buildInputs = [ jdk11 maven ];
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
while mvn package -Dmaven.repo.local=$out/.m2 -Dmaven.wagon.rto=5000; [ $? = 1 ]; do
|
while mvn package -Dmaven.repo.local=$out/.m2 -Dmaven.wagon.rto=5000; [ $? = 1 ]; do
|
||||||
echo "timeout, restart maven to continue downloading"
|
echo "timeout, restart maven to continue downloading"
|
||||||
|
@ -24,7 +24,7 @@ let
|
||||||
installPhase = ''find $out/.m2 -type f -regex '.+\(\.lastUpdated\|resolver-status\.properties\|_remote\.repositories\)' -delete'';
|
installPhase = ''find $out/.m2 -type f -regex '.+\(\.lastUpdated\|resolver-status\.properties\|_remote\.repositories\)' -delete'';
|
||||||
outputHashAlgo = "sha256";
|
outputHashAlgo = "sha256";
|
||||||
outputHashMode = "recursive";
|
outputHashMode = "recursive";
|
||||||
outputHash = "sha256-kIPsZN0alRAgiMbckQnMWKOKtCZ37D/6MgT17VYcr+s=";
|
outputHash = "sha256-OdW4M5nGEkYkmHpRLM4cBQtk4SJII2uqM8TXb6y4eXk=";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
|
@ -33,7 +33,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
buildInputs = [ jdk maven ];
|
buildInputs = [ jdk11 maven ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
# 'maven.repo.local' must be writable so copy it out of nix store
|
# 'maven.repo.local' must be writable so copy it out of nix store
|
||||||
|
@ -49,10 +49,10 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
# use self-compiled JOGL to avoid patchelf'ing .so inside jars
|
# use self-compiled JOGL to avoid patchelf'ing .so inside jars
|
||||||
rm $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-{jogl,gluegen}/*.jar
|
rm $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-{jogl,gluegen}/*.jar
|
||||||
cp ${javaPackages.jogl_2_3_2}/share/java/jogl*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-jogl/
|
cp ${javaPackages.jogl_2_4_0}/share/java/jogl*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-jogl/
|
||||||
cp ${javaPackages.jogl_2_3_2}/share/java/glue*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-gluegen/
|
cp ${javaPackages.jogl_2_4_0}/share/java/glue*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-gluegen/
|
||||||
|
|
||||||
echo "jdkhome=${jdk}" >> $out/etc/gephi.conf
|
printf "\n\njdkhome=${jdk11}\n" >> $out/etc/gephi.conf
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -1,6 +1,81 @@
|
||||||
{ lib, stdenv, fetchgit, ant, jdk8, git, xorg, udev, libGL, libGLU }:
|
{ coreutils, lib, stdenv, fetchgit, ant, jdk8, jdk11, git, xorg, udev, libGL, libGLU, mesa, xmlstarlet }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
jogl_2_4_0 =
|
||||||
|
let
|
||||||
|
version = "2.4.0";
|
||||||
|
|
||||||
|
gluegen-src = fetchgit {
|
||||||
|
url = "git://jogamp.org/srv/scm/gluegen.git";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-qQzq7v2vMFeia6gXaNHS3AbOp9HhDRgISp7P++CKErA=";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
};
|
||||||
|
jogl-src = fetchgit {
|
||||||
|
url = "git://jogamp.org/srv/scm/jogl.git";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-PHDq7uFEQfJ2P0eXPUi0DGFR1ob/n5a68otgzpFnfzQ=";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "jogl";
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
srcs = [ gluegen-src jogl-src ];
|
||||||
|
sourceRoot = ".";
|
||||||
|
|
||||||
|
unpackCmd = "cp -r $curSrc \${curSrc##*-}";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ ant jdk11 git xmlstarlet ];
|
||||||
|
buildInputs = [ udev xorg.libX11 xorg.libXrandr xorg.libXcursor xorg.libXi xorg.libXt xorg.libXxf86vm xorg.libXrender mesa ];
|
||||||
|
|
||||||
|
# Workaround build failure on -fno-common toolchains:
|
||||||
|
# ld: ../obj/Bindingtest1p1Impl_JNI.o:(.bss+0x8): multiple definition of
|
||||||
|
# `unsigned_size_t_1'; ../obj/TK_Surface_JNI.o:(.bss+0x8): first defined here
|
||||||
|
NIX_CFLAGS_COMPILE = "-fcommon"; # copied from 2.3.2, is this still needed?
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
( cd gluegen/make
|
||||||
|
substituteInPlace ../src/java/com/jogamp/common/util/IOUtil.java --replace '#!/bin/true' '#!${coreutils}/bin/true'
|
||||||
|
|
||||||
|
# set timestamp of files in jar to a fixed point in time
|
||||||
|
xmlstarlet ed --inplace \
|
||||||
|
--append //jar --type attr -n modificationtime --value 1980-01-01T00:00Z \
|
||||||
|
build.xml gluegen-cpptasks-base.xml
|
||||||
|
|
||||||
|
ant -Dtarget.sourcelevel=8 -Dtarget.targetlevel=8 -Dtarget.rt.jar='null.jar' )
|
||||||
|
|
||||||
|
( cd jogl/make
|
||||||
|
|
||||||
|
# force way to do disfunctional "ant -Dsetup.addNativeBroadcom=false" and disable dependency on raspberrypi drivers
|
||||||
|
# if arm/aarch64 support will be added, this block might be commented out on those platforms
|
||||||
|
# on x86 compiling with default "setup.addNativeBroadcom=true" leads to unsatisfied import "vc_dispmanx_resource_delete" in libnewt.so
|
||||||
|
xmlstarlet ed --inplace --delete '//*[@if="setup.addNativeBroadcom"]' build-newt.xml
|
||||||
|
|
||||||
|
# set timestamp of files in jar to a fixed point in time
|
||||||
|
xmlstarlet ed --inplace \
|
||||||
|
--append //jar --type attr -n modificationtime --value 1980-01-01T00:00Z \
|
||||||
|
build.xml build-nativewindow.xml build-jogl.xml
|
||||||
|
|
||||||
|
ant -Dtarget.sourcelevel=8 -Dtarget.targetlevel=8 -Dtarget.rt.jar='null.jar' )
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share/java
|
||||||
|
cp -v $NIX_BUILD_TOP/gluegen/build/gluegen-rt{,-natives-linux-amd64}.jar $out/share/java/
|
||||||
|
cp -v $NIX_BUILD_TOP/jogl/build/jar/jogl-all{,-natives-linux-amd64}.jar $out/share/java/
|
||||||
|
cp -v $NIX_BUILD_TOP/jogl/build/nativewindow/nativewindow{,-awt,-natives-linux-amd64,-os-drm,-os-x11}.jar $out/share/java/
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Java libraries for 3D Graphics, Multimedia and Processing";
|
||||||
|
homepage = "https://jogamp.org/";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
jogl_2_3_2 =
|
jogl_2_3_2 =
|
||||||
let
|
let
|
||||||
version = "2.3.2";
|
version = "2.3.2";
|
||||||
|
|
|
@ -271,7 +271,8 @@ in {
|
||||||
junit_4_12;
|
junit_4_12;
|
||||||
|
|
||||||
inherit (callPackage ../development/java-modules/jogl { })
|
inherit (callPackage ../development/java-modules/jogl { })
|
||||||
jogl_2_3_2;
|
jogl_2_3_2
|
||||||
|
jogl_2_4_0;
|
||||||
|
|
||||||
inherit (callPackage ../development/java-modules/log4j { inherit fetchMaven; })
|
inherit (callPackage ../development/java-modules/log4j { inherit fetchMaven; })
|
||||||
log4j_1_2_12;
|
log4j_1_2_12;
|
||||||
|
|
Loading…
Reference in a new issue