about summary refs log tree commit diff
path: root/pkgs/misc/screensavers/electricsheep/default.nix
blob: feef4e156e571972c4e4c216fb0c837b58d42ba8 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, wxGTK32
, ffmpeg_4
, lua5_1
, curl
, libpng
, xorg
, pkg-config
, flam3
, libgtop
, boost
, tinyxml
, freeglut
, libGLU
, libGL
, glee
}:

stdenv.mkDerivation rec {
  pname = "electricsheep";
  version = "3.0.2-2019-10-05";

  src = fetchFromGitHub {
    owner = "scottdraves";
    repo = pname;
    rev = "37ba0fd692d6581f8fe009ed11c9650cd8174123";
    sha256 = "sha256-v/+2dxOY/p6wNAywcFHUAfsZEJw31Syu2MacN/KeyWg=";
  };

  nativeBuildInputs = [ autoreconfHook pkg-config ];

  buildInputs = [
    wxGTK32
    ffmpeg_4
    lua5_1
    curl
    libpng
    xorg.libXrender
    flam3
    libgtop
    boost
    tinyxml
    freeglut
    libGLU
    libGL
    glee
  ];

  preAutoreconf = ''
    cd client_generic
    sed -i '/ACX_PTHREAD/d' configure.ac
  '';

  configureFlags = [
    "CPPFLAGS=-I${glee}/include/GL"
  ];

  makeFlags = [
    ''CXXFLAGS+="-DGL_GLEXT_PROTOTYPES"''
  ];

  preBuild = ''
    sed -i "s|/usr|$out|" Makefile
  '';

  meta = with lib; {
    description = "Electric Sheep, a distributed screen saver for evolving artificial organisms";
    homepage = "https://electricsheep.org/";
    maintainers = with maintainers; [ ];
    platforms = platforms.linux;
    license = licenses.gpl2Only;
  };
}