From c40a25654862311e757098bf7fbb9d308a9b9bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= Date: Mon, 25 Aug 2014 23:43:14 +0200 Subject: [PATCH] Add processing: A language and IDE for electronic arts (cherry picked from commit 0db6387d1c3a8a8f7a9a1e111532d8acd1f794d6) --- .../graphics/processing/default.nix | 36 ++++++++ .../graphics/processing/use-nixpkgs-jre.patch | 88 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 126 insertions(+) create mode 100644 pkgs/applications/graphics/processing/default.nix create mode 100644 pkgs/applications/graphics/processing/use-nixpkgs-jre.patch diff --git a/pkgs/applications/graphics/processing/default.nix b/pkgs/applications/graphics/processing/default.nix new file mode 100644 index 00000000000..516068b4ea5 --- /dev/null +++ b/pkgs/applications/graphics/processing/default.nix @@ -0,0 +1,36 @@ +{ fetchurl, stdenv, ant, jre, makeWrapper, libXxf86vm }: + +stdenv.mkDerivation rec { + name = "processing-${version}"; + version = "2.2.1"; + + src = fetchurl { + url = "https://github.com/processing/processing/archive/processing-0227-${version}.tar.gz"; + sha256 = "1r8q5y0h4gpqap5jwkspc0li6566hzx5chr7hwrdn8mxlzsm50xk"; + }; + + # Stop it trying to download its own version of java + patches = [ ./use-nixpkgs-jre.patch ]; + + buildInputs = [ ant jre makeWrapper libXxf86vm ]; + + buildPhase = "cd build && ant build"; + + installPhase = '' + mkdir -p $out/bin + cp -r linux/work/* $out/ + rm $out/processing-java + sed -e "s#APPDIR=\`dirname \"\$APPDIR\"\`#APPDIR=$out#" -i $out/processing + mv $out/processing $out/bin/ + wrapProgram $out/bin/processing --prefix PATH : ${jre}/bin --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib + mkdir $out/java + ln -s ${jre}/bin $out/java/ + ''; + + meta = with stdenv.lib; { + description = "A language and IDE for electronic arts"; + homepage = http://processing.org; + maintainers = [ maintainers.goibhniu ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/graphics/processing/use-nixpkgs-jre.patch b/pkgs/applications/graphics/processing/use-nixpkgs-jre.patch new file mode 100644 index 00000000000..8f6a5e2018e --- /dev/null +++ b/pkgs/applications/graphics/processing/use-nixpkgs-jre.patch @@ -0,0 +1,88 @@ +From d1fb63255ff028ecc9cc66d5a6b21b24031b4b4a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= +Date: Tue, 26 Aug 2014 00:07:58 +0200 +Subject: [PATCH] patch + +--- + build/build.xml | 42 +++++++++++++++++++++--------------------- + 1 file changed, 21 insertions(+), 21 deletions(-) + +diff --git a/build/build.xml b/build/build.xml +index 4d0f0b2..c3f5c09 100755 +--- a/build/build.xml ++++ b/build/build.xml +@@ -640,10 +640,11 @@ + value="jre-tools-6u37-linux${sun.arch.data.model}.tgz" /> + --> + ++ + +- ++ + + +- +- +- ++ ++ ++ + + +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ + + +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +-- +2.1.0 + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0a92e8ef1e8..3d67650ebe5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9576,6 +9576,8 @@ let qiv = callPackage ../applications/graphics/qiv { }; + processing = callPackage ../applications/graphics/processing { inherit (xorg) libXxf86vm; }; + # perhaps there are better apps for this task? It's how I had configured my preivous system. # And I don't want to rewrite all rules procmail = callPackage ../applications/misc/procmail { };