diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2018-03-19 11:23:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-19 11:23:43 +0000 |
commit | 6e22dd9ee8a890d346e02a6a220df7bc9a0b2759 (patch) | |
tree | 78eb0a461a64f038c46ae21327d48e3fdcf61fcc /pkgs/development | |
parent | 24894fbc69a8feb745167e61967f42a11db55c09 (diff) | |
parent | 1e2eec169a06dc6510f961a2850a3c52a774d2b1 (diff) | |
download | nixlib-6e22dd9ee8a890d346e02a6a220df7bc9a0b2759.tar nixlib-6e22dd9ee8a890d346e02a6a220df7bc9a0b2759.tar.gz nixlib-6e22dd9ee8a890d346e02a6a220df7bc9a0b2759.tar.bz2 nixlib-6e22dd9ee8a890d346e02a6a220df7bc9a0b2759.tar.lz nixlib-6e22dd9ee8a890d346e02a6a220df7bc9a0b2759.tar.xz nixlib-6e22dd9ee8a890d346e02a6a220df7bc9a0b2759.tar.zst nixlib-6e22dd9ee8a890d346e02a6a220df7bc9a0b2759.zip |
Merge pull request #37356 from volth/gephi-from-sources
gephi: build from sources
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/java-modules/jogl/default.nix | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/development/java-modules/jogl/default.nix b/pkgs/development/java-modules/jogl/default.nix new file mode 100644 index 000000000000..474eaa0e1dc4 --- /dev/null +++ b/pkgs/development/java-modules/jogl/default.nix @@ -0,0 +1,60 @@ +{ stdenv, fetchgit, makeWrapper, ant, jdk, openjdk8, zulu8, git, xorg, udev }: + +let + # workaround https://github.com/NixOS/nixpkgs/issues/37364 + jdk-without-symlinks = if jdk == openjdk8 then zulu8 else jdk; +in +{ + jogl_2_3_2 = + let + version = "2.3.2"; + + gluegen-src = fetchgit { + url = git://jogamp.org/srv/scm/gluegen.git; + rev = "v${version}"; + sha256 = "00hybisjwqs88p24dds652bzrwbbmhn2dpx56kp4j6xpadkp33d0"; + fetchSubmodules = true; + }; + in stdenv.mkDerivation rec { + name = "jogl-${version}"; + + src = fetchgit { + url = http://jogamp.org/srv/scm/jogl.git; + rev = "v${version}"; + sha256 = "0msi2gxiqm2yqwkmxqbh521xdrimw1fly20g890r357rcgj8fsn3"; + fetchSubmodules = true; + }; + + buildInputs = [ jdk-without-symlinks ant git udev xorg.libX11 xorg.libXrandr xorg.libXcursor xorg.libXt xorg.libXxf86vm xorg.libXrender ]; + + buildPhase = '' + cp -r ${gluegen-src} $NIX_BUILD_TOP/gluegen + chmod -R +w $NIX_BUILD_TOP/gluegen + ( cd ../gluegen/make + ant ) + + ( cd 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 + cp build-newt.xml build-newt.xml.old + fgrep -v 'if="setup.addNativeBroadcom"' build-newt.xml.old > build-newt.xml + + ant ) + ''; + + installPhase = '' + mkdir -p $out/share/java + cp $NIX_BUILD_TOP/gluegen/build/gluegen-rt{,-natives-linux-amd64}.jar $out/share/java/ + cp $NIX_BUILD_TOP/jogl/build/jar/jogl-all{,-natives-linux-amd64}.jar $out/share/java/ + ''; + + meta = with stdenv.lib; { + description = "Java libraries for 3D Graphics, Multimedia and Processing"; + homepage = http://jogamp.org/; + license = licenses.bsd3; + platforms = [ "x86_64-linux" ]; + }; + }; +} |