From 378a8a69065b029f0128ec86540d4de2ab5e4d5b Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Sat, 25 Jun 2022 15:47:26 +0200 Subject: [PATCH 1/2] synfigstudio: 1.0.2 -> 1.5.1, unbreak --- .../graphics/synfigstudio/default.nix | 181 +++++++++--------- pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 96 insertions(+), 89 deletions(-) diff --git a/pkgs/applications/graphics/synfigstudio/default.nix b/pkgs/applications/graphics/synfigstudio/default.nix index 57f356023360..b239c907fbd9 100644 --- a/pkgs/applications/graphics/synfigstudio/default.nix +++ b/pkgs/applications/graphics/synfigstudio/default.nix @@ -1,119 +1,128 @@ -{ lib, stdenv, fetchFromGitHub, boost, cairo, gettext, glibmm, gtk3, gtkmm3 -, libjack2, libsigcxx, libxmlxx, makeWrapper, mlt-qt5, pango, pkg-config -, imagemagick, intltool, autoreconfHook, which, gnome +{ lib +, stdenv +, fetchFromGitHub +, pkg-config +, autoreconfHook +, wrapGAppsHook + +, boost +, cairo +, gettext +, glibmm +, gtk3 +, gtkmm3 +, libjack2 +, libsigcxx +, libxmlxx +, mlt +, pango +, imagemagick +, intltool +, gnome +, harfbuzz +, freetype +, fribidi +, openexr +, fftw }: let - version = "1.0.2"; + version = "1.5.1"; + src = fetchFromGitHub { + owner = "synfig"; + repo = "synfig"; + rev = "v${version}"; + hash = "sha256-9vBYESaSgW/1FWH2uFBvPiYvxLlX0LLNnd4S7ACJcwI="; + }; ETL = stdenv.mkDerivation { - name = "ETL-0.04.19"; + pname = "ETL"; + inherit version src; - src = fetchFromGitHub { - repo = "synfig"; - owner = "synfig"; - rev = version; - sha256 = "09ldkvzczqvb1yvlibd62y56dkyprxlr0w3rk38rcs7jnrhj2cqc"; - }; + sourceRoot = "source/ETL"; - postUnpack = "sourceRoot=\${sourceRoot}/ETL/"; - - nativeBuildInputs = [ autoreconfHook ]; + nativeBuildInputs = [ + pkg-config + autoreconfHook + ]; + buildInputs = [ + glibmm + ]; }; synfig = stdenv.mkDerivation { pname = "synfig"; - inherit version; + inherit version src; - src = fetchFromGitHub { - repo = "synfig"; - owner = "synfig"; - rev = version; - sha256 = "09ldkvzczqvb1yvlibd62y56dkyprxlr0w3rk38rcs7jnrhj2cqc"; - }; - - postUnpack = "sourceRoot=\${sourceRoot}/synfig-core/"; + sourceRoot = "source/synfig-core"; configureFlags = [ "--with-boost=${boost.dev}" "--with-boost-libdir=${boost.out}/lib" ]; - nativeBuildInputs = [ pkg-config autoreconfHook gettext ]; - buildInputs = [ - ETL boost cairo glibmm mlt-qt5 libsigcxx libxmlxx pango + nativeBuildInputs = [ + pkg-config + autoreconfHook + gettext + intltool + ]; + buildInputs = [ + ETL + boost + cairo + glibmm + mlt + libsigcxx + libxmlxx + pango + imagemagick + harfbuzz + freetype + fribidi + openexr + fftw ]; - - meta.broken = true; }; in stdenv.mkDerivation { pname = "synfigstudio"; - inherit version; + inherit version src; - src = fetchFromGitHub { - repo = "synfig"; - owner = "synfig"; - rev = version; - sha256 = "09ldkvzczqvb1yvlibd62y56dkyprxlr0w3rk38rcs7jnrhj2cqc"; - }; - - postUnpack = "sourceRoot=\${sourceRoot}/synfig-studio/"; + sourceRoot = "source/synfig-studio"; postPatch = '' - for i in \ - brushlib/brushlib.hpp \ - gui/canvasview.cpp \ - gui/compview.cpp \ - gui/docks/dock_canvasspecific.cpp \ - gui/docks/dock_children.cpp \ - gui/docks/dock_curves.cpp \ - gui/docks/dock_history.cpp \ - gui/docks/dock_keyframes.cpp \ - gui/docks/dock_layergroups.cpp \ - gui/docks/dock_layers.cpp \ - gui/docks/dock_metadata.cpp \ - gui/docks/dock_params.cpp \ - gui/docks/dock_timetrack.cpp \ - gui/docks/dock_toolbox.cpp \ - gui/docks/dockable.cpp \ - gui/docks/dockdialog.cpp \ - gui/docks/dockmanager.h \ - gui/duck.h \ - gui/duckmatic.cpp \ - gui/duckmatic.h \ - gui/instance.cpp \ - gui/instance.h \ - gui/states/state_stroke.h \ - gui/states/state_zoom.cpp \ - gui/widgets/widget_curves.cpp \ - gui/workarea.cpp \ - gui/workarearenderer/workarearenderer.h \ - synfigapp/action_system.h \ - synfigapp/canvasinterface.h \ - synfigapp/instance.h \ - synfigapp/main.h \ - synfigapp/uimanager.h - do - substituteInPlace src/"$i" --replace '#include ' '#include ' - substituteInPlace src/"$i" --replace '#include ' '#include ' - substituteInPlace src/"$i" --replace '#include ' '#include ' - done + patchShebangs images/splash_screen_development.sh ''; - preConfigure = "./bootstrap.sh"; + preConfigure = '' + ./bootstrap.sh + ''; - nativeBuildInputs = [ pkg-config autoreconfHook gettext makeWrapper ]; - buildInputs = [ - ETL boost cairo glibmm gtk3 gtkmm3 imagemagick intltool - libjack2 libsigcxx libxmlxx mlt-qt5 - synfig which gnome.adwaita-icon-theme + nativeBuildInputs = [ + pkg-config + autoreconfHook + gettext + wrapGAppsHook + ]; + buildInputs = [ + ETL + synfig + boost + cairo + glibmm + gtk3 + gtkmm3 + imagemagick + intltool + libjack2 + libsigcxx + libxmlxx + mlt + gnome.adwaita-icon-theme + openexr + fftw ]; - - postInstall = '' - wrapProgram "$out/bin/synfigstudio" \ - --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" - ''; enableParallelBuilding = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 43903c555e54..9e7548b2f305 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28738,9 +28738,7 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) CoreServices Security; }; - synfigstudio = callPackage ../applications/graphics/synfigstudio { - mlt-qt5 = libsForQt514.mlt; - }; + synfigstudio = callPackage ../applications/graphics/synfigstudio { }; taxi = callPackage ../applications/networking/ftp/taxi { }; From 8f2e02bee70660df0a1827cc4142502ab5a37fb8 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Sat, 25 Jun 2022 15:48:03 +0200 Subject: [PATCH 2/2] synfigstudio.synfig,synfigstudio.ETL: expose --- pkgs/applications/graphics/synfigstudio/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/graphics/synfigstudio/default.nix b/pkgs/applications/graphics/synfigstudio/default.nix index b239c907fbd9..a77a0313223b 100644 --- a/pkgs/applications/graphics/synfigstudio/default.nix +++ b/pkgs/applications/graphics/synfigstudio/default.nix @@ -126,6 +126,11 @@ stdenv.mkDerivation { enableParallelBuilding = true; + passthru = { + # Expose libraries and cli tools + inherit ETL synfig; + }; + meta = with lib; { description = "A 2D animation program"; homepage = "http://www.synfig.org";