about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/graphics/opentoonz/default.nix
blob: 7fd9606f3abce96ec5457f1582a18d39e5c29d36 (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
{ boost, cmake, fetchFromGitHub, freeglut, freetype, glew, libjpeg, libmypaint
, libpng, libtiff, libusb1, lz4, xz, lzo, openblas, opencv, pkg-config, qtbase
, qtmultimedia, qtscript, qtserialport, 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
    xz
    lzo
    openblas
    opencv
    qtbase
    qtmultimedia
    qtscript
    qtserialport
    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 ];
  };
}