aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/applications/graphics/opentoonz/libtiff.nix
blob: 6663c47553e3a87c7954d6f863497a403edf1821 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Per https://github.com/opentoonz/opentoonz/blob/master/doc/how_to_build_linux.md ,
# opentoonz requires its own modified version of libtiff.  We still build it as
# a separate package
#  1. For visibility for tools like vulnix, and
#  2. To avoid a diamond-dependency problem with qt linking the normal libtiff
#     and opentoonz linking qt and this modified libtiff, we build a qt against
#     this modified libtiff as well.

{ fetchFromGitHub, libtiff }:
let source = import ./source.nix { inherit fetchFromGitHub; };
in libtiff.overrideAttrs (old: {
  inherit (source) src;
  version = source.versions.libtiff + "-opentoonz";
  postUnpack = (old.postUnpack or "") + ''
    sourceRoot="$sourceRoot/thirdparty/tiff-${source.versions.libtiff}"
  '';
  # opentoonz uses internal libtiff headers
  postInstall = (old.postInstall or "") + ''
    cp libtiff/{tif_config,tif_dir,tiffiop}.h $dev/include
  '';
})