about summary refs log tree commit diff
path: root/nixpkgs/doc/languages-frameworks/qt.xml
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-09-20 19:56:04 +0000
committerAlyssa Ross <hi@alyssa.is>2019-09-28 14:40:49 +0000
commit36bedbe5c162bab9e7ef702f353ae399fdfd0518 (patch)
treefb2926eee09fe0714683074758276739e9e5cda9 /nixpkgs/doc/languages-frameworks/qt.xml
parent47852a9ef0e62a2d565f9ec0fba2a3ae77c44221 (diff)
parent262b328b0bad0c4b97ed495679208e4a2eb87704 (diff)
downloadnixlib-36bedbe5c162bab9e7ef702f353ae399fdfd0518.tar
nixlib-36bedbe5c162bab9e7ef702f353ae399fdfd0518.tar.gz
nixlib-36bedbe5c162bab9e7ef702f353ae399fdfd0518.tar.bz2
nixlib-36bedbe5c162bab9e7ef702f353ae399fdfd0518.tar.lz
nixlib-36bedbe5c162bab9e7ef702f353ae399fdfd0518.tar.xz
nixlib-36bedbe5c162bab9e7ef702f353ae399fdfd0518.tar.zst
nixlib-36bedbe5c162bab9e7ef702f353ae399fdfd0518.zip
Merge commit '262b328b0bad0c4b97ed495679208e4a2eb87704'
Diffstat (limited to 'nixpkgs/doc/languages-frameworks/qt.xml')
-rw-r--r--nixpkgs/doc/languages-frameworks/qt.xml124
1 files changed, 44 insertions, 80 deletions
diff --git a/nixpkgs/doc/languages-frameworks/qt.xml b/nixpkgs/doc/languages-frameworks/qt.xml
index 3332ce8c06e4..8d97de504ad3 100644
--- a/nixpkgs/doc/languages-frameworks/qt.xml
+++ b/nixpkgs/doc/languages-frameworks/qt.xml
@@ -4,16 +4,12 @@
  <title>Qt</title>
 
  <para>
-   This section describes the differences between Nix expressions for Qt
-   libraries and applications and Nix expressions for other C++ software. Some
-   knowledge of the latter is assumed. There are primarily two problems which
-   the Qt infrastructure is designed to address: ensuring consistent versioning
-   of all dependencies and finding dependencies at runtime.
+  This section describes the differences between Nix expressions for Qt libraries and applications and Nix expressions for other C++ software. Some knowledge of the latter is assumed. There are primarily two problems which the Qt infrastructure is designed to address: ensuring consistent versioning of all dependencies and finding dependencies at runtime.
  </para>
 
  <example xml:id='qt-default-nix'>
-   <title>Nix expression for a Qt package (<filename>default.nix</filename>)</title>
-   <programlisting>
+  <title>Nix expression for a Qt package (<filename>default.nix</filename>)</title>
+<programlisting>
 { mkDerivation, lib, qtbase }: <co xml:id='qt-default-nix-co-1' />
 
 mkDerivation { <co xml:id='qt-default-nix-co-2' />
@@ -26,53 +22,36 @@ mkDerivation { <co xml:id='qt-default-nix-co-2' />
  </example>
 
  <calloutlist>
-   <callout arearefs='qt-default-nix-co-1'>
-     <para>
-       Import <literal>mkDerivation</literal> and Qt (such as
-       <literal>qtbase</literal> modules directly. <emphasis>Do not</emphasis>
-       import Qt package sets; the Qt versions of dependencies may not be
-       coherent, causing build and runtime failures.
-     </para>
-   </callout>
-   <callout arearefs='qt-default-nix-co-2'>
-     <para>
-       Use <literal>mkDerivation</literal> instead of
-       <literal>stdenv.mkDerivation</literal>. <literal>mkDerivation</literal>
-       is a wrapper around <literal>stdenv.mkDerivation</literal> which
-       applies some Qt-specific settings.
-       This deriver accepts the same arguments as
-       <literal>stdenv.mkDerivation</literal>; refer to
-       <xref linkend='chap-stdenv' /> for details.
-     </para>
-     <para>
-       To use another deriver instead of
-       <literal>stdenv.mkDerivation</literal>, use
-       <literal>mkDerivationWith</literal>:
+  <callout arearefs='qt-default-nix-co-1'>
+   <para>
+    Import <literal>mkDerivation</literal> and Qt (such as <literal>qtbase</literal> modules directly. <emphasis>Do not</emphasis> import Qt package sets; the Qt versions of dependencies may not be coherent, causing build and runtime failures.
+   </para>
+  </callout>
+  <callout arearefs='qt-default-nix-co-2'>
+   <para>
+    Use <literal>mkDerivation</literal> instead of <literal>stdenv.mkDerivation</literal>. <literal>mkDerivation</literal> is a wrapper around <literal>stdenv.mkDerivation</literal> which applies some Qt-specific settings. This deriver accepts the same arguments as <literal>stdenv.mkDerivation</literal>; refer to <xref linkend='chap-stdenv' /> for details.
+   </para>
+   <para>
+    To use another deriver instead of <literal>stdenv.mkDerivation</literal>, use <literal>mkDerivationWith</literal>:
 <programlisting>
 mkDerivationWith myDeriver {
   # ...
 }
 </programlisting>
-       If you cannot use <literal>mkDerivationWith</literal>, please refer to
-       <xref linkend='qt-runtime-dependencies' />.
-     </para>
-   </callout>
-   <callout arearefs='qt-default-nix-co-3'>
-     <para>
-       <literal>mkDerivation</literal> accepts the same arguments as
-       <literal>stdenv.mkDerivation</literal>, such as
-       <literal>buildInputs</literal>.
-     </para>
-   </callout>
+    If you cannot use <literal>mkDerivationWith</literal>, please refer to <xref linkend='qt-runtime-dependencies' />.
+   </para>
+  </callout>
+  <callout arearefs='qt-default-nix-co-3'>
+   <para>
+    <literal>mkDerivation</literal> accepts the same arguments as <literal>stdenv.mkDerivation</literal>, such as <literal>buildInputs</literal>.
+   </para>
+  </callout>
  </calloutlist>
 
  <formalpara xml:id='qt-runtime-dependencies'>
-   <title>Locating runtime dependencies</title>
-   <para>
-     Qt applications need to be wrapped to find runtime dependencies.  If you
-     cannot use <literal>mkDerivation</literal> or
-     <literal>mkDerivationWith</literal> above, include
-     <literal>wrapQtAppsHook</literal> in <literal>nativeBuildInputs</literal>:
+  <title>Locating runtime dependencies</title>
+  <para>
+   Qt applications need to be wrapped to find runtime dependencies. If you cannot use <literal>mkDerivation</literal> or <literal>mkDerivationWith</literal> above, include <literal>wrapQtAppsHook</literal> in <literal>nativeBuildInputs</literal>:
 <programlisting>
 stdenv.mkDerivation {
   # ...
@@ -80,13 +59,11 @@ stdenv.mkDerivation {
   nativeBuildInputs = [ wrapQtAppsHook ];
 }
 </programlisting>
-   </para>
+  </para>
  </formalpara>
 
  <para>
-   Entries added to <literal>qtWrapperArgs</literal> are used to modify the
-   wrappers created by <literal>wrapQtAppsHook</literal>. The entries are
-   passed as arguments to <xref linkend='fun-wrapProgram' />.
+  Entries added to <literal>qtWrapperArgs</literal> are used to modify the wrappers created by <literal>wrapQtAppsHook</literal>. The entries are passed as arguments to <xref linkend='fun-wrapProgram' />.
 <programlisting>
 mkDerivation {
   # ...
@@ -97,10 +74,7 @@ mkDerivation {
  </para>
 
  <para>
-  Set <literal>dontWrapQtApps</literal> to stop applications from being
-  wrapped automatically. It is required to wrap applications manually with
-  <literal>wrapQtApp</literal>, using the syntax of
-  <xref linkend='fun-wrapProgram' />:
+  Set <literal>dontWrapQtApps</literal> to stop applications from being wrapped automatically. It is required to wrap applications manually with <literal>wrapQtApp</literal>, using the syntax of <xref linkend='fun-wrapProgram' />:
 <programlisting>
 mkDerivation {
   # ...
@@ -115,16 +89,12 @@ mkDerivation {
 
  <note>
   <para>
-    <literal>wrapQtAppsHook</literal> ignores files that are non-ELF executables.
-    This means that scripts won't be automatically wrapped so you'll need to manually
-    wrap them as previously mentioned. An example of when you'd always need to do this
-    is with Python applications that use PyQT.
+   <literal>wrapQtAppsHook</literal> ignores files that are non-ELF executables. This means that scripts won't be automatically wrapped so you'll need to manually wrap them as previously mentioned. An example of when you'd always need to do this is with Python applications that use PyQT.
   </para>
  </note>
 
  <para>
-  Libraries are built with every available version of Qt. Use the <literal>meta.broken</literal>
-  attribute to disable the package for unsupported Qt versions:
+  Libraries are built with every available version of Qt. Use the <literal>meta.broken</literal> attribute to disable the package for unsupported Qt versions:
 <programlisting>
 mkDerivation {
   # ...
@@ -136,13 +106,11 @@ mkDerivation {
  </para>
 
  <formalpara>
-   <title>Adding a library to Nixpkgs</title>
-   <para>
-     Add a Qt library to <filename>all-packages.nix</filename> by adding it to the
-     collection inside <literal>mkLibsForQt5</literal>. This ensures that the
-     library is built with every available version of Qt as needed.
-     <example xml:id='qt-library-all-packages-nix'>
-       <title>Adding a Qt library to <filename>all-packages.nix</filename></title>
+  <title>Adding a library to Nixpkgs</title>
+  <para>
+   Add a Qt library to <filename>all-packages.nix</filename> by adding it to the collection inside <literal>mkLibsForQt5</literal>. This ensures that the library is built with every available version of Qt as needed.
+   <example xml:id='qt-library-all-packages-nix'>
+    <title>Adding a Qt library to <filename>all-packages.nix</filename></title>
 <programlisting>
 {
   # ...
@@ -156,19 +124,16 @@ mkDerivation {
   # ...
 }
 </programlisting>
-     </example>
-   </para>
+   </example>
+  </para>
  </formalpara>
 
  <formalpara>
-   <title>Adding an application to Nixpkgs</title>
-   <para>
-     Add a Qt application to <filename>all-packages.nix</filename> using
-     <literal>libsForQt5.callPackage</literal> instead of the usual
-     <literal>callPackage</literal>. The former ensures that all dependencies
-     are built with the same version of Qt.
-     <example xml:id='qt-application-all-packages-nix'>
-       <title>Adding a Qt application to <filename>all-packages.nix</filename></title>
+  <title>Adding an application to Nixpkgs</title>
+  <para>
+   Add a Qt application to <filename>all-packages.nix</filename> using <literal>libsForQt5.callPackage</literal> instead of the usual <literal>callPackage</literal>. The former ensures that all dependencies are built with the same version of Qt.
+   <example xml:id='qt-application-all-packages-nix'>
+    <title>Adding a Qt application to <filename>all-packages.nix</filename></title>
 <programlisting>
 {
   # ...
@@ -178,8 +143,7 @@ mkDerivation {
   # ...
 }
 </programlisting>
-     </example>
-   </para>
+   </example>
+  </para>
  </formalpara>
-
 </section>