summary refs log tree commit diff
path: root/pkgs/applications/audio/pd-plugins/gem/default.nix
blob: 2c0d0a24c57302163cde3d62a08b6f996966fd52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{ stdenv
, fetchFromGitHub
, fetchpatch
, autoreconfHook
, pkg-config
, puredata
, libGL
, libGLU
, glew
, freeglut
, libv4l
, libX11
, file
 }:

stdenv.mkDerivation rec {
  pname = "gem-unstable";
  # The patch below applies to the latest release (v0.94), but then the build
  # fails. I didn't track down what changed between that version and the
  # current master that fixes the build on Nix
  version = "2020-03-26";

  src = fetchFromGitHub {
    owner = "umlaeute";
    repo = "Gem";
    rev = "f38748d71bfca00e4d2b2f31d6c4e3759c03d599";
    sha256 = "0bkky5fk0a836bapslrgzil272iq9y704y7hw254cfq5ffjd4qjy";
  };

  patches = [
    # Update autoconf OpenGL/GLU/GLUT detection scripts
    # https://github.com/umlaeute/Gem/pull/251
    (fetchpatch {
      url = "https://github.com/umlaeute/Gem/commit/343a486c2b5c3427696f77aeabdff440e6590fc7.diff";
      sha256 = "0gkzxv80rgg8lgp9av5qp6xng3ldhnbjz9d6r7ym784fw8yx41yj";
    })
  ];

  nativeBuildInputs = [
    autoreconfHook
    file
    pkg-config
  ];

  buildInputs = [
    puredata
    libGL
    libGLU
    glew
    freeglut
    libv4l
    libX11
  ];

  meta = {
    description = "Graphics Environment for Multimedia";
    homepage = "http://puredata.info/downloads/gem";
    license = stdenv.lib.licenses.gpl2Plus;
    maintainers = [ stdenv.lib.maintainers.raboof ];
    platforms = stdenv.lib.platforms.linux;
  };
}