From 747ad4befd7ceae21f0620bf3b2ac7dfe57d89c9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 30 Mar 2017 23:21:17 +0200 Subject: [PATCH] mlt: Remove some -dev paths from the closure This reduces the closure size of mlt-qt5 from 683 to 278 MiB. --- pkgs/development/libraries/mlt/default.nix | 5 +++++ pkgs/development/libraries/mlt/qt-5.nix | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/pkgs/development/libraries/mlt/default.nix b/pkgs/development/libraries/mlt/default.nix index 2e51492f142e..a28936fee491 100644 --- a/pkgs/development/libraries/mlt/default.nix +++ b/pkgs/development/libraries/mlt/default.nix @@ -32,6 +32,11 @@ stdenv.mkDerivation rec { postInstall = '' wrapProgram $out/bin/melt --prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1 + + # Remove an unnecessary reference to movit.dev. + s=${movit.dev}/include + t=$(for ((i = 0; i < ''${#s}; i++)); do echo -n X; done) + sed -i $out/lib/mlt/libmltopengl.so -e "s|$s|$t|g" ''; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/mlt/qt-5.nix b/pkgs/development/libraries/mlt/qt-5.nix index 5b255bd2d2b0..1d56d58c68d3 100644 --- a/pkgs/development/libraries/mlt/qt-5.nix +++ b/pkgs/development/libraries/mlt/qt-5.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { ladspa-sdk ]; + outputs = [ "out" "dev" ]; + # Mostly taken from: # http://www.kdenlive.org/user-manual/downloading-and-installing-kdenlive/installing-source/installing-mlt-rendering-engine configureFlags = [ @@ -31,6 +33,16 @@ stdenv.mkDerivation rec { postInstall = '' wrapProgram $out/bin/melt --prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1 + + # Remove an unnecessary reference to movit.dev. + s=${movit.dev}/include + t=$(for ((i = 0; i < ''${#s}; i++)); do echo -n X; done) + sed -i $out/lib/mlt/libmltopengl.so -e "s|$s|$t|g" + + # Remove an unnecessary reference to movit.dev. + s=${qtbase.dev}/include + t=$(for ((i = 0; i < ''${#s}; i++)); do echo -n X; done) + sed -i $out/lib/mlt/libmltqt.so -e "s|$s|$t|g" ''; passthru = {