From ae09fe25e994ca6fe51681ebfcdcf32fa2e8b769 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Mon, 18 Jun 2018 16:46:11 -0700 Subject: [PATCH] libinput: split utilities to a bin output libinput builds some executables which are useful for debugging or unusual configurations, but not necessary in normal use of the library. (See libinput(1) and the other referenced man pages.) Some of these programs require Python, which makes the closure significantly larger. Splitting /libexec/ and /bin/ to a separate "bin" output allows systems that don't need these utilities to avoid the substantial size hit. --- pkgs/development/libraries/libinput/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libinput/default.nix b/pkgs/development/libraries/libinput/default.nix index 3b4e3233d554..61c8095911f6 100644 --- a/pkgs/development/libraries/libinput/default.nix +++ b/pkgs/development/libraries/libinput/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { sha256 = "04mwl1v51b785h7q3v23hahr0qzr48qq1jzj7d3msjvgh97nr8v4"; }; - outputs = [ "out" "dev" ]; + outputs = [ "out" "dev" "bin" ]; mesonFlags = [ (mkFlag documentationSupport "documentation") @@ -31,6 +31,10 @@ stdenv.mkDerivation rec { (mkFlag testsSupport "tests") ]; + preConfigure = '' + mesonFlags="$mesonFlags --libexecdir=$bin/libexec" + ''; + nativeBuildInputs = [ pkgconfig meson ninja ] ++ optionals documentationSupport [ doxygen graphviz ] ++ optionals testsSupport [ check valgrind python3Packages.pyparsing ];