From e40d568daacce179c51a32b43fabb280ce171175 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 18 Jun 2019 02:37:27 +0200 Subject: [PATCH 1/3] ffado: prevent build tools from leaking into closure FFADO stored paths to various build dependencies and libraries like gcc or pyuic5 (from PyQT) in $out/lib/libffado/static_info.txt, thus bringing them into the runtime closure. With Nix, this information is not really critical, as we can find out the exact dependencies from .drv files in Nix store. This alone reduced the closure size from 914866184B to 132341176B. --- pkgs/os-specific/linux/ffado/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/os-specific/linux/ffado/default.nix b/pkgs/os-specific/linux/ffado/default.nix index 3b3d5605248..cdf8d8d2de5 100644 --- a/pkgs/os-specific/linux/ffado/default.nix +++ b/pkgs/os-specific/linux/ffado/default.nix @@ -53,6 +53,11 @@ in stdenv.mkDerivation rec { enableParallelBuilding = true; + postInstall = '' + # prevent build tools from leaking into closure + echo 'See `nix-store --query --tree ${placeholder "out"}`.' > $out/lib/libffado/static_info.txt + ''; + meta = with stdenv.lib; { homepage = http://www.ffado.org; description = "FireWire audio drivers"; From 8e7cea5cb8416adac27a375723d1d208fefe0cf5 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 18 Jun 2019 03:10:05 +0200 Subject: [PATCH 2/3] libxmlxx3: split out dev output --- pkgs/development/libraries/libxmlxx/v3.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/libxmlxx/v3.nix b/pkgs/development/libraries/libxmlxx/v3.nix index 5e1e947b8f7..5b87c48a9bd 100644 --- a/pkgs/development/libraries/libxmlxx/v3.nix +++ b/pkgs/development/libraries/libxmlxx/v3.nix @@ -1,16 +1,15 @@ { stdenv, fetchurl, pkgconfig, libxml2, glibmm, perl }: stdenv.mkDerivation rec { - name = "libxml++-${maj_ver}.${min_ver}"; - maj_ver = "3.0"; - min_ver = "1"; + pname = "libxml++"; + version = "3.0.1"; src = fetchurl { - url = "mirror://gnome/sources/libxml++/${maj_ver}/${name}.tar.xz"; + url = "mirror://gnome/sources/libxml++/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "19kik79fmg61nv0by0a5f9wchrcfjwzvih4v2waw01hqflhqvp0r"; }; - outputs = [ "out" "devdoc" ]; + outputs = [ "out" "dev" "devdoc" ]; nativeBuildInputs = [ pkgconfig perl ]; From cf41cb2b4accb45d5e8514b5d97e63945800ed88 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 18 Jun 2019 03:16:05 +0200 Subject: [PATCH 3/3] libxmlxx3: split out doc output --- pkgs/development/libraries/libxmlxx/v3.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libxmlxx/v3.nix b/pkgs/development/libraries/libxmlxx/v3.nix index 5b87c48a9bd..94c2ca09582 100644 --- a/pkgs/development/libraries/libxmlxx/v3.nix +++ b/pkgs/development/libraries/libxmlxx/v3.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "19kik79fmg61nv0by0a5f9wchrcfjwzvih4v2waw01hqflhqvp0r"; }; - outputs = [ "out" "dev" "devdoc" ]; + outputs = [ "out" "dev" "doc" "devdoc" ]; nativeBuildInputs = [ pkgconfig perl ]; @@ -17,6 +17,11 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ libxml2 ]; + postFixup = '' + substituteInPlace $dev/lib/pkgconfig/libxml++-3.0.pc \ + --replace 'docdir=''${datarootdir}' "docdir=$doc/share" + ''; + meta = with stdenv.lib; { homepage = http://libxmlplusplus.sourceforge.net/; description = "C++ wrapper for the libxml2 XML parser library, version 3";