about summary refs log tree commit diff
path: root/pkgs/applications/graphics/fluxus
diff options
context:
space:
mode:
authorMárton Boros <martonboros@gmail.com>2020-01-20 07:51:57 +0000
committerMárton Boros <martonboros@gmail.com>2020-01-25 20:41:04 +0000
commit57092f7ef17adfca9817f0ad9d713e1c5114ddff (patch)
tree752476ca6add1100f77ce5070ef5539b9d34be52 /pkgs/applications/graphics/fluxus
parent03884c3fe127682e0a54f627b72de0c52beb870d (diff)
fluxus: init at 0.19
Diffstat (limited to 'pkgs/applications/graphics/fluxus')
-rw-r--r--pkgs/applications/graphics/fluxus/default.nix96
-rw-r--r--pkgs/applications/graphics/fluxus/fix-build.patch16
2 files changed, 112 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/fluxus/default.nix b/pkgs/applications/graphics/fluxus/default.nix
new file mode 100644
index 0000000000000..a809407110130
--- /dev/null
+++ b/pkgs/applications/graphics/fluxus/default.nix
@@ -0,0 +1,96 @@
+{ stdenv
+, fetchFromGitLab
+, alsaLib
+, bzip2
+, fftw
+, freeglut
+, freetype
+, glew
+, libjack2
+, libGL
+, libGLU
+, libjpeg
+, liblo
+, libpng
+, libsndfile
+, libtiff
+, ode
+, openal
+, openssl
+, racket
+, scons
+, zlib
+}:
+let
+  libs = [
+    alsaLib
+    bzip2
+    fftw
+    freeglut
+    freetype
+    glew
+    libjack2
+    libGL
+    libGLU
+    libjpeg
+    liblo
+    libpng
+    libsndfile
+    libtiff
+    ode
+    openal
+    openssl
+    zlib
+  ];
+in
+stdenv.mkDerivation rec {
+  pname = "fluxus";
+  version = "0.19";
+  src = fetchFromGitLab {
+    owner = "nebogeo";
+    repo = "fluxus";
+    rev = "ba9aee218dd4a9cfab914ad78bdb6d59e9a37400";
+    hash = "sha256:0mwghpgq4n1khwlmgscirhmcdhi6x00c08q4idi2zcqz961bbs28";
+  };
+
+  buildInputs = [
+    alsaLib
+    fftw
+    freeglut.dev
+    freetype
+    glew
+    libjack2
+    libjpeg.dev
+    liblo
+    libsndfile.dev
+    libtiff.dev
+    ode
+    openal
+    openssl.dev
+    racket
+  ];
+  nativeBuildInputs = [ scons ];
+
+  patches = [ ./fix-build.patch ];
+  sconsFlags = [
+    "RacketPrefix=${racket}"
+    "RacketInclude=${racket}/include/racket"
+    "RacketLib=${racket}/lib/racket"
+    "LIBPATH=${stdenv.lib.makeLibraryPath libs}"
+    "DESTDIR=build"
+  ];
+  configurePhase = ''
+    sconsFlags+=" Prefix=$out"
+  '';
+  installPhase = ''
+    mkdir -p $out
+    cp -r build$out/* $out/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Livecoding environment for 3D graphics, sound, and games";
+    license = licenses.gpl2;
+    homepage = http://www.pawfal.org/fluxus/;
+    maintainers = [ maintainers.brainrape ];
+  };
+}
diff --git a/pkgs/applications/graphics/fluxus/fix-build.patch b/pkgs/applications/graphics/fluxus/fix-build.patch
new file mode 100644
index 0000000000000..7810dd59e3572
--- /dev/null
+++ b/pkgs/applications/graphics/fluxus/fix-build.patch
@@ -0,0 +1,16 @@
+diff --git a/SConstruct b/SConstruct
+index 32cb644..0b3a208 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -225,6 +225,11 @@ if env['PLATFORM'] == 'posix':
+                     ["asound", "alsa/asoundlib.h"],
+                     ["openal", "AL/al.h"]]
+
++env.Append(ENV={'PATH': ' ' + os.environ['PATH'], })
++env.Append(LIBPATH=ARGUMENTS.get('LIBPATH', '').split(':'))
++env.Append(CCFLAGS=' ' + os.environ.get('NIX_CFLAGS_COMPILE',''))
++env.Append(CCFLAGS=' -DNULL=0')
++
+ ################################################################################
+ # Make sure we have these libraries availible
+