about summary refs log tree commit diff
path: root/pkgs/applications/graphics/opentoonz/default.nix
blob: da5aa7bf6efec694b2eabe18a86f1eff9d9cad8e (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
{ boost, cmake, fetchFromGitHub, freeglut, freetype, glew, libjpeg, libmypaint
, libpng, libtiff, libusb1, lz4, lzma, lzo, openblas, pkg-config, qtbase
, qtmultimedia, qtscript, lib, stdenv, superlu, wrapQtAppsHook, }:
let source = import ./source.nix { inherit fetchFromGitHub; };
in stdenv.mkDerivation rec {
  inherit (source) src;

  pname = "opentoonz";
  version = source.versions.opentoonz;

  nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];

  buildInputs = [
    boost
    freeglut
    freetype
    glew
    libjpeg
    libmypaint
    libpng
    libtiff
    libusb1
    lz4
    lzma
    lzo
    openblas
    qtbase
    qtmultimedia
    qtscript
    superlu
  ];

  postUnpack = "sourceRoot=$sourceRoot/toonz";

  cmakeDir = "../sources";
  cmakeFlags = [
    "-DTIFF_INCLUDE_DIR=${libtiff.dev}/include"
    "-DTIFF_LIBRARY=${libtiff.out}/lib/libtiff.so"
  ];

  postInstall = ''
    sed -i '/cp -r .*stuff/a\    chmod -R u+w $HOME/.config/OpenToonz/stuff' $out/bin/opentoonz
  '';

  meta = {
    description = "Full-featured 2D animation creation software";
    homepage = "https://opentoonz.github.io/";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ chkno ];
  };
}