nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 155 lines 2.8 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 pkg-config, 6 autoreconfHook, 7 wrapGAppsHook3, 8 9 boost, 10 cairo, 11 gettext, 12 glibmm, 13 gtk3, 14 gtkmm3, 15 libjack2, 16 libsigcxx, 17 libxmlxx, 18 mlt, 19 pango, 20 imagemagick, 21 intltool, 22 adwaita-icon-theme, 23 harfbuzz, 24 freetype, 25 fribidi, 26 openexr, 27 fftw, 28}: 29 30let 31 version = "1.5.3"; 32 src = fetchFromGitHub { 33 owner = "synfig"; 34 repo = "synfig"; 35 rev = "v${version}"; 36 hash = "sha256-D+FUEyzJ74l0USq3V9HIRAfgyJfRP372aEKDqF8+hsQ="; 37 }; 38 39 ETL = stdenv.mkDerivation { 40 pname = "ETL"; 41 inherit version src; 42 43 sourceRoot = "${src.name}/ETL"; 44 45 nativeBuildInputs = [ 46 pkg-config 47 autoreconfHook 48 ]; 49 buildInputs = [ 50 glibmm 51 ]; 52 }; 53 54 synfig = stdenv.mkDerivation { 55 pname = "synfig"; 56 inherit version src; 57 58 sourceRoot = "${src.name}/synfig-core"; 59 60 configureFlags = [ 61 "--with-boost=${boost.dev}" 62 "--with-boost-libdir=${boost.out}/lib" 63 ] 64 ++ lib.optionals stdenv.cc.isClang [ 65 # Newer versions of clang default to C++17, but synfig and some of its dependencies use deprecated APIs that 66 # are removed in C++17. Setting the language version to C++14 allows it to build. 67 "CXXFLAGS=-std=c++14" 68 ]; 69 70 enableParallelBuilding = true; 71 72 nativeBuildInputs = [ 73 pkg-config 74 autoreconfHook 75 gettext 76 intltool 77 ]; 78 buildInputs = [ 79 ETL 80 boost 81 cairo 82 glibmm 83 mlt 84 libsigcxx 85 libxmlxx 86 pango 87 imagemagick 88 harfbuzz 89 freetype 90 fribidi 91 openexr 92 fftw 93 ]; 94 }; 95in 96stdenv.mkDerivation { 97 pname = "synfigstudio"; 98 inherit version src; 99 100 sourceRoot = "${src.name}/synfig-studio"; 101 102 postPatch = '' 103 patchShebangs images/splash_screen_development.sh 104 ''; 105 106 preConfigure = '' 107 ./bootstrap.sh 108 ''; 109 110 configureFlags = lib.optionals stdenv.cc.isClang [ 111 # Newer versions of clang default to C++17, but synfig and some of its dependencies use deprecated APIs that 112 # are removed in C++17. Setting the language version to C++14 allows it to build. 113 "CXXFLAGS=-std=c++14" 114 ]; 115 116 nativeBuildInputs = [ 117 pkg-config 118 autoreconfHook 119 gettext 120 intltool 121 wrapGAppsHook3 122 ]; 123 buildInputs = [ 124 ETL 125 synfig 126 boost 127 cairo 128 glibmm 129 gtk3 130 gtkmm3 131 imagemagick 132 libjack2 133 libsigcxx 134 libxmlxx 135 mlt 136 adwaita-icon-theme 137 openexr 138 fftw 139 ]; 140 141 enableParallelBuilding = true; 142 143 passthru = { 144 # Expose libraries and cli tools 145 inherit ETL synfig; 146 }; 147 148 meta = { 149 description = "2D animation program"; 150 homepage = "https://www.synfig.org"; 151 license = lib.licenses.gpl3Plus; 152 maintainers = [ ]; 153 platforms = lib.platforms.linux ++ lib.platforms.darwin; 154 }; 155}