Merge branch 'staging-next' into staging

This commit is contained in:
Jan Tojnar 2019-09-18 21:16:01 +02:00
commit f5ef80b46d
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4
167 changed files with 11105 additions and 6483 deletions

View file

@ -485,10 +485,10 @@ nix-build <nixpkgs> --arg crossSystem '{ config = "<arch>-<os>
<xref
linkend="ssec-cross-dependency-categorization"/> are specified as
lists of derivations given to <varname>mkDerivation</varname>, as
documented in <xref linkend="ssec-stdenv-dependencies"/>. In short,
each list of dependencies for "host → target" of "foo → bar" is called
<varname>depsFooBar</varname>, with exceptions for backwards
compatibility that <varname>depsBuildHost</varname> is instead called
documented in <xref linkend="ssec-stdenv-dependencies"/>. In short, each
list of dependencies for "host → target" of "foo → bar" is called
<varname>depsFooBar</varname>, with exceptions for backwards compatibility
that <varname>depsBuildHost</varname> is instead called
<varname>nativeBuildInputs</varname> and <varname>depsHostTarget</varname>
is instead called <varname>buildInputs</varname>. Nixpkgs is now structured
so that each <varname>depsFooBar</varname> is automatically taken from
@ -507,9 +507,8 @@ nix-build &lt;nixpkgs&gt; --arg crossSystem '{ config = "&lt;arch&gt;-&lt;os&gt;
<varname>buildPackages</varname>, <varname>pkgs</varname>, and
<varname>targetPackages</varname>. Those are now redefined as aliases to
<varname>pkgsBuildHost</varname>, <varname>pkgsHostTarget</varname>, and
<varname>pkgsTargetTarget</varname>. It is acceptable, even
recommended, to use them for libraries to show that the host platform is
irrelevant.
<varname>pkgsTargetTarget</varname>. It is acceptable, even recommended, to
use them for libraries to show that the host platform is irrelevant.
</para>
<para>
@ -581,14 +580,15 @@ nix-build &lt;nixpkgs&gt; --arg crossSystem '{ config = "&lt;arch&gt;-&lt;os&gt;
<varname>pkgsHostTarget</varname> refers to the current one, and
<varname>pkgsTargetTarget</varname> refers to the next one. When there is
no previous or next stage, they instead refer to the current stage. Note
how all the invariants regarding the mapping between dependency and depending
packages' build host and target platforms are preserved.
how all the invariants regarding the mapping between dependency and
depending packages' build host and target platforms are preserved.
<varname>pkgsBuildTarget</varname> and <varname>pkgsHostHost</varname> are
more complex in that the stage fitting the requirements isn't always a
fixed chain of "prevs" and "nexts" away (modulo the "saturating"
self-references at the ends). We just special case each instead. All the primary
edges are implemented is in <filename>pkgs/stdenv/booter.nix</filename>,
and secondarily aliases in <filename>pkgs/top-level/stage.nix</filename>.
self-references at the ends). We just special case each instead. All the
primary edges are implemented is in
<filename>pkgs/stdenv/booter.nix</filename>, and secondarily aliases in
<filename>pkgs/top-level/stage.nix</filename>.
</para>
<note>
@ -645,19 +645,19 @@ nix-build &lt;nixpkgs&gt; --arg crossSystem '{ config = "&lt;arch&gt;-&lt;os&gt;
"infinite recursions" / cycles. When only package sets that don't mention
target are used, the package set forms a directed acyclic graph. This
means that all cycles that exist are confined to one stage. This means
they are a lot smaller, and easier to follow in the code or a backtrace. It
also means they are present in native and cross builds alike, and so more
likely to be caught by CI and other users.
they are a lot smaller, and easier to follow in the code or a backtrace.
It also means they are present in native and cross builds alike, and so
more likely to be caught by CI and other users.
</para>
<para>
Thirdly, it is because everything target-mentioning only exists to
accommodate compilers with lousy build systems that insist on the compiler
itself and standard library being built together. Of course that is bad
because bigger derivations means longer rebuilds. It is also problematic because
it tends to make the standard libraries less like other libraries than
they could be, complicating code and build systems alike. Because of the
other problems, and because of these innate disadvantages, compilers ought
to be packaged another way where possible.
because bigger derivations means longer rebuilds. It is also problematic
because it tends to make the standard libraries less like other libraries
than they could be, complicating code and build systems alike. Because of
the other problems, and because of these innate disadvantages, compilers
ought to be packaged another way where possible.
</para>
</note>

View file

@ -325,10 +325,9 @@ hello latest de2bf4786de6 About a minute ago 25.2MB
</term>
<listitem>
<para>
Shell commands to run while building the final layer, without access
to most of the layer contents. Changes to this layer are "on top"
of all the other layers, so can create additional directories
and files.
Shell commands to run while building the final layer, without access to
most of the layer contents. Changes to this layer are "on top" of all the
other layers, so can create additional directories and files.
</para>
</listitem>
</varlistentry>
@ -493,28 +492,23 @@ pullImage {
</calloutlist>
<para>
<literal>nix-prefetch-docker</literal> command can be used to get required
image parameters:
<literal>nix-prefetch-docker</literal> command can be used to get required
image parameters:
<screen>
<prompt>$ </prompt>nix run nixpkgs.nix-prefetch-docker -c nix-prefetch-docker --image-name mysql --image-tag 5
</screen>
Since a given <varname>imageName</varname> may transparently refer to a
manifest list of images which support multiple architectures and/or
operating systems, you can supply the <option>--os</option> and
<option>--arch</option> arguments to specify exactly which image you want.
By default it will match the OS and architecture of the host the command is
run on.
Since a given <varname>imageName</varname> may transparently refer to a
manifest list of images which support multiple architectures and/or
operating systems, you can supply the <option>--os</option> and
<option>--arch</option> arguments to specify exactly which image you want.
By default it will match the OS and architecture of the host the command is
run on.
<screen>
<prompt>$ </prompt>nix-prefetch-docker --image-name mysql --image-tag 5 --arch x86_64 --os linux
</screen>
Desired image name and tag can be set using
<option>--final-image-name</option> and <option>--final-image-tag</option>
arguments:
Desired image name and tag can be set using
<option>--final-image-name</option> and <option>--final-image-tag</option>
arguments:
<screen>
<prompt>$ </prompt>nix-prefetch-docker --image-name mysql --image-tag 5 --final-image-name eu.gcr.io/my-project/mysql --final-image-tag prod
</screen>

View file

@ -51,10 +51,10 @@ buildContainer {
<calloutlist>
<callout arearefs='ex-ociTools-buildContainer-1'>
<para>
<varname>args</varname> specifies a set of arguments to run inside the container.
This is the only required argument for <varname>buildContainer</varname>.
All referenced packages inside the derivation will be made available
inside the container
<varname>args</varname> specifies a set of arguments to run inside the
container. This is the only required argument for
<varname>buildContainer</varname>. All referenced packages inside the
derivation will be made available inside the container
</para>
</callout>
<callout arearefs='ex-ociTools-buildContainer-2'>
@ -66,8 +66,8 @@ buildContainer {
</callout>
<callout arearefs='ex-ociTools-buildContainer-3'>
<para>
<varname>readonly</varname> makes the container's rootfs read-only if it is set to true.
The default value is false <literal>false</literal>.
<varname>readonly</varname> makes the container's rootfs read-only if it
is set to true. The default value is false <literal>false</literal>.
</para>
</callout>
</calloutlist>

View file

@ -5,26 +5,53 @@
<title>Packaging GNOME applications</title>
<para>
Programs in the GNOME universe are written in various languages but they all use GObject-based libraries like GLib, GTK or GStreamer. These libraries are often modular, relying on looking into certain directories to find their modules. However, due to Nixs specific file system organization, this will fail without our intervention. Fortunately, the libraries usually allow overriding the directories through environment variables, either natively or thanks to a patch in nixpkgs. <link xlink:href="#fun-wrapProgram">Wrapping</link> the executables to ensure correct paths are available to the application constitutes a significant part of packaging a modern desktop application. In this section, we will describe various modules needed by such applications, environment variables needed to make the modules load, and finally a script that will do the work for us.
Programs in the GNOME universe are written in various languages but they all
use GObject-based libraries like GLib, GTK or GStreamer. These libraries are
often modular, relying on looking into certain directories to find their
modules. However, due to Nixs specific file system organization, this
will fail without our intervention. Fortunately, the libraries usually allow
overriding the directories through environment variables, either natively or
thanks to a patch in nixpkgs.
<link xlink:href="#fun-wrapProgram">Wrapping</link> the executables to
ensure correct paths are available to the application constitutes a
significant part of packaging a modern desktop application. In this section,
we will describe various modules needed by such applications, environment
variables needed to make the modules load, and finally a script that will do
the work for us.
</para>
<section xml:id="ssec-gnome-settings">
<title>Settings</title>
<para>
<link xlink:href="https://developer.gnome.org/gio/stable/GSettings.html">GSettings</link> API is often used for storing settings. GSettings schemas are required, to know the type and other metadata of the stored values. GLib looks for <filename>glib-2.0/schemas/gschemas.compiled</filename> files inside the directories of <envar>XDG_DATA_DIRS</envar>.
<link xlink:href="https://developer.gnome.org/gio/stable/GSettings.html">GSettings</link>
API is often used for storing settings. GSettings schemas are required, to
know the type and other metadata of the stored values. GLib looks for
<filename>glib-2.0/schemas/gschemas.compiled</filename> files inside the
directories of <envar>XDG_DATA_DIRS</envar>.
</para>
<para>
On Linux, GSettings API is implemented using <link xlink:href="https://wiki.gnome.org/Projects/dconf">dconf</link> backend. You will need to add <literal>dconf</literal> GIO module to <envar>GIO_EXTRA_MODULES</envar> variable, otherwise the <literal>memory</literal> backend will be used and the saved settings will not be persistent.
On Linux, GSettings API is implemented using
<link xlink:href="https://wiki.gnome.org/Projects/dconf">dconf</link>
backend. You will need to add <literal>dconf</literal> GIO module to
<envar>GIO_EXTRA_MODULES</envar> variable, otherwise the
<literal>memory</literal> backend will be used and the saved settings will
not be persistent.
</para>
<para>
Last you will need the dconf database D-Bus service itself. You can enable it using <option>programs.dconf.enable</option>.
Last you will need the dconf database D-Bus service itself. You can enable
it using <option>programs.dconf.enable</option>.
</para>
<para>
Some applications will also require <package>gsettings-desktop-schemas</package> for things like reading proxy configuration or user interface customization. This dependency is often not mentioned by upstream, you should grep for <literal>org.gnome.desktop</literal> and <literal>org.gnome.system</literal> to see if the schemas are needed.
Some applications will also require
<package>gsettings-desktop-schemas</package> for things like reading proxy
configuration or user interface customization. This dependency is often not
mentioned by upstream, you should grep for
<literal>org.gnome.desktop</literal> and
<literal>org.gnome.system</literal> to see if the schemas are needed.
</para>
</section>
@ -32,7 +59,16 @@
<title>Icons</title>
<para>
When an application uses icons, an icon theme should be available in <envar>XDG_DATA_DIRS</envar>. The package for the default, icon-less <link xlink:href="https://www.freedesktop.org/wiki/Software/icon-theme/">hicolor-icon-theme</link> contains <link linkend="ssec-gnome-hooks-hicolor-icon-theme">a setup hook</link> that will pick up icon themes from <literal>buildInputs</literal> and pass it to our wrapper. Unfortunately, relying on that would mean every user has to download the theme included in the package expression no matter their preference. For that reason, we leave the installation of icon theme on the user. If you use one of the desktop environments, you probably already have an icon theme installed.
When an application uses icons, an icon theme should be available in
<envar>XDG_DATA_DIRS</envar>. The package for the default, icon-less
<link xlink:href="https://www.freedesktop.org/wiki/Software/icon-theme/">hicolor-icon-theme</link>
contains <link linkend="ssec-gnome-hooks-hicolor-icon-theme">a setup
hook</link> that will pick up icon themes from
<literal>buildInputs</literal> and pass it to our wrapper. Unfortunately,
relying on that would mean every user has to download the theme included in
the package expression no matter their preference. For that reason, we
leave the installation of icon theme on the user. If you use one of the
desktop environments, you probably already have an icon theme installed.
</para>
</section>
@ -40,7 +76,12 @@
<title>GTK Themes</title>
<para>
Previously, a GTK theme needed to be in <envar>XDG_DATA_DIRS</envar>. This is no longer necessary for most programs since GTK incorporated Adwaita theme. Some programs (for example, those designed for <link xlink:href="https://elementary.io/docs/human-interface-guidelines#human-interface-guidelines">elementary HIG</link>) might require a special theme like <package>pantheon.elementary-gtk-theme</package>.
Previously, a GTK theme needed to be in <envar>XDG_DATA_DIRS</envar>. This
is no longer necessary for most programs since GTK incorporated Adwaita
theme. Some programs (for example, those designed for
<link xlink:href="https://elementary.io/docs/human-interface-guidelines#human-interface-guidelines">elementary
HIG</link>) might require a special theme like
<package>pantheon.elementary-gtk-theme</package>.
</para>
</section>
@ -48,7 +89,10 @@
<title>GObject introspection typelibs</title>
<para>
<link xlink:href="https://wiki.gnome.org/Projects/GObjectIntrospection">GObject introspection</link> allows applications to use C libraries in other languages easily. It does this through <literal>typelib</literal> files searched in <envar>GI_TYPELIB_PATH</envar>.
<link xlink:href="https://wiki.gnome.org/Projects/GObjectIntrospection">GObject
introspection</link> allows applications to use C libraries in other
languages easily. It does this through <literal>typelib</literal> files
searched in <envar>GI_TYPELIB_PATH</envar>.
</para>
</section>
@ -56,7 +100,11 @@
<title>Various plug-ins</title>
<para>
If your application uses <link xlink:href="https://gstreamer.freedesktop.org/">GStreamer</link> or <link xlink:href="https://wiki.gnome.org/Projects/Grilo">Grilo</link>, you should set <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and <envar>GRL_PLUGIN_PATH</envar>, respectively.
If your application uses
<link xlink:href="https://gstreamer.freedesktop.org/">GStreamer</link> or
<link xlink:href="https://wiki.gnome.org/Projects/Grilo">Grilo</link>, you
should set <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and
<envar>GRL_PLUGIN_PATH</envar>, respectively.
</para>
</section>
</section>
@ -65,7 +113,8 @@
<title>Onto <package>wrapGAppsHook</package></title>
<para>
Given the requirements above, the package expression would become messy quickly:
Given the requirements above, the package expression would become messy
quickly:
<programlisting>
preFixup = ''
for f in $(find $out/bin/ $out/libexec/ -type f -executable); do
@ -79,48 +128,76 @@ preFixup = ''
done
'';
</programlisting>
Fortunately, there is <package>wrapGAppsHook</package>, that does the wrapping for us. In particular, it works in conjunction with other setup hooks that will populate the variable:
Fortunately, there is <package>wrapGAppsHook</package>, that does the
wrapping for us. In particular, it works in conjunction with other setup
hooks that will populate the variable:
<itemizedlist>
<listitem xml:id="ssec-gnome-hooks-wrapgappshook">
<para>
<package>wrapGAppsHook</package> itself will add the packages <filename>share</filename> directory to <envar>XDG_DATA_DIRS</envar>.
<package>wrapGAppsHook</package> itself will add the packages
<filename>share</filename> directory to <envar>XDG_DATA_DIRS</envar>.
</para>
</listitem>
<listitem xml:id="ssec-gnome-hooks-glib">
<para>
<package>glib</package> setup hook will populate <envar>GSETTINGS_SCHEMAS_PATH</envar> and then <package>wrapGAppsHook</package> will prepend it to <envar>XDG_DATA_DIRS</envar>.
<package>glib</package> setup hook will populate
<envar>GSETTINGS_SCHEMAS_PATH</envar> and then
<package>wrapGAppsHook</package> will prepend it to
<envar>XDG_DATA_DIRS</envar>.
</para>
</listitem>
<listitem xml:id="ssec-gnome-hooks-dconf">
<para>
<package>gnome3.dconf.lib</package> is a dependency of <package>wrapGAppsHook</package>, which then also adds it to the <envar>GIO_EXTRA_MODULES</envar> variable.
<package>gnome3.dconf.lib</package> is a dependency of
<package>wrapGAppsHook</package>, which then also adds it to the
<envar>GIO_EXTRA_MODULES</envar> variable.
</para>
</listitem>
<listitem xml:id="ssec-gnome-hooks-hicolor-icon-theme">
<para>
<package>hicolor-icon-theme</package>s setup hook will add icon themes to <envar>XDG_ICON_DIRS</envar> which is prepended to <envar>XDG_DATA_DIRS</envar> by <package>wrapGAppsHook</package>.
<package>hicolor-icon-theme</package>s setup hook will add icon themes
to <envar>XDG_ICON_DIRS</envar> which is prepended to
<envar>XDG_DATA_DIRS</envar> by <package>wrapGAppsHook</package>.
</para>
</listitem>
<listitem xml:id="ssec-gnome-hooks-gobject-introspection">
<para>
<package>gobject-introspection</package> setup hook populates <envar>GI_TYPELIB_PATH</envar> variable with <filename>lib/girepository-1.0</filename> directories of dependencies, which is then added to wrapper by <package>wrapGAppsHook</package>. It also adds <filename>share</filename> directories of dependencies to <envar>XDG_DATA_DIRS</envar>, which is intended to promote GIR files but it also <link xlink:href="https://github.com/NixOS/nixpkgs/issues/32790">pollutes the closures</link> of packages using <package>wrapGAppsHook</package>.
<package>gobject-introspection</package> setup hook populates
<envar>GI_TYPELIB_PATH</envar> variable with
<filename>lib/girepository-1.0</filename> directories of dependencies,
which is then added to wrapper by <package>wrapGAppsHook</package>. It
also adds <filename>share</filename> directories of dependencies to
<envar>XDG_DATA_DIRS</envar>, which is intended to promote GIR files but
it also
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/32790">pollutes
the closures</link> of packages using <package>wrapGAppsHook</package>.
</para>
<warning>
<para>
The setup hook <link xlink:href="https://github.com/NixOS/nixpkgs/issues/56943">currently</link> does not work in expressions with <literal>strictDeps</literal> enabled, like Python packages. In those cases, you will need to disable it with <code>strictDeps = false;</code>.
The setup hook
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/56943">currently</link>
does not work in expressions with <literal>strictDeps</literal> enabled,
like Python packages. In those cases, you will need to disable it with
<code>strictDeps = false;</code>.
</para>
</warning>
</listitem>
<listitem xml:id="ssec-gnome-hooks-gst-grl-plugins">
<para>
Setup hooks of <package>gst_all_1.gstreamer</package> and <package>gnome3.grilo</package> will populate the <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and <envar>GRL_PLUGIN_PATH</envar> variables, respectively, which will then be added to the wrapper by <literal>wrapGAppsHook</literal>.
Setup hooks of <package>gst_all_1.gstreamer</package> and
<package>gnome3.grilo</package> will populate the
<envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and
<envar>GRL_PLUGIN_PATH</envar> variables, respectively, which will then
be added to the wrapper by <literal>wrapGAppsHook</literal>.
</para>
</listitem>
</itemizedlist>
</para>
<para>
You can also pass additional arguments to <literal>makeWrapper</literal> using <literal>gappsWrapperArgs</literal> in <literal>preFixup</literal> hook:
You can also pass additional arguments to <literal>makeWrapper</literal>
using <literal>gappsWrapperArgs</literal> in <literal>preFixup</literal>
hook:
<programlisting>
preFixup = ''
gappsWrapperArgs+=(
@ -138,7 +215,13 @@ preFixup = ''
<title>Updating GNOME packages</title>
<para>
Most GNOME package offer <link linkend="var-passthru-updateScript"><literal>updateScript</literal></link>, it is therefore possible to update to latest source tarball by running <command>nix-shell maintainers/scripts/update.nix --argstr package gnome3.nautilus</command> or even en masse with <command>nix-shell maintainers/scripts/update.nix --argstr path gnome3</command>. Read the packages <filename>NEWS</filename> file to see what changed.
Most GNOME package offer
<link linkend="var-passthru-updateScript"><literal>updateScript</literal></link>,
it is therefore possible to update to latest source tarball by running
<command>nix-shell maintainers/scripts/update.nix --argstr package
gnome3.nautilus</command> or even en masse with <command>nix-shell
maintainers/scripts/update.nix --argstr path gnome3</command>. Read the
packages <filename>NEWS</filename> file to see what changed.
</para>
</section>
@ -152,7 +235,17 @@ preFixup = ''
</term>
<listitem>
<para>
There are no schemas avalable in <envar>XDG_DATA_DIRS</envar>. Temporarily add a random package containing schemas like <package>gsettings-desktop-schemas</package> to <literal>buildInputs</literal>. <link linkend="ssec-gnome-hooks-glib"><package>glib</package></link> and <link linkend="ssec-gnome-hooks-wrapgappshook"><package>wrapGAppsHook</package></link> setup hooks will take care of making the schemas available to application and you will see the actual missing schemas with the <link linkend="ssec-gnome-common-issues-missing-schema">next error</link>. Or you can try looking through the source code for the actual schemas used.
There are no schemas avalable in <envar>XDG_DATA_DIRS</envar>.
Temporarily add a random package containing schemas like
<package>gsettings-desktop-schemas</package> to
<literal>buildInputs</literal>.
<link linkend="ssec-gnome-hooks-glib"><package>glib</package></link> and
<link linkend="ssec-gnome-hooks-wrapgappshook"><package>wrapGAppsHook</package></link>
setup hooks will take care of making the schemas available to application
and you will see the actual missing schemas with the
<link linkend="ssec-gnome-common-issues-missing-schema">next
error</link>. Or you can try looking through the source code for the
actual schemas used.
</para>
</listitem>
</varlistentry>
@ -162,7 +255,11 @@ preFixup = ''
</term>
<listitem>
<para>
Package is missing some GSettings schemas. You can find out the package containing the schema with <command>nix-locate <replaceable>org.gnome.foo</replaceable>.gschema.xml</command> and let the hooks handle the wrapping as <link linkend="ssec-gnome-common-issues-no-schemas">above</link>.
Package is missing some GSettings schemas. You can find out the package
containing the schema with <command>nix-locate
<replaceable>org.gnome.foo</replaceable>.gschema.xml</command> and let
the hooks handle the wrapping as
<link linkend="ssec-gnome-common-issues-no-schemas">above</link>.
</para>
</listitem>
</varlistentry>
@ -172,7 +269,14 @@ preFixup = ''
</term>
<listitem>
<para>
This is because derivers like <function>python.pkgs.buildPythonApplication</function> or <function>qt5.mkDerivation</function> have setup-hooks automatically added that produce wrappers with <package>makeWrapper</package>. The simplest way to workaround that is to disable the <package>wrapGAppsHook</package> automatic wrapping with <code>dontWrapGApps = true;</code> and pass the arguments it intended to pass to <package>makeWrapper</package> to another.
This is because derivers like
<function>python.pkgs.buildPythonApplication</function> or
<function>qt5.mkDerivation</function> have setup-hooks automatically
added that produce wrappers with <package>makeWrapper</package>. The
simplest way to workaround that is to disable the
<package>wrapGAppsHook</package> automatic wrapping with
<code>dontWrapGApps = true;</code> and pass the arguments it intended to
pass to <package>makeWrapper</package> to another.
</para>
<para>
In the case of a Python application it could look like:
@ -224,34 +328,55 @@ mkDerivation {
</term>
<listitem>
<para>
You can rely on applications depending on the library set the necessary environment variables but that it often easy to miss. Instead we recommend to patch the paths in the source code whenever possible. Here are some examples:
You can rely on applications depending on the library set the necessary
environment variables but that it often easy to miss. Instead we
recommend to patch the paths in the source code whenever possible. Here
are some examples:
<itemizedlist>
<listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gnome-shell-ext">
<para>
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix#L21-L24">Replacing a <envar>GI_TYPELIB_PATH</envar> in GNOME Shell extension</link> we are using <function>substituteAll</function> to include the path to a typelib into a patch.
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix#L21-L24">Replacing
a <envar>GI_TYPELIB_PATH</envar> in GNOME Shell extension</link>
we are using <function>substituteAll</function> to include the path to
a typelib into a patch.
</para>
</listitem>
<listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings">
<para>
The following examples are hardcoding GSettings schema paths. To get the schema paths we use the functions
The following examples are hardcoding GSettings schema paths. To get
the schema paths we use the functions
<itemizedlist>
<listitem>
<para>
<function>glib.getSchemaPath</function> Takes a nix package attribute as an argument.
<function>glib.getSchemaPath</function> Takes a nix package
attribute as an argument.
</para>
</listitem>
<listitem>
<para>
<function>glib.makeSchemaPath</function> Takes a package output like <literal>$out</literal> and a derivation name. You should use this if the schemas you need to hardcode are in the same derivation.
<function>glib.makeSchemaPath</function> Takes a package output
like <literal>$out</literal> and a derivation name. You should use
this if the schemas you need to hardcode are in the same
derivation.
</para>
</listitem>
</itemizedlist>
</para>
<para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-vala">
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/pantheon/apps/elementary-files/default.nix#L78-L86">Hard-coding GSettings schema path in Vala plug-in (dynamically loaded library)</link> here, <function>substituteAll</function> cannot be used since the schema comes from the same package preventing us from pass its path to the function, probably due to a <link xlink:href="https://github.com/NixOS/nix/issues/1846">Nix bug</link>.
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/pantheon/apps/elementary-files/default.nix#L78-L86">Hard-coding
GSettings schema path in Vala plug-in (dynamically loaded
library)</link> here, <function>substituteAll</function> cannot be
used since the schema comes from the same package preventing us from
pass its path to the function, probably due to a
<link xlink:href="https://github.com/NixOS/nix/issues/1846">Nix
bug</link>.
</para>
<para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-c">
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/29c120c065d03b000224872251bed93932d42412/pkgs/development/libraries/glib-networking/default.nix#L31-L34">Hard-coding GSettings schema path in C library</link> nothing special other than using <link xlink:href="https://github.com/NixOS/nixpkgs/pull/67957#issuecomment-527717467">Coccinelle patch</link> to generate the patch itself.
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/29c120c065d03b000224872251bed93932d42412/pkgs/development/libraries/glib-networking/default.nix#L31-L34">Hard-coding
GSettings schema path in C library</link> nothing special other
than using
<link xlink:href="https://github.com/NixOS/nixpkgs/pull/67957#issuecomment-527717467">Coccinelle
patch</link> to generate the patch itself.
</para>
</listitem>
</itemizedlist>

View file

@ -141,8 +141,8 @@ ClassC3Componentised = buildPerlPackage rec {
<para>
On Darwin, if a script has too many
<literal>-I<replaceable>dir</replaceable></literal> flags in its first line
(its “shebang line”), it will not run. This can be worked around by calling
the <literal>shortenPerlShebang</literal> function from the
(its “shebang line”), it will not run. This can be worked around by
calling the <literal>shortenPerlShebang</literal> function from the
<literal>postInstall</literal> phase:
<programlisting>
{ stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
@ -162,10 +162,10 @@ ImageExifTool = buildPerlPackage {
'';
};
</programlisting>
This will remove the <literal>-I</literal> flags from the shebang line,
rewrite them in the <literal>use lib</literal> form, and put them on the next
line instead. This function can be given any number of Perl scripts as
arguments; it will modify them in-place.
This will remove the <literal>-I</literal> flags from the shebang line,
rewrite them in the <literal>use lib</literal> form, and put them on the next
line instead. This function can be given any number of Perl scripts as
arguments; it will modify them in-place.
</para>
<section xml:id="ssec-generation-from-CPAN">

View file

@ -4,16 +4,16 @@
<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 +26,51 @@ 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 +78,13 @@ 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,8 +95,8 @@ mkDerivation {
</para>
<para>
Set <literal>dontWrapQtApps</literal> to stop applications from being
wrapped automatically. It is required to wrap applications manually with
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>
@ -115,16 +113,17 @@ 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 +135,13 @@ 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 +155,19 @@ 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 +177,7 @@ mkDerivation {
# ...
}
</programlisting>
</example>
</para>
</example>
</para>
</formalpara>
</section>

View file

@ -156,9 +156,9 @@ hello-2.3 A program that produces a familiar, friendly greeting
</term>
<listitem>
<para>
A link or a list of links to the location of Changelog for a package.
A link may use expansion to refer to the correct changelog version.
Example:
A link or a list of links to the location of Changelog for a package. A
link may use expansion to refer to the correct changelog version.
Example:
<literal>"https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${version}"</literal>
</para>
</listitem>
@ -273,8 +273,8 @@ meta.platforms = stdenv.lib.platforms.linux;
This attribute is special in that it is not actually under the
<literal>meta</literal> attribute set but rather under the
<literal>passthru</literal> attribute set. This is due to how
<literal>meta</literal> attributes work, and the fact that they
are supposed to contain only metadata, not derivations.
<literal>meta</literal> attributes work, and the fact that they are
supposed to contain only metadata, not derivations.
</para>
</warning>
<para>

View file

@ -311,7 +311,8 @@ packageOverrides = pkgs: {
<title>Elm</title>
<para>
To start a development environment do <command>nix-shell -p elmPackages.elm elmPackages.elm-format</command>
To start a development environment do <command>nix-shell -p elmPackages.elm
elmPackages.elm-format</command>
</para>
<para>
@ -506,10 +507,11 @@ stdenv.mkDerivation {
<para>
The IBus engine is based on <literal>hunspell</literal> to support
completion in many languages. By default the dictionaries
<literal>de-de</literal>, <literal>en-us</literal>, <literal>fr-moderne</literal>
<literal>es-es</literal>, <literal>it-it</literal>,
<literal>sv-se</literal> and <literal>sv-fi</literal> are in use. To add
another dictionary, the package can be overridden like this:
<literal>de-de</literal>, <literal>en-us</literal>,
<literal>fr-moderne</literal> <literal>es-es</literal>,
<literal>it-it</literal>, <literal>sv-se</literal> and
<literal>sv-fi</literal> are in use. To add another dictionary, the package
can be overridden like this:
<programlisting>ibus-engines.typing-booster.override {
langs = [ "de-at" "en-gb" ];
}</programlisting>
@ -543,47 +545,45 @@ stdenv.mkDerivation {
<title>Nginx</title>
<para>
<link xlink:href="https://nginx.org/">Nginx</link> is a
reverse proxy and lightweight webserver.
<link xlink:href="https://nginx.org/">Nginx</link> is a reverse proxy and
lightweight webserver.
</para>
<section xml:id="sec-nginx-etag">
<title>ETags on static files served from the Nix store</title>
<para>
HTTP has a couple different mechanisms for caching to prevent
clients from having to download the same content repeatedly
if a resource has not changed since the last time it was requested.
When nginx is used as a server for static files, it implements
the caching mechanism based on the
<link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified"><literal>Last-Modified</literal></link>
response header automatically; unfortunately, it works by using
filesystem timestamps to determine the value of the
<literal>Last-Modified</literal> header. This doesn't give the
desired behavior when the file is in the Nix store, because all
file timestamps are set to 0 (for reasons related to build
reproducibility).
HTTP has a couple different mechanisms for caching to prevent clients from
having to download the same content repeatedly if a resource has not
changed since the last time it was requested. When nginx is used as a
server for static files, it implements the caching mechanism based on the
<link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified"><literal>Last-Modified</literal></link>
response header automatically; unfortunately, it works by using filesystem
timestamps to determine the value of the <literal>Last-Modified</literal>
header. This doesn't give the desired behavior when the file is in the Nix
store, because all file timestamps are set to 0 (for reasons related to
build reproducibility).
</para>
<para>
Fortunately, HTTP supports an alternative (and more effective)
caching mechanism: the
Fortunately, HTTP supports an alternative (and more effective) caching
mechanism: the
<link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag"><literal>ETag</literal></link>
response header. The value of the <literal>ETag</literal> header
specifies some identifier for the particular content that the
server is sending (e.g. a hash). When a client makes a second
request for the same resource, it sends that value back in an
<literal>If-None-Match</literal> header. If the ETag value is
unchanged, then the server does not need to resend the content.
response header. The value of the <literal>ETag</literal> header specifies
some identifier for the particular content that the server is sending (e.g.
a hash). When a client makes a second request for the same resource, it
sends that value back in an <literal>If-None-Match</literal> header. If the
ETag value is unchanged, then the server does not need to resend the
content.
</para>
<para>
As of NixOS 19.09, the nginx package in Nixpkgs is patched such
that when nginx serves a file out of <filename>/nix/store</filename>,
the hash in the store path is used as the <literal>ETag</literal>
header in the HTTP response, thus providing proper caching functionality.
This happens automatically; you do not need to do modify any
configuration to get this behavior.
As of NixOS 19.09, the nginx package in Nixpkgs is patched such that when
nginx serves a file out of <filename>/nix/store</filename>, the hash in the
store path is used as the <literal>ETag</literal> header in the HTTP
response, thus providing proper caching functionality. This happens
automatically; you do not need to do modify any configuration to get this
behavior.
</para>
</section>
</section>

View file

@ -1,14 +1,10 @@
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="package-specific-user-notes">
<title>Package-specific usage notes</title>
<para>
These chapters includes some notes
that apply to specific packages and should
answer some of the frequently asked questions
related to Nixpkgs use.
Some useful information related to package use
can be found in <link linkend="chap-package-notes">package-specific development notes</link>.
These chapters includes some notes that apply to specific packages and should
answer some of the frequently asked questions related to Nixpkgs use. Some
useful information related to package use can be found in
<link linkend="chap-package-notes">package-specific development notes</link>.
</para>
<section xml:id="opengl">
<title>OpenGL</title>
@ -47,7 +43,6 @@
<literal>locales</literal> of the package.
</para>
</section>
<section xml:id="sec-emacs">
<title>Emacs</title>
@ -204,46 +199,43 @@ overrides = self: super: rec {
</screen>
</section>
</section>
<section xml:id="dlib">
<title>DLib</title>
<para>
<link xlink:href="http://dlib.net/">DLib</link> is a modern, C++-based toolkit which
provides several machine learning algorithms.
<link xlink:href="http://dlib.net/">DLib</link> is a modern, C++-based
toolkit which provides several machine learning algorithms.
</para>
<section xml:id="compiling-without-avx-support">
<title>Compiling without AVX support</title>
<para>
Especially older CPUs don't support
<link xlink:href="https://en.wikipedia.org/wiki/Advanced_Vector_Extensions">AVX</link>
(<abbrev>Advanced Vector Extensions</abbrev>) instructions that are used by DLib to
optimize their algorithms.
Especially older CPUs don't support
<link xlink:href="https://en.wikipedia.org/wiki/Advanced_Vector_Extensions">AVX</link>
(<abbrev>Advanced Vector Extensions</abbrev>) instructions that are used by
DLib to optimize their algorithms.
</para>
<para>
On the affected hardware errors like <literal>Illegal instruction</literal> will occur.
In those cases AVX support needs to be disabled:
On the affected hardware errors like <literal>Illegal instruction</literal>
will occur. In those cases AVX support needs to be disabled:
<programlisting>self: super: {
dlib = super.dlib.override { avxSupport = false; };
}</programlisting>
</para>
</section>
</section>
<section xml:id="unfree-software">
<title>Unfree software</title>
<para>
All users of Nixpkgs are free software users, and many users (and
developers) of Nixpkgs want to limit and tightly control their exposure to
unfree software. At the same time, many users need (or want)
to run some specific
pieces of proprietary software. Nixpkgs includes some expressions for unfree
software packages. By default unfree software cannot be installed and
doesnt show up in searches. To allow installing unfree software in a
unfree software. At the same time, many users need (or want) to run some
specific pieces of proprietary software. Nixpkgs includes some expressions
for unfree software packages. By default unfree software cannot be installed
and doesnt show up in searches. To allow installing unfree software in a
single Nix invocation one can export
<literal>NIXPKGS_ALLOW_UNFREE=1</literal>. For a persistent solution, users
can set <literal>allowUnfree</literal> in the Nixpkgs configuration.
@ -256,7 +248,6 @@ overrides = self: super: rec {
<literal>true</literal> for unfree packages that should be allowed.
</para>
</section>
<section xml:id="sec-steam">
<title>Steam</title>
@ -407,21 +398,24 @@ overrides = self: super: rec {
</para>
</section>
</section>
<section xml:id="sec-citrix">
<title>Citrix Receiver &amp; Citrix Workspace App</title>
<para>
<note>
<para>
Please note that the <literal>citrix_receiver</literal> package has been deprecated since its
development was <link xlink:href="https://docs.citrix.com/en-us/citrix-workspace-app.html">discontinued by upstream</link>
and has been replaced by <link xlink:href="https://www.citrix.com/products/workspace-app/">the citrix workspace app</link>.
Please note that the <literal>citrix_receiver</literal> package has been
deprecated since its development was
<link xlink:href="https://docs.citrix.com/en-us/citrix-workspace-app.html">discontinued
by upstream</link> and has been replaced by
<link xlink:href="https://www.citrix.com/products/workspace-app/">the
citrix workspace app</link>.
</para>
</note>
<link xlink:href="https://www.citrix.com/products/receiver/">Citrix Receiver</link> and
<link xlink:href="https://www.citrix.com/products/workspace-app/">Citrix Workspace App</link>
are a remote desktop viewers which provide access to
<link xlink:href="https://www.citrix.com/products/receiver/">Citrix
Receiver</link> and
<link xlink:href="https://www.citrix.com/products/workspace-app/">Citrix
Workspace App</link> are a remote desktop viewers which provide access to
<link xlink:href="https://www.citrix.com/products/xenapp-xendesktop/">XenDesktop</link>
installations.
</para>
@ -432,24 +426,24 @@ overrides = self: super: rec {
<para>
The tarball archive needs to be downloaded manually as the license
agreements of the vendor for
<link xlink:href="https://www.citrix.com/downloads/citrix-receiver/">Citrix Receiver</link>
or <link xlink:href="https://www.citrix.de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html">Citrix Workspace</link>
need to be accepted first.
Then run <command>nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz</command>.
With the archive available
in the store the package can be built and installed with Nix.
<link xlink:href="https://www.citrix.com/downloads/citrix-receiver/">Citrix
Receiver</link> or
<link xlink:href="https://www.citrix.de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html">Citrix
Workspace</link> need to be accepted first. Then run
<command>nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz</command>.
With the archive available in the store the package can be built and
installed with Nix.
</para>
<warning>
<title>Caution with <command>nix-shell</command> installs</title>
<para>
It's recommended to install <literal>Citrix Receiver</literal>
and/or <literal>Citrix Workspace</literal> using
<literal>nix-env -i</literal> or globally to
ensure that the <literal>.desktop</literal> files are installed properly
into <literal>$XDG_CONFIG_DIRS</literal>. Otherwise it won't be possible to
open <literal>.ica</literal> files automatically from the browser to start
a Citrix connection.
It's recommended to install <literal>Citrix Receiver</literal> and/or
<literal>Citrix Workspace</literal> using <literal>nix-env -i</literal> or
globally to ensure that the <literal>.desktop</literal> files are
installed properly into <literal>$XDG_CONFIG_DIRS</literal>. Otherwise it
won't be possible to open <literal>.ica</literal> files automatically from
the browser to start a Citrix connection.
</para>
</warning>
</section>
@ -458,8 +452,8 @@ overrides = self: super: rec {
<title>Custom certificates</title>
<para>
The <literal>Citrix Workspace App</literal>
in <literal>nixpkgs</literal> trust several certificates
The <literal>Citrix Workspace App</literal> in <literal>nixpkgs</literal>
trust several certificates
<link xlink:href="https://curl.haxx.se/docs/caextract.html">from the
Mozilla database</link> by default. However several companies using Citrix
might require their own corporate certificate. On distros with imperative

View file

@ -210,9 +210,11 @@
</listitem>
<listitem>
<para>
Optionally commit the new package and open a pull request <link
xlink:href="https://github.com/NixOS/nixpkgs/pulls">to nixpkgs</link>, or
use <link
Optionally commit the new package and open a pull request
<link
xlink:href="https://github.com/NixOS/nixpkgs/pulls">to
nixpkgs</link>, or use
<link
xlink:href="https://discourse.nixos.org/t/about-the-patches-category/477">
the Patches category</link> on Discourse for sending a patch without a
GitHub account.

View file

@ -736,8 +736,8 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
commit</command> or any other commands that cannot handle that.
</para>
<para>
For information about how to run the updates, execute
<command>nix-shell maintainers/scripts/update.nix</command>.
For information about how to run the updates, execute <command>nix-shell
maintainers/scripts/update.nix</command>.
</para>
</listitem>
</varlistentry>
@ -764,7 +764,8 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
to <emphasis>add</emphasis> some commands to a phase, e.g. by defining
<literal>postInstall</literal> or <literal>preFixup</literal>, as skipping
some of the default actions may have unexpected consequences. The default
script for each phase is defined in the file <filename>pkgs/stdenv/generic/setup.sh</filename>.
script for each phase is defined in the file
<filename>pkgs/stdenv/generic/setup.sh</filename>.
</para>
<section xml:id="ssec-controlling-phases">
@ -786,7 +787,8 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
set, the default value is used, which is <literal>$prePhases
unpackPhase patchPhase $preConfigurePhases configurePhase
$preBuildPhases buildPhase checkPhase $preInstallPhases installPhase
fixupPhase installCheckPhase $preDistPhases distPhase $postPhases</literal>.
fixupPhase installCheckPhase $preDistPhases distPhase
$postPhases</literal>.
</para>
<para>
Usually, if you just want to add a few phases, its more convenient
@ -1605,7 +1607,7 @@ installTargets = "install-bin install-doc";</programlisting>
</term>
<listitem>
<para>
Set to true to skip the fixup phase.
Set to true to skip the fixup phase.
</para>
</listitem>
</varlistentry>
@ -2411,12 +2413,12 @@ addEnvHooks "$hostOffset" myBashFunction
<para>
The Bintools Wrapper was only just recently split off from CC Wrapper,
so the division of labor is still being worked out. For example, it
shouldn't care about the C standard library, but just take a
derivation with the dynamic loader (which happens to be the glibc on
linux). Dependency finding however is a task both wrappers will continue
to need to share, and probably the most important to understand. It is
currently accomplished by collecting directories of host-platform
dependencies (i.e. <varname>buildInputs</varname> and
shouldn't care about the C standard library, but just take a derivation
with the dynamic loader (which happens to be the glibc on linux).
Dependency finding however is a task both wrappers will continue to need
to share, and probably the most important to understand. It is currently
accomplished by collecting directories of host-platform dependencies
(i.e. <varname>buildInputs</varname> and
<varname>nativeBuildInputs</varname>) in environment variables. The
Bintools Wrapper's setup hook causes any <filename>lib</filename> and
<filename>lib64</filename> subdirectories to be added to
@ -2633,7 +2635,8 @@ addEnvHooks "$hostOffset" myBashFunction
</term>
<listitem>
<para>
Hooks related to GNOME platform and related libraries like GLib, GTK and GStreamer are described in <xref linkend="sec-language-gnome" />.
Hooks related to GNOME platform and related libraries like GLib, GTK and
GStreamer are described in <xref linkend="sec-language-gnome" />.
</para>
</listitem>
</varlistentry>
@ -2688,12 +2691,12 @@ addEnvHooks "$hostOffset" myBashFunction
At <filename>/var/lib/cntr</filename> the sandboxed filesystem is
mounted. All commands and files of the system are still accessible
within the shell. To execute commands from the sandbox use the cntr exec
subcommand. <command>cntr</command> is only supported
on Linux-based platforms. To use it first add <literal>cntr</literal> to
your <literal>environment.systemPackages</literal> on NixOS or
alternatively to the root user on non-NixOS systems. Then in the package
that is supposed to be inspected, add <literal>breakpointHook</literal>
to <literal>nativeBuildInputs</literal>.
subcommand. <command>cntr</command> is only supported on Linux-based
platforms. To use it first add <literal>cntr</literal> to your
<literal>environment.systemPackages</literal> on NixOS or alternatively
to the root user on non-NixOS systems. Then in the package that is
supposed to be inspected, add <literal>breakpointHook</literal> to
<literal>nativeBuildInputs</literal>.
<programlisting>
nativeBuildInputs = [ breakpointHook ];
</programlisting>
@ -2703,11 +2706,11 @@ nativeBuildInputs = [ breakpointHook ];
<note>
<title>Caution with remote builds</title>
<para>
This won't work with remote builds as the build environment is on
a different machine and can't be accessed by <command>cntr</command>.
Remote builds can be turned off by setting <literal>--option builders ''</literal>
for <command>nix-build</command> or <literal>--builders ''</literal> for
<command>nix build</command>.
This won't work with remote builds as the build environment is on a
different machine and can't be accessed by <command>cntr</command>.
Remote builds can be turned off by setting <literal>--option builders
''</literal> for <command>nix-build</command> or <literal>--builders
''</literal> for <command>nix build</command>.
</para>
</note>
</listitem>
@ -2806,17 +2809,78 @@ postInstall = ''
</varlistentry>
<varlistentry>
<term>
meson
Meson
</term>
<listitem>
<para>
Overrides the configure phase to run meson to generate Ninja files. You
can disable this behavior by setting configurePhase to a custom value,
or by setting dontUseMesonConfigure. To run these files, you should
accompany meson with ninja. mesonFlags controls only the flags passed to
meson. By default, parallel building is enabled as Meson supports
Overrides the configure phase to run meson to generate Ninja files. To
run these files, you should accompany Meson with ninja. By default,
<varname>enableParallelBuilding</varname> is enabled as Meson supports
parallel building almost everywhere.
</para>
<variablelist>
<title>Variables controlling Meson</title>
<varlistentry>
<term>
<varname>mesonFlags</varname>
</term>
<listitem>
<para>
Controls the flags passed to meson.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>mesonBuildType</varname>
</term>
<listitem>
<para>
Which
<link
xlink:href="https://mesonbuild.com/Builtin-options.html#core-options"><command>--buildtype</command></link>
to pass to Meson. We default to <literal>plain</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>mesonAutoFeatures</varname>
</term>
<listitem>
<para>
What value to set
<link
xlink:href="https://mesonbuild.com/Builtin-options.html#core-options"><command>-Dauto_features=</command></link>
to. We default to <command>enabled</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>mesonWrapMode</varname>
</term>
<listitem>
<para>
What value to set
<link
xlink:href="https://mesonbuild.com/Builtin-options.html#core-options"><command>-Dwrap_mode=</command></link>
to. We default to <command>nodownload</command> as we disallow
network access.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>dontUseMesonConfigure</varname>
</term>
<listitem>
<para>
Disables using Meson's <varname>configurePhase</varname>.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
@ -2851,8 +2915,8 @@ postInstall = ''
<para>
Overrides the configure, build, and install phases. This will run the
"waf" script used by many projects. If wafPath (default ./waf) doesnt
exist, it will copy the version of waf available in Nixpkgs. wafFlags can
be used to pass flags to the waf script.
exist, it will copy the version of waf available in Nixpkgs. wafFlags
can be used to pass flags to the waf script.
</para>
</listitem>
</varlistentry>

View file

@ -157,6 +157,8 @@ in
# terminal instead of logging out of X11).
environment.variables = config.environment.sessionVariables;
environment.profileRelativeEnvVars = config.environment.profileRelativeSessionVariables;
environment.shellAliases = mapAttrs (name: mkDefault) {
ls = "ls --color=tty";
ll = "ls -l";

View file

@ -8,6 +8,11 @@ let
cfg = config.environment;
pamProfiles =
map
(replaceStrings ["$HOME" "$USER"] ["@{HOME}" "@{PAM_USER}"])
cfg.profiles;
in
{
@ -18,25 +23,76 @@ in
default = {};
description = ''
A set of environment variables used in the global environment.
These variables will be set by PAM.
The value of each variable can be either a string or a list of
strings. The latter is concatenated, interspersed with colon
characters.
These variables will be set by PAM early in the login process.
The value of each session variable can be either a string or a
list of strings. The latter is concatenated, interspersed with
colon characters.
Note, due to limitations in the PAM format values may not
contain the <literal>"</literal> character.
Also, these variables are merged into
<xref linkend="opt-environment.variables"/> and it is
therefore not possible to use PAM style variables such as
<code>@{HOME}</code>.
'';
type = with types; attrsOf (either str (listOf str));
apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else v);
};
environment.profileRelativeSessionVariables = mkOption {
type = types.attrsOf (types.listOf types.str);
example = { PATH = [ "/bin" ]; MANPATH = [ "/man" "/share/man" ]; };
description = ''
Attribute set of environment variable used in the global
environment. These variables will be set by PAM early in the
login process.
Variable substitution is available as described in
<citerefentry>
<refentrytitle>pam_env.conf</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry>.
Each attribute maps to a list of relative paths. Each relative
path is appended to the each profile of
<option>environment.profiles</option> to form the content of
the corresponding environment variable.
Also, these variables are merged into
<xref linkend="opt-environment.profileRelativeEnvVars"/> and it is
therefore not possible to use PAM style variables such as
<code>@{HOME}</code>.
'';
};
};
config = {
system.build.pamEnvironment = pkgs.writeText "pam-environment"
''
${concatStringsSep "\n" (
(mapAttrsToList (n: v: ''${n}="${concatStringsSep ":" v}"'')
(zipAttrsWith (const concatLists) ([ (mapAttrs (n: v: [ v ]) cfg.sessionVariables) ]))))}
'';
system.build.pamEnvironment =
let
suffixedVariables =
flip mapAttrs cfg.profileRelativeSessionVariables (envVar: suffixes:
flip concatMap pamProfiles (profile:
map (suffix: "${profile}${suffix}") suffixes
)
);
pamVariable = n: v:
''${n} DEFAULT="${concatStringsSep ":" (toList v)}"'';
pamVariables =
concatStringsSep "\n"
(mapAttrsToList pamVariable
(zipAttrsWith (n: concatLists)
[
(mapAttrs (n: toList) cfg.sessionVariables)
suffixedVariables
]));
in
pkgs.writeText "pam-environment" "${pamVariables}\n";
};

View file

@ -12,7 +12,7 @@
source = "${config.system.path}/share/terminfo";
};
environment.profileRelativeEnvVars = {
environment.profileRelativeSessionVariables = {
TERMINFO_DIRS = [ "/share/terminfo" ];
};

View file

@ -7,19 +7,19 @@ with lib;
type = types.bool;
default = true;
description = ''
Whether to install files to support the
Whether to install files to support the
<link xlink:href="https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html">XDG Icon Theme specification</link>.
'';
};
};
config = mkIf config.xdg.icons.enable {
environment.pathsToLink = [
"/share/icons"
"/share/pixmaps"
environment.pathsToLink = [
"/share/icons"
"/share/pixmaps"
];
environment.profileRelativeEnvVars = {
environment.profileRelativeSessionVariables = {
XCURSOR_PATH = [ "/share/icons" ];
};
};

View file

@ -25,6 +25,7 @@ in
config = mkIf cfg.enable {
services.udev.packages = with pkgs; [ brightnessctl ];
environment.systemPackages = with pkgs; [ brightnessctl ];
};
}

View file

@ -22,6 +22,8 @@ in
EDITOR = mkDefault "nano";
XCURSOR_PATH = [ "$HOME/.icons" ];
XDG_CONFIG_DIRS = [ "/etc/xdg" ]; # needs to be before profile-relative paths to allow changes through environment.etc
GTK_DATA_PREFIX = "${config.system.path}"; # needed for gtk2 apps to find themes
GTK_EXE_PREFIX = "${config.system.path}";
};
environment.profiles = mkAfter
@ -30,7 +32,7 @@ in
];
# TODO: move most of these elsewhere
environment.profileRelativeEnvVars =
environment.profileRelativeSessionVariables =
{ PATH = [ "/bin" ];
INFOPATH = [ "/info" "/share/info" ];
KDEDIRS = [ "" ];

View file

@ -415,7 +415,7 @@ let
# Session management.
${optionalString cfg.setEnvironment ''
session required pam_env.so envfile=${config.system.build.pamEnvironment}
session required pam_env.so conffile=${config.system.build.pamEnvironment} readenv=0
''}
session required pam_unix.so
${optionalString cfg.setLoginUid

View file

@ -193,7 +193,7 @@ in {
then ""
else
let pluginCmds = lib.attrsets.mapAttrsToList
(n: v: "cp ${v} ${cfg.home}/plugins/${n}.hpi")
(n: v: "cp ${v} ${cfg.home}/plugins/${n}.jpi")
cfg.plugins;
in ''
rm -r ${cfg.home}/plugins || true

View file

@ -95,13 +95,7 @@ in {
environment.systemPackages = [ cfg.package editorScript desktopApplicationFile ];
environment.variables = {
# This is required so that GTK applications launched from Emacs
# get properly themed:
GTK_DATA_PREFIX = "${config.system.path}";
} // (if cfg.defaultEditor then {
EDITOR = mkOverride 900 "${editorScript}/bin/emacseditor";
} else {});
environment.variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "${editorScript}/bin/emacseditor");
};
meta.doc = ./emacs.xml;

View file

@ -36,6 +36,37 @@ in
'';
};
services.minidlna.friendlyName = mkOption {
type = types.str;
default = "${config.networking.hostName} MiniDLNA";
defaultText = "$HOSTNAME MiniDLNA";
example = "rpi3";
description =
''
Name that the DLNA server presents to clients.
'';
};
services.minidlna.rootContainer = mkOption {
type = types.str;
default = ".";
example = "B";
description =
''
Use a different container as the root of the directory tree presented
to clients. The possible values are:
- "." - standard container
- "B" - "Browse Directory"
- "M" - "Music"
- "P" - "Pictures"
- "V" - "Video"
- Or, you can specify the ObjectID of your desired root container
(eg. 1$F for Music/Playlists)
If you specify "B" and the client device is audio-only then
"Music/Folders" will be used as root.
'';
};
services.minidlna.loglevel = mkOption {
type = types.str;
default = "warn";
@ -66,7 +97,37 @@ in
services.minidlna.config = mkOption {
type = types.lines;
description = "The contents of MiniDLNA's configuration file.";
description =
''
The contents of MiniDLNA's configuration file.
When the service is activated, a basic template is generated
from the current options opened here.
'';
};
services.minidlna.extraConfig = mkOption {
type = types.lines;
default = "";
example = ''
# Not exhaustive example
# Support for streaming .jpg and .mp3 files to a TiVo supporting HMO.
enable_tivo=no
# SSDP notify interval, in seconds.
notify_interval=10
# maximum number of simultaneous connections
# note: many clients open several simultaneous connections while
# streaming
max_connections=50
# set this to yes to allow symlinks that point outside user-defined
# media_dirs.
wide_links=yes
'';
description =
''
Extra minidlna options not yet opened for configuration here
(strict_dlna, model_number, model_name, etc...). This is appended
to the current service already provided.
'';
};
};
@ -75,13 +136,15 @@ in
services.minidlna.config =
''
port=${toString port}
friendly_name=${config.networking.hostName} MiniDLNA
friendly_name=${cfg.friendlyName}
db_dir=/var/cache/minidlna
log_level=${cfg.loglevel}
inotify=yes
root_container=${cfg.rootContainer}
${concatMapStrings (dir: ''
media_dir=${dir}
'') cfg.mediaDirs}
${cfg.extraConfig}
'';
users.users.minidlna = {

View file

@ -45,6 +45,8 @@ let
$CFG->aspellpath = '${pkgs.aspell}/bin/aspell';
$CFG->pathtodot = '${pkgs.graphviz}/bin/dot';
${cfg.extraConfig}
require_once('${cfg.package}/share/moodle/lib/setup.php');
// There is no php closing tag in this file,
@ -172,6 +174,19 @@ in
for details on configuration directives.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Any additional text to be appended to the config.php
configuration file. This is a PHP script. For configuration
details, see <link xlink:href="https://docs.moodle.org/37/en/Configuration_file"/>.
'';
example = ''
$CFG->disableupdatenotifications = true;
'';
};
};
# implementation

View file

@ -48,10 +48,6 @@ in
services.xserver.desktopManager.session = [
{ name = "Enlightenment";
start = ''
# Set GTK_DATA_PREFIX so that GTK can find the themes
export GTK_DATA_PREFIX=${config.system.path}
# find theme engines
export GTK_PATH=${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0
export XDG_MENU_PREFIX=e-
export GST_PLUGIN_PATH="${GST_PLUGIN_PATH}"

View file

@ -48,12 +48,6 @@ in
name = "mate";
bgSupport = true;
start = ''
# Set GTK_DATA_PREFIX so that GTK can find the themes
export GTK_DATA_PREFIX=${config.system.path}
# Find theme engines
export GTK_PATH=${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0
export XDG_MENU_PREFIX=mate-
# Let caja find extensions

View file

@ -79,8 +79,7 @@ in
Using Pantheon without LightDM as a displayManager will break screenlocking from the UI.
'';
services.xserver.displayManager.lightdm.enable = mkDefault true;
services.xserver.displayManager.lightdm.greeters.gtk.enable = mkDefault true;
services.xserver.displayManager.lightdm.greeters.pantheon.enable = mkDefault true;
# If not set manually Pantheon session cannot be started
# Known issue of https://github.com/NixOS/nixpkgs/pull/43992
@ -98,10 +97,6 @@ in
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
fi
'') cfg.sessionPath}
# Settings from elementary-default-settings
export GTK_CSD=1
export GTK_MODULES=$GTK_MODULES:pantheon-filechooser-module
fi
'';
@ -166,9 +161,14 @@ in
networkmanager-iodine networkmanager-l2tp; };
# Override GSettings schemas
environment.variables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
environment.variables.GNOME_SESSION_DEBUG = optionalString cfg.debug "1";
environment.sessionVariables.GNOME_SESSION_DEBUG = optionalString cfg.debug "1";
# Settings from elementary-default-settings
environment.sessionVariables.GTK_CSD = "1";
environment.sessionVariables.GTK_MODULES = "pantheon-filechooser-module";
environment.etc."gtk-3.0/settings.ini".source = "${pkgs.pantheon.elementary-default-settings}/etc/gtk-3.0/settings.ini";
environment.pathsToLink = [
# FIXME: modules should link subdirs of `/share` rather than relying on this

View file

@ -107,12 +107,6 @@ in
start = ''
${cfg.extraSessionCommands}
# Set GTK_PATH so that GTK can find the theme engines.
export GTK_PATH="${config.system.path}/lib/gtk-2.0:${config.system.path}/lib/gtk-3.0"
# Set GTK_DATA_PREFIX so that GTK can find the Xfce themes.
export GTK_DATA_PREFIX=${config.system.path}
${pkgs.runtimeShell} ${pkgs.xfce.xinitrc} &
waitPID=$!
'';

View file

@ -114,12 +114,6 @@ in
name = "xfce4-14";
bgSupport = true;
start = ''
# Set GTK_PATH so that GTK can find the theme engines.
export GTK_PATH="${config.system.path}/lib/gtk-2.0:${config.system.path}/lib/gtk-3.0"
# Set GTK_DATA_PREFIX so that GTK can find the Xfce themes.
export GTK_DATA_PREFIX=${config.system.path}
${pkgs.runtimeShell} ${pkgs.xfce4-14.xinitrc} &
waitPID=$!
'';

View file

@ -142,8 +142,6 @@ in
GDM_X_SERVER_EXTRA_ARGS = toString
(filter (arg: arg != "-terminate") cfg.xserverArgs);
XDG_DATA_DIRS = "${cfg.session.desktops}/share/";
# Find the mouse
XCURSOR_PATH = "~/.icons:${pkgs.gnome3.adwaita-icon-theme}/share/icons";
} // optionalAttrs (xSessionWrapper != null) {
# Make GDM use this wrapper before running the session, which runs the
# configured setupCommands. This relies on a patched GDM which supports
@ -262,7 +260,7 @@ in
password required pam_deny.so
session required pam_succeed_if.so audit quiet_success user = gdm
session required pam_env.so envfile=${config.system.build.pamEnvironment}
session required pam_env.so conffile=${config.system.build.pamEnvironment} readenv=0
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
session optional pam_keyinit.so force revoke
session optional pam_permit.so

View file

@ -10,32 +10,6 @@ let
icons = cfg.iconTheme.package;
cursors = cfg.cursorTheme.package;
# We need a few things in the environment for the greeter to run with
# fonts/icons.
wrappedEnsoGreeter = pkgs.runCommand "lightdm-enso-os-greeter" {
buildInputs = [ pkgs.makeWrapper ];
preferLocalBuild = true;
} ''
# This wrapper ensures that we actually get themes
makeWrapper ${pkgs.lightdm-enso-os-greeter}/bin/pantheon-greeter \
$out/greeter \
--prefix PATH : "${pkgs.glibc.bin}/bin" \
--set GDK_PIXBUF_MODULE_FILE "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \
--set GTK_PATH "${theme}:${pkgs.gtk3.out}" \
--set GTK_EXE_PREFIX "${theme}" \
--set GTK_DATA_PREFIX "${theme}" \
--set XDG_DATA_DIRS "${theme}/share:${icons}/share:${cursors}/share" \
--set XDG_CONFIG_HOME "${theme}/share"
cat - > $out/lightdm-enso-os-greeter.desktop << EOF
[Desktop Entry]
Name=LightDM Greeter
Comment=This runs the LightDM Greeter
Exec=$out/greeter
Type=Application
EOF
'';
ensoGreeterConf = pkgs.writeText "lightdm-enso-os-greeter.conf" ''
[greeter]
default-wallpaper=${ldmcfg.background}
@ -144,10 +118,16 @@ in {
config = mkIf (ldmcfg.enable && cfg.enable) {
environment.etc."lightdm/greeter.conf".source = ensoGreeterConf;
environment.systemPackages = [
cursors
icons
theme
];
services.xserver.displayManager.lightdm = {
greeter = mkDefault {
package = wrappedEnsoGreeter;
name = "lightdm-enso-os-greeter";
package = pkgs.lightdm-enso-os-greeter.xgreeters;
name = "pantheon-greeter";
};
greeters = {

View file

@ -15,34 +15,6 @@ let
icons = cfg.iconTheme.package;
cursors = cfg.cursorTheme.package;
# The default greeter provided with this expression is the GTK greeter.
# Again, we need a few things in the environment for the greeter to run with
# fonts/icons.
wrappedGtkGreeter = pkgs.runCommand "lightdm-gtk-greeter" {
buildInputs = [ pkgs.makeWrapper ];
preferLocalBuild = true;
} ''
# This wrapper ensures that we actually get themes
makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \
$out/greeter \
--prefix PATH : "${lib.getBin pkgs.stdenv.cc.libc}/bin" \
--set GDK_PIXBUF_MODULE_FILE "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \
--set GTK_PATH "${theme}:${pkgs.gtk3.out}" \
--set GTK_EXE_PREFIX "${theme}" \
--set GTK_DATA_PREFIX "${theme}" \
--set XDG_DATA_DIRS "${theme}/share:${icons}/share" \
--set XDG_CONFIG_HOME "${theme}/share" \
--set XCURSOR_PATH "${cursors}/share/icons"
cat - > $out/lightdm-gtk-greeter.desktop << EOF
[Desktop Entry]
Name=LightDM Greeter
Comment=This runs the LightDM Greeter
Exec=$out/greeter
Type=Application
EOF
'';
gtkGreeterConf = writeText "lightdm-gtk-greeter.conf"
''
[greeter]
@ -185,10 +157,16 @@ in
config = mkIf (ldmcfg.enable && cfg.enable) {
services.xserver.displayManager.lightdm.greeter = mkDefault {
package = wrappedGtkGreeter;
package = pkgs.lightdm_gtk_greeter.xgreeters;
name = "lightdm-gtk-greeter";
};
environment.systemPackages = [
cursors
icons
theme
];
environment.etc."lightdm/lightdm-gtk-greeter.conf".source = gtkGreeterConf;
};

View file

@ -8,11 +8,6 @@ let
ldmcfg = dmcfg.lightdm;
cfg = ldmcfg.greeters.mini;
xgreeters = pkgs.linkFarm "lightdm-mini-greeter-xgreeters" [{
path = "${pkgs.lightdm-mini-greeter}/share/xgreeters/lightdm-mini-greeter.desktop";
name = "lightdm-mini-greeter.desktop";
}];
miniGreeterConf = pkgs.writeText "lightdm-mini-greeter.conf"
''
[greeter]
@ -90,7 +85,7 @@ in
services.xserver.displayManager.lightdm.greeters.gtk.enable = false;
services.xserver.displayManager.lightdm.greeter = mkDefault {
package = xgreeters;
package = pkgs.lightdm-mini-greeter.xgreeters;
name = "lightdm-mini-greeter";
};

View file

@ -8,11 +8,6 @@ let
ldmcfg = dmcfg.lightdm;
cfg = ldmcfg.greeters.pantheon;
xgreeters = pkgs.linkFarm "pantheon-greeter-xgreeters" [{
path = "${pkgs.pantheon.elementary-greeter}/share/xgreeters/io.elementary.greeter.desktop";
name = "io.elementary.greeter.desktop";
}];
in
{
options = {
@ -33,17 +28,10 @@ in
config = mkIf (ldmcfg.enable && cfg.enable) {
warnings = [
''
The Pantheon greeter is suboptimal in NixOS and can possibly put you in
a situation where you cannot start a session when switching desktopManagers.
''
];
services.xserver.displayManager.lightdm.greeters.gtk.enable = false;
services.xserver.displayManager.lightdm.greeter = mkDefault {
package = xgreeters;
package = pkgs.pantheon.elementary-greeter.xgreeters;
name = "io.elementary.greeter";
};

View file

@ -249,7 +249,7 @@ in
password required pam_deny.so
session required pam_succeed_if.so audit quiet_success user = lightdm
session required pam_env.so envfile=${config.system.build.pamEnvironment}
session required pam_env.so conffile=${config.system.build.pamEnvironment} readenv=0
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
session optional pam_keyinit.so force revoke
session optional pam_permit.so

View file

@ -219,8 +219,6 @@ in
# Load themes from system environment
QT_PLUGIN_PATH = "/run/current-system/sw/" + pkgs.qt5.qtbase.qtPluginPrefix;
QML2_IMPORT_PATH = "/run/current-system/sw/" + pkgs.qt5.qtbase.qtQmlPrefix;
XDG_DATA_DIRS = "/run/current-system/sw/share";
};
execCmd = "exec /run/current-system/sw/bin/sddm";
@ -242,7 +240,7 @@ in
password required pam_deny.so
session required pam_succeed_if.so audit quiet_success user = sddm
session required pam_env.so envfile=${config.system.build.pamEnvironment}
session required pam_env.so conffile=${config.system.build.pamEnvironment} readenv=0
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
session optional pam_keyinit.so force revoke
session optional pam_permit.so

View file

@ -292,6 +292,12 @@ in rec {
services.xserver.desktopManager.xfce.enable = true;
});
gnome3 = makeClosure ({ ... }:
{ services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome3.enable = true;
});
# Linux/Apache/PostgreSQL/PHP stack.
lapp = makeClosure ({ pkgs, ... }:
{ services.httpd.enable = true;

View file

@ -162,6 +162,7 @@ in
metabase = handleTest ./metabase.nix {};
miniflux = handleTest ./miniflux.nix {};
minio = handleTest ./minio.nix {};
minidlna = handleTest ./minidlna.nix {};
misc = handleTest ./misc.nix {};
mongodb = handleTest ./mongodb.nix {};
moodle = handleTest ./moodle.nix {};
@ -204,6 +205,7 @@ in
# openstack-image-userdata doesn't work in a sandbox as the simulated openstack instance needs network access
#openstack-image-userdata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).userdata or {};
openstack-image-metadata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).metadata or {};
os-prober = handleTestOn ["x86_64-linux"] ./os-prober.nix {};
osquery = handleTest ./osquery.nix {};
osrm-backend = handleTest ./osrm-backend.nix {};
ostree = handleTest ./ostree.nix {};

View file

@ -10,6 +10,7 @@ import ./make-test.nix ({ pkgs, ...} : {
{ users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; };
users.users.sybil = { isNormalUser = true; group = "wheel"; };
imports = [ ../modules/profiles/hardened.nix ];
environment.memoryAllocator.provider = "graphene-hardened";
nix.useSandbox = false;
virtualisation.emptyDiskImages = [ 4096 ];
boot.initrd.postDeviceCommands = ''

39
nixos/tests/minidlna.nix Normal file
View file

@ -0,0 +1,39 @@
import ./make-test.nix ({ pkgs, ... }: {
name = "minidlna";
nodes = {
server =
{ ... }:
{
imports = [ ../modules/profiles/minimal.nix ];
networking.firewall.allowedTCPPorts = [ 8200 ];
services.minidlna = {
enable = true;
loglevel = "error";
mediaDirs = [
"PV,/tmp/stuff"
];
friendlyName = "rpi3";
rootContainer = "B";
extraConfig =
''
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg
album_art_names=AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg
album_art_names=Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg
notify_interval=60
'';
};
};
client = { ... }: { };
};
testScript =
''
startAll;
$server->succeed("mkdir -p /tmp/stuff && chown minidlna: /tmp/stuff");
$server->waitForUnit("minidlna");
$server->waitForOpenPort("8200");
$server->succeed("curl --fail http://localhost:8200/");
$client->succeed("curl --fail http://server:8200/");
'';
})

119
nixos/tests/os-prober.nix Normal file
View file

@ -0,0 +1,119 @@
import ./make-test.nix ({pkgs, lib, ...}:
let
# A filesystem image with a (presumably) bootable debian
debianImage = pkgs.vmTools.diskImageFuns.debian9i386 {
# os-prober cannot detect systems installed on disks without a partition table
# so we create the disk ourselves
createRootFS = with pkgs; ''
${parted}/bin/parted --script /dev/vda mklabel msdos
${parted}/sbin/parted --script /dev/vda -- mkpart primary ext2 1M -1s
mkdir /mnt
${e2fsprogs}/bin/mkfs.ext4 /dev/vda1
${utillinux}/bin/mount -t ext4 /dev/vda1 /mnt
if test -e /mnt/.debug; then
exec ${bash}/bin/sh
fi
touch /mnt/.debug
mkdir /mnt/proc /mnt/dev /mnt/sys
'';
extraPackages = [
# /etc/os-release
"base-files"
# make the disk bootable-looking
"grub2" "linux-image-686"
];
# install grub
postInstall = ''
ln -sf /proc/self/mounts > /etc/mtab
PATH=/usr/bin:/bin:/usr/sbin:/sbin $chroot /mnt \
grub-install /dev/vda --force
PATH=/usr/bin:/bin:/usr/sbin:/sbin $chroot /mnt \
update-grub
'';
};
# options to add the disk to the test vm
QEMU_OPTS = "-drive index=2,file=${debianImage}/disk-image.qcow2,read-only,if=virtio";
# a part of the configuration of the test vm
simpleConfig = {
boot.loader.grub = {
enable = true;
useOSProber = true;
device = "/dev/vda";
# vda is a filesystem without partition table
forceInstall = true;
};
nix.binaryCaches = lib.mkForce [ ];
nix.extraOptions = ''
hashed-mirrors =
connect-timeout = 1
'';
services.udisks2.enable = lib.mkForce false;
};
# /etc/nixos/configuration.nix for the vm
configFile = pkgs.writeText "configuration.nix" ''
{config, pkgs, ...}: ({
imports =
[ ./hardware-configuration.nix
<nixpkgs/nixos/modules/testing/test-instrumentation.nix>
];
} // (builtins.fromJSON (builtins.readFile ${
pkgs.writeText "simpleConfig.json" (builtins.toJSON simpleConfig)
})))
'';
in {
name = "os-prober";
machine = { config, pkgs, ... }: (simpleConfig // {
imports = [ ../modules/profiles/installation-device.nix
../modules/profiles/base.nix ];
virtualisation.memorySize = 1024;
# The test cannot access the network, so any packages
# nixos-rebuild needs must be included in the VM.
system.extraDependencies = with pkgs;
[ sudo
libxml2.bin
libxslt.bin
desktop-file-utils
docbook5
docbook_xsl_ns
unionfs-fuse
ntp
nixos-artwork.wallpapers.simple-dark-gray-bottom
perlPackages.XMLLibXML
perlPackages.ListCompare
shared-mime-info
texinfo
xorg.lndir
grub2
# add curl so that rather than seeing the test attempt to download
# curl's tarball, we see what it's trying to download
curl
];
});
testScript = ''
# hack to add the secondary disk
$machine->{startCommand} = "QEMU_OPTS=\"\$QEMU_OPTS \"${lib.escapeShellArg QEMU_OPTS} ".$machine->{startCommand};
$machine->start;
$machine->succeed("udevadm settle");
$machine->waitForUnit("multi-user.target");
# check that os-prober works standalone
$machine->succeed("${pkgs.os-prober}/bin/os-prober | grep /dev/vdb1");
# rebuild and test that debian is available in the grub menu
$machine->succeed("nixos-generate-config");
$machine->copyFileFromHost(
"${configFile}",
"/etc/nixos/configuration.nix");
$machine->succeed("nixos-rebuild boot >&2");
$machine->succeed("egrep 'menuentry.*debian' /boot/grub/grub.cfg");
'';
})

View file

@ -20,8 +20,8 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "A console front-end for Pandora.com";
homepage = http://6xq.net/projects/pianobar/;
platforms = platforms.linux;
homepage = "https://6xq.net/pianobar/";
platforms = platforms.unix;
license = licenses.mit; # expat version
};
}

View file

@ -20,7 +20,7 @@ mkDerivation rec {
};
nativeBuildInputs = [
cmake
(python3.withPackages (pp: with pp; [ pyyaml jinja2 ]))
(python3.withPackages (pp: with pp; [ pyyaml jinja2 setuptools ]))
];
buildInputs = [
qtbase

View file

@ -1,6 +1,6 @@
{ stdenv, libsodium, fetchFromGitHub, wget, pkgconfig, autoreconfHook, openssl, db62, boost
, zlib, gtest, gmock, callPackage, gmp, qt4, utillinux, protobuf, qrencode, libevent
, withGui }:
, libsnark, withGui }:
let librustzcash = callPackage ./librustzcash {};
in
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ gtest gmock gmp openssl wget db62 boost zlib
protobuf libevent libsodium librustzcash ]
protobuf libevent libsodium librustzcash libsnark ]
++ optionals stdenv.isLinux [ utillinux ]
++ optionals withGui [ qt4 qrencode ];

View file

@ -1,6 +1,6 @@
{ stdenv, fetchgit, pkgconfig
{ stdenv, fetchgit, pkgconfig, linkFarm, lightdm-enso-os-greeter
, dbus, pcre, epoxy, libXdmcp, at-spi2-core, libxklavier, libxkbcommon, libpthreadstubs
, gtk3, vala, cmake, libgee, libX11, lightdm, gdk-pixbuf, clutter-gtk }:
, gtk3, vala, cmake, libgee, libX11, lightdm, gdk-pixbuf, clutter-gtk, wrapGAppsHook, librsvg }:
stdenv.mkDerivation {
version = "0.2.1";
@ -12,12 +12,21 @@ stdenv.mkDerivation {
sha256 = "11jm181jq1vbn83h235avpdxz7pqq6prqyzki5yryy53mkj4kgxz";
};
patches = [
./fix-paths.patch
];
nativeBuildInputs = [
cmake
pkgconfig
vala
wrapGAppsHook
];
buildInputs = [
dbus
gtk3
pcre
vala
cmake
epoxy
libgee
libX11
@ -29,31 +38,21 @@ stdenv.mkDerivation {
at-spi2-core
libxkbcommon
libpthreadstubs
librsvg
];
nativeBuildInputs = [
pkgconfig
];
postPatch = ''
sed -i "s@\''${CMAKE_INSTALL_PREFIX}/@@" greeter/CMakeLists.txt
'';
preConfigure = ''
cd greeter
'';
installFlags = [
"DESTDIR=$(out)"
];
preFixup = ''
mv $out/usr/* $out
rm -r $out/usr
'';
passthru.xgreeters = linkFarm "enso-os-greeter-xgreeters" [{
path = "${lightdm-enso-os-greeter}/share/xgreeters/pantheon-greeter.desktop";
name = "pantheon-greeter.desktop";
}];
postFixup = ''
rm -r $out/sbin
substituteInPlace $out/share/xgreeters/pantheon-greeter.desktop \
--replace "pantheon-greeter" "$out/bin/pantheon-greeter"
'';
meta = with stdenv.lib; {

View file

@ -0,0 +1,24 @@
diff --git a/greeter/CMakeLists.txt b/greeter/CMakeLists.txt
index 57aebb0..ab50bff 100644
--- a/greeter/CMakeLists.txt
+++ b/greeter/CMakeLists.txt
@@ -9,7 +9,6 @@ list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set (CONF_DIR "/etc/lightdm")
set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
set (PKGDATADIR "${DATADIR}/enso/greeter")
-set (CMAKE_INSTALL_PREFIX /usr)
set (VERSION "1.0.6")
@@ -94,9 +93,9 @@ glib_compile_resources (GLIB_RESOURCES_CSS SOURCE data/css.gresource.xml)
add_executable (pantheon-greeter ${VALA_C} ${GLIB_RESOURCES_CSS})
target_link_libraries(pantheon-greeter m)
-install (TARGETS pantheon-greeter RUNTIME DESTINATION sbin)
+install (TARGETS pantheon-greeter RUNTIME DESTINATION bin)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/pantheon-greeter.desktop DESTINATION share/xgreeters)
-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/greeter.conf DESTINATION ${CONF_DIR})
+install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/greeter.conf DESTINATION etc/lightdm)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/fingerprint.svg DESTINATION ${PKGDATADIR})
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/power.svg DESTINATION ${PKGDATADIR})
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/checked.svg DESTINATION ${PKGDATADIR})

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, lightdm, gtk3 }:
{ stdenv, linkFarm, lightdm-mini-greeter, fetchFromGitHub, autoreconfHook, pkgconfig, lightdm, gtk3, glib, gdk-pixbuf, wrapGAppsHook, librsvg }:
stdenv.mkDerivation rec {
pname = "lightdm-mini-greeter";
@ -11,17 +11,22 @@ stdenv.mkDerivation rec {
sha256 = "1qi0bsqi8z2zv3303ww0kd7bciz6qx8na5bkvgrqlwyvq31czai5";
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ lightdm gtk3 ];
nativeBuildInputs = [ autoreconfHook pkgconfig wrapGAppsHook ];
buildInputs = [ lightdm gtk3 glib gdk-pixbuf librsvg ];
configureFlags = [ "--sysconfdir=/etc" ];
makeFlags = [ "configdir=$(out)/etc" ];
makeFlags = [ "configdir=${placeholder "out"}/etc" ];
postInstall = ''
substituteInPlace "$out/share/xgreeters/lightdm-mini-greeter.desktop" \
--replace "Exec=lightdm-mini-greeter" "Exec=$out/bin/lightdm-mini-greeter"
'';
passthru.xgreeters = linkFarm "lightdm-mini-greeter-xgreeters" [{
path = "${lightdm-mini-greeter}/share/xgreeters/lightdm-mini-greeter.desktop";
name = "lightdm-mini-greeter.desktop";
}];
meta = with stdenv.lib; {
description = "A minimal, configurable, single-user GTK3 LightDM greeter";
homepage = https://github.com/prikhi/lightdm-mini-greeter;

View file

@ -1,7 +1,18 @@
{ stdenv, fetchurl, lightdm, pkgconfig, intltool
, hicolor-icon-theme, makeWrapper
, useGTK2 ? false, gtk2, gtk3 # gtk3 seems better supported
, exo, at-spi2-core
{ stdenv
, lightdm_gtk_greeter
, fetchurl
, lightdm
, pkgconfig
, intltool
, linkFarm
, wrapGAppsHook
, useGTK2 ? false
, gtk2
, gtk3 # gtk3 seems better supported
, exo
, at-spi2-core
, librsvg
, hicolor-icon-theme
}:
#ToDo: bad icons with gtk2;
@ -20,14 +31,15 @@ stdenv.mkDerivation rec {
sha256 = "1pis5qyg95pg31dvnfqq34bzgj00hg4vs547r8h60lxjk81z8p15";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ lightdm exo intltool makeWrapper hicolor-icon-theme ]
nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ];
buildInputs = [ lightdm exo librsvg hicolor-icon-theme ]
++ (if useGTK2 then [ gtk2 ] else [ gtk3 ]);
configureFlags = [
"--localstatedir=/var"
"--sysconfdir=/etc"
"--disable-indicator-services-command"
"--sbindir=${placeholder "out"}/bin" # for wrapGAppsHook to wrap automatically
] ++ stdenv.lib.optional useGTK2 "--with-gtk2";
preConfigure = ''
@ -43,11 +55,14 @@ stdenv.mkDerivation rec {
postInstall = ''
substituteInPlace "$out/share/xgreeters/lightdm-gtk-greeter.desktop" \
--replace "Exec=lightdm-gtk-greeter" "Exec=$out/sbin/lightdm-gtk-greeter"
wrapProgram "$out/sbin/lightdm-gtk-greeter" \
--prefix XDG_DATA_DIRS ":" "${hicolor-icon-theme}/share"
--replace "Exec=lightdm-gtk-greeter" "Exec=$out/bin/lightdm-gtk-greeter"
'';
passthru.xgreeters = linkFarm "lightdm-gtk-greeter-xgreeters" [{
path = "${lightdm_gtk_greeter}/share/xgreeters/lightdm-gtk-greeter.desktop";
name = "lightdm-gtk-greeter.desktop";
}];
meta = with stdenv.lib; {
homepage = https://launchpad.net/lightdm-gtk-greeter;
platforms = platforms.linux;

View file

@ -1,4 +1,5 @@
{ stdenv, fetchFromGitHub, rustPlatform, openssl, pkgconfig, python3, xorg, cmake, libgit2 }:
{ stdenv, fetchFromGitHub, rustPlatform, openssl, pkgconfig, python3, xorg, cmake, libgit2, darwin
, curl }:
rustPlatform.buildRustPackage rec {
pname = "amp";
@ -15,7 +16,8 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "1bvj2zg19ak4vi47vjkqlybz011kn5zq1j7zznr76zrryacw4lz1";
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ openssl python3 xorg.libxcb libgit2 ];
buildInputs = [ openssl python3 xorg.libxcb libgit2 ] ++ stdenv.lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [ curl Security AppKit ]);
# Tests need to write to the theme directory in HOME.
preCheck = "export HOME=`mktemp -d`";

View file

@ -48,7 +48,11 @@ stdenv.mkDerivation {
# The sparkle patch modified the nibs, so we have to recompile them
postPatch = ''
for nib in MainMenu Preferences; do
/usr/bin/ibtool --compile src/MacVim/English.lproj/$nib.nib/keyedobjects.nib src/MacVim/English.lproj/$nib.nib
# redirect stdin/stdout/stderr to /dev/null because ibtool marks them nonblocking
# and not redirecting screws with subsequent commands.
# redirecting stderr is unfortunate but I don't know of a reasonable way to remove O_NONBLOCK
# from the fds.
/usr/bin/ibtool --compile src/MacVim/English.lproj/$nib.nib/keyedobjects.nib src/MacVim/English.lproj/$nib.nib >/dev/null 2>/dev/null </dev/null
done
'';

View file

@ -0,0 +1,38 @@
{ lib
, mkDerivationWith
, python3Packages
, p7zip
, archiveSupport ? true
}:
mkDerivationWith python3Packages.buildPythonApplication rec {
pname = "kcc";
version = "5.5.1";
src = python3Packages.fetchPypi {
inherit version;
pname = "KindleComicConverter";
sha256 = "5dbee5dc5ee06a07316ae5ebaf21ffa1970094dbae5985ad735e2807ef112644";
};
propagatedBuildInputs = with python3Packages ; [
pillow
pyqt5
psutil
python-slugify
raven
];
qtWrapperArgs = lib.optional archiveSupport [ "--prefix" "PATH" ":" "${ lib.makeBinPath [ p7zip ] }" ];
postFixup = ''
wrapProgram $out/bin/kcc "''${qtWrapperArgs[@]}"
'';
meta = with lib; {
description = "Python app to convert comic/manga files or folders to EPUB, Panel View MOBI or E-Ink optimized CBZ";
homepage = "https://kcc.iosphe.re";
license = licenses.isc;
maintainers = with maintainers; [ dawidsowa ];
};
}

View file

@ -22,6 +22,7 @@
libxcb,
libxkbcommon,
wayland,
xdg_utils,
# Darwin Frameworks
AppKit,
@ -75,6 +76,10 @@ in buildRustPackage rec {
++ lib.optionals stdenv.isDarwin [ AppKit CoreGraphics CoreServices CoreText Foundation OpenGL ];
outputs = [ "out" "terminfo" ];
postPatch = ''
substituteInPlace alacritty_terminal/src/config/mouse.rs \
--replace xdg-open ${xdg_utils}/bin/xdg-open
'';
postBuild = lib.optionalString stdenv.isDarwin "make app";

View file

@ -51,7 +51,7 @@ python3Packages.buildPythonApplication rec {
homepage = https://electrum-ltc.org/;
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ asymmetric ];
maintainers = with maintainers; [ ];
};
}

View file

@ -3,15 +3,17 @@
stdenv.mkDerivation rec {
pname = "gpscorrelate";
version = "unstable-2019-06-05";
version = "unstable-2019-09-03";
src = fetchFromGitHub {
owner = "dfandrich";
repo = pname;
rev = "80b14fe7c10c1cc8f62c13f517c062577ce88c85";
sha256 = "1gaan0nd7ai0bwilfnkza7lg5mz87804mvlygj0gjc672izr37r6";
rev = "e1dd44a34f67b1ab7201440e60a840258ee448d2";
sha256 = "0gjwwdqh9dprzylmmnk3gm41khka9arkij3i9amd8y7d49pm9rlv";
};
patches = [ ./fix-localedir.diff ];
nativeBuildInputs = [
desktop-file-utils
docbook_xml_dtd_42
@ -31,11 +33,12 @@ stdenv.mkDerivation rec {
"GTK=3"
"CC=cc"
"CXX=c++"
"CFLAGS=-DENABLE_NLS"
];
doCheck = true;
installTargets = [ "install" "install-desktop-file" ];
installTargets = [ "install" "install-po" "install-desktop-file" ];
meta = with stdenv.lib; {
description = "A GPS photo correlation tool, to add EXIF geotags";
@ -59,5 +62,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl2Plus;
homepage = "https://github.com/dfandrich/gpscorrelate";
platforms = platforms.linux;
maintainers = with maintainers; [ sikmir ];
};
}

View file

@ -0,0 +1,27 @@
diff --git i/Makefile w/Makefile
index 47919ca..408fd68 100644
--- i/Makefile
+++ w/Makefile
@@ -33,8 +33,9 @@ datadir = $(prefix)/share
mandir = $(datadir)/man
docdir = $(datadir)/doc/gpscorrelate
applicationsdir = $(datadir)/applications
+localedir = ${datadir}/locale
-DEFS = -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\"
+DEFS = -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" -DPACKAGE_LOCALE_DIR=\"$(localedir)\"
TARGETS = gpscorrelate-gui$(EXEEXT) gpscorrelate$(EXEEXT) doc/gpscorrelate.1 doc/gpscorrelate.html
diff --git i/main-gui.c w/main-gui.c
index fdace6f..8a6197b 100644
--- i/main-gui.c
+++ w/main-gui.c
@@ -40,6 +40,7 @@
int main(int argc, char* argv[])
{
/* Initialize gettext (gtk_init initializes the locale) */
+ (void) bindtextdomain(TEXTDOMAIN, PACKAGE_LOCALE_DIR);
(void) textdomain(TEXTDOMAIN);
(void) bind_textdomain_codeset(TEXTDOMAIN, "UTF-8");

View file

@ -0,0 +1,41 @@
{ stdenv, fetchFromGitHub
, pkgconfig, meson, ninja, python3
, wrapGAppsHook, vala, shared-mime-info
, cairo, pantheon, glib, gtk3, libxml2, libgee, libarchive
, hicolor-icon-theme # for setup-hook
}:
stdenv.mkDerivation rec {
pname = "minder";
version = "1.5.0";
src = fetchFromGitHub {
owner = "phase1geo";
repo = pname;
rev = version;
sha256 = "0lhmv3z2jifv4cksxa27jigdfj9n81myjsxg38xp28fx5x3h8bzc";
};
nativeBuildInputs = [ pkgconfig meson ninja python3 wrapGAppsHook vala shared-mime-info ];
buildInputs = [ cairo pantheon.granite glib gtk3 libxml2 libgee libarchive hicolor-icon-theme ];
postPatch = ''
chmod +x meson/post_install.py
patchShebangs meson/post_install.py
'';
postFixup = ''
for x in $out/bin/*; do
ln -vrs $x "$out/bin/''${x##*.}"
done
'';
meta = with stdenv.lib; {
description = "Mind-mapping application for Elementary OS";
homepage = "https://github.com/phase1geo/Minder";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ dtzWill ];
};
}

View file

@ -1,17 +1,14 @@
{ fetchFromGitHub, lib, gobject-introspection, gtk3, python3Packages }:
# Although we copy in the udev rules here, you probably just want to use logitech-udev-rules instead of
# adding this to services.udev.packages on NixOS
python3Packages.buildPythonApplication {
pname = "solaar-unstable";
version = "2019-01-30";
python3Packages.buildPythonApplication rec {
pname = "solaar";
version = "1.0.1";
src = fetchFromGitHub {
owner = "pwr";
owner = "pwr-Solaar";
repo = "Solaar";
rev = "c07c115ee379e82db84283aaa29dc53df033a8c8";
sha256 = "0xg181xcwzzs8pdqvjrkjyaaga7ir93hzjvd17j9g3ns8xfj2mvr";
rev = "${version}";
sha256 = "1ni3aimpl9vyhwzi61mvm8arkii52cmb6bzjma9cnkjyx328pkid";
};
propagatedBuildInputs = with python3Packages; [ gobject-introspection gtk3 pygobject3 pyudev ];
@ -28,7 +25,6 @@ python3Packages.buildPythonApplication {
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Linux devices manager for the Logitech Unifying Receiver";
longDescription = ''
@ -43,7 +39,7 @@ python3Packages.buildPythonApplication {
To be able to use it, make sure you have access to /dev/hidraw* files.
'';
license = licenses.gpl2;
homepage = https://pwr.github.io/Solaar/;
homepage = https://pwr-solaar.github.io/Solaar/;
platforms = platforms.linux;
maintainers = with maintainers; [ spinus ysndr ];
};

View file

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "todoist";
version = "0.13.1";
version = "0.14.0";
src = fetchFromGitHub {
owner = "sachaos";
repo = "todoist";
rev = "v${version}";
sha256 = "1kwvlsjr2a7wdhlwpxxpdh87wz8k9yjwl59vl2g7ya6m0rvhd3mc";
sha256 = "0qhmv65il14lns817yxhma784jw5bz629svzh2ykrmilx5f7dxqc";
};
modSha256 = "09n6abyaqwz4zcdz8934rvpbxhp4v2nmm5v739kkcc98c3h93i64";
modSha256 = "1nnp5ijz4n34gc97rar4wlvlbx21ndpjyb2mc6gxdk1wzx3mgswp";
meta = {
homepage = https://github.com/sachaos/todoist;

View file

@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
cp -r $out/libexec/configuration/ \$HOME/.xmind/configuration-cathy/
fi
exec "$out/libexec/XMind" "$@"
exec "$out/libexec/XMind" "\$@"
EOF
chmod +x $out/bin/XMind

View file

@ -1,6 +1,6 @@
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, kubernetes-helm, ... }:
let version = "0.79.3"; in
let version = "0.85.0"; in
buildGoModule {
pname = "helmfile";
@ -10,12 +10,12 @@ buildGoModule {
owner = "roboll";
repo = "helmfile";
rev = "v${version}";
sha256 = "0wgfpidpqyvh41dnw351v91z4szi1s6lqak9li2pmddz1rdkx66v";
sha256 = "0k1019ddzhhl8kn70ibqf6srlfv92jkc26m78pic5c7ibqyq5fds";
};
goPackagePath = "github.com/roboll/helmfile";
modSha256 = "1ksz1c4j7mhsbq6ifqab04588d48c9glyhr4d3d4jyvi19qhwx1d";
modSha256 = "1npjm3rs32c1rwx8xb9s03jhd156da6p66hpaqccm7b6zxsm32nv";
nativeBuildInputs = [ makeWrapper ];

View file

@ -0,0 +1,22 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "qbec";
version = "0.7.5";
src = fetchFromGitHub {
owner = "splunk";
repo = "qbec";
rev = "v${version}";
sha256 = "1q3rbxih4fn0zv8dni5dxb3pq840spplfy08x941najqfgflv9gb";
};
modSha256 = "0s1brqvzm1ghhqb46aqfj0lpnaq76rav0hwwb82ccw8h7052y4jn";
meta = with lib; {
description = "Configure kubernetes objects on multiple clusters using jsonnet https://qbec.io";
homepage = https://github.com/splunk/qbec;
license = licenses.asl20;
maintainers = with maintainers; [ groodt ];
};
}

View file

@ -1,14 +1,15 @@
{ stdenv, fetchdarcs, pythonPackages, libvncserver, zlib
, gnutls, libvpx, makeDesktopItem }:
, gnutls, libvpx, makeDesktopItem, mkDerivationWith }:
mkDerivationWith pythonPackages.buildPythonApplication rec {
pythonPackages.buildPythonApplication rec {
pname = "blink";
version = "3.0.3";
version = "3.2.0";
src = fetchdarcs {
url = http://devel.ag-projects.com/repositories/blink-qt;
rev = "release-${version}";
sha256 = "1vj6zzfvxygz0fzr8bhymcw6j4v8xmr0kba53d6qg285j7hj1bdi";
sha256 = "19rcwr5scw48qnj79q1pysw95fz9h98nyc3161qy2kph5g7dwkc3";
};
patches = [ ./pythonpath.patch ];
@ -16,9 +17,20 @@ pythonPackages.buildPythonApplication rec {
sed -i 's|@out@|'"''${out}"'|g' blink/resources.py
'';
propagatedBuildInputs = with pythonPackages; [ pyqt5_with_qtwebkit cjson sipsimple twisted google_api_python_client ];
propagatedBuildInputs = with pythonPackages; [
pyqt5_with_qtwebkit
cjson
sipsimple
twisted
google_api_python_client
];
buildInputs = [ pythonPackages.cython zlib libvncserver libvpx ];
buildInputs = [
pythonPackages.cython
zlib
libvncserver
libvpx
];
desktopItem = makeDesktopItem {
name = "Blink";
@ -30,9 +42,14 @@ pythonPackages.buildPythonApplication rec {
categories = "Application;Internet;";
};
dontWrapQtApps = true;
makeWrapperArgs = [
"\${qtWrapperArgs[@]}"
"--prefix LD_LIBRARY_PATH: ${gnutls.out}/lib"
];
postInstall = ''
wrapProgram $out/bin/blink \
--prefix LD_LIBRARY_PATH ":" ${gnutls.out}/lib
mkdir -p "$out/share/applications"
mkdir -p "$out/share/pixmaps"
cp "$desktopItem"/share/applications/* "$out/share/applications"

View file

@ -3,13 +3,13 @@
, gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }:
let
version = "5.3.2";
version = "5.3.3";
in stdenv.mkDerivation {
pname = "franz";
inherit version;
src = fetchurl {
url = "https://github.com/meetfranz/franz/releases/download/v${version}/franz_${version}_amd64.deb";
sha256 = "19mfw0wgjdhq38p0xvixdxvk07j3rdwlw87p8gjh4yi1qv0paj4i";
sha256 = "03ii1gpc2wijy917565pqig1ihd4zhal12i2f5k916i7fp8912m1";
};
# don't remove runtime deps

View file

@ -2,7 +2,7 @@
"name": "riot-web",
"productName": "Riot",
"main": "src/electron-main.js",
"version": "1.3.3",
"version": "1.3.5",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"dependencies": {

View file

@ -6,12 +6,12 @@
let
executableName = "riot-desktop";
version = "1.3.3";
version = "1.3.5";
riot-web-src = fetchFromGitHub {
owner = "vector-im";
repo = "riot-web";
rev = "v${version}";
sha256 = "1nzzxcz4r9932cha80q1bzn1425m67fsl89pn7n7ybrv6y0jnxpc";
sha256 = "05xwp6062lvjsy539swa6dxj3k3dw1667nkx8ffwdl1dg17wphy8";
};
in yarn2nix-moretea.mkYarnPackage rec {

View file

@ -5,11 +5,11 @@
stdenv.mkDerivation rec {
pname = "riot-web";
version = "1.3.3";
version = "1.3.5";
src = fetchurl {
url = "https://github.com/vector-im/riot-web/releases/download/v${version}/riot-v${version}.tar.gz";
sha256 = "1n5h7q3h0akw09p4z7nwprxsa8jnmwbvwn2npq7zz62ccasb4fv9";
sha256 = "0vpfv5rvrhrws52j4lxnj1qyagf9894znpxkdnkp72g19qsjn66g";
};
installPhase = let

View file

@ -1,8 +1,8 @@
{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtsvg, qtdeclarative, qttools, qtgraphicaleffects, qtquickcontrols2, full
, libsecret, libGL, libpulseaudio, glib, wrapQtAppsHook, makeDesktopItem, mkDerivation }:
, libsecret, libGL, libpulseaudio, glib, wrapQtAppsHook, mkDerivation }:
let
version = "1.1.6-1";
version = "1.2.2-1";
description = ''
An application that runs on your computer in the background and seamlessly encrypts
@ -10,24 +10,13 @@ let
To work, gnome-keyring service must be enabled.
'';
desktopItem = makeDesktopItem {
name = "protonmail-bridge";
exec = "protonmail-bridge";
icon = "protonmail-bridge";
comment = stdenv.lib.replaceStrings ["\n"] [" "] description;
desktopName = "ProtonMail Bridge";
genericName = "ProtonMail Bridge for Linux";
categories = "Utility;Security;Network;Email";
};
in mkDerivation {
pname = "protonmail-bridge";
inherit version;
src = fetchurl {
url = "https://protonmail.com/download/protonmail-bridge_${version}_amd64.deb";
sha256 = "108dql9q5znsqjkrs41pc6psjbg5bz09rdmjl036xxbvsdvq4a8r";
sha256 = "16hfa07wdqcns79395wjdglg2cjyblqgz1hx8rl15qm7n5f24ckl";
};
sourceRoot = ".";
@ -37,12 +26,10 @@ in mkDerivation {
'';
installPhase = ''
mkdir -p $out/{bin,lib,share/applications}
mkdir -p $out/share/{applications,icons/hicolor/scalable/apps}
mkdir -p $out/{bin,lib,share}
cp -r usr/lib/protonmail/bridge/protonmail-bridge $out/lib
cp usr/share/icons/protonmail/ProtonMail_Bridge.svg $out/share/icons/hicolor/scalable/apps/protonmail-bridge.svg
cp ${desktopItem}/share/applications/* $out/share/applications
cp -r usr/share $out
ln -s $out/lib/protonmail-bridge $out/bin/protonmail-bridge
'';
@ -67,6 +54,10 @@ in mkDerivation {
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${rpath}" \
$out/lib/protonmail-bridge
substituteInPlace $out/share/applications/ProtonMail_Bridge.desktop \
--replace "/usr/" "$out/" \
--replace "Exec=protonmail-bridge" "Exec=$out/bin/protonmail-bridge"
'';
buildInputs = [ qtbase qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative ];

View file

@ -28,12 +28,9 @@ in stdenv.mkDerivation rec {
" echo \"Connecting...\"" \
" sed -ri 's@${expectedUpdateResolvPath}@${actualUpdateResolvePath}@g' \"\$openvpn_config\"; echo \"Connecting...\""
cp protonvpn-cli.sh "$out/bin/protonvpn-cli"
ln -s "$out/bin/protonvpn-cli" "$out/bin/pvpn"
'';
postInstallPhase = ''
wrapProgram $out/protonvpn-cli \
wrapProgram $out/bin/protonvpn-cli \
--prefix PATH : ${lib.makeBinPath [ coreutils openvpn python dialog wget update-resolv-conf ]}
ln -s "$out/bin/protonvpn-cli" "$out/bin/pvpn"
'';
meta = with stdenv.lib; {

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "rclone";
version = "1.49.2";
version = "1.49.3";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "1a90fr7cw78qhwdgkjwshap345jk1ipm3nnk7xf3nayiyibvk5dg";
sha256 = "0dd5xrbf62n4y77zzaai1rc069ism1ikvcw43hzja3mzwfa0sqqa";
};
modSha256 = "158mpmy8q67dk1ks9p926n1670gsk7rhd0vpjh44f4g64ddnhk03";

View file

@ -61,7 +61,7 @@ python3Packages.buildPythonApplication rec {
'';
propagatedBuildInputs = with python3Packages; [
paperwork-backend pypillowfight gtk3 cairo pyxdg dateutil
paperwork-backend pypillowfight gtk3 cairo pyxdg dateutil setuptools
];
makeWrapperArgs = [

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, mkDerivation, pkgconfig, cmake, qtbase, cairo, pixman,
boost, cups, fontconfig, freetype, hunspell, libjpeg, libtiff, libxml2, lcms2,
podofo, poppler, poppler_data, python2, harfbuzz, qtimageformats, qttools, harfbuzzFull }:
podofo, poppler, poppler_data, python2, qtimageformats, qttools, harfbuzzFull }:
let
pythonEnv = python2.withPackages(ps: [ps.tkinter ps.pillow]);
@ -20,7 +20,7 @@ mkDerivation rec {
buildInputs = [
qtbase cairo pixman boost cups fontconfig
freetype hunspell libjpeg libtiff libxml2 lcms2 podofo poppler
poppler_data pythonEnv harfbuzz qtimageformats qttools harfbuzzFull
poppler_data pythonEnv qtimageformats qttools harfbuzzFull
];
meta = {

View file

@ -1,26 +1,32 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
{ stdenv, buildGoModule, fetchFromGitHub, fetchpatch }:
buildGoPackage rec {
buildGoModule rec {
pname = "git-lfs";
version = "2.7.2";
goPackagePath = "github.com/git-lfs/git-lfs";
version = "2.8.0";
src = fetchFromGitHub {
rev = "v${version}";
owner = "git-lfs";
repo = "git-lfs";
sha256 = "1nf40rbdz901vsahg5cm09pznpina6wimmxl0lmh8pn0mi51yzvc";
sha256 = "17x9q4g1acf51bxr9lfmd2ym7w740n4ghdi0ncmma77kwabw9d3x";
};
preBuild = ''
pushd go/src/github.com/git-lfs/git-lfs
go generate ./commands
popd
'';
modSha256 = "1rjscc52rh8kxa64canw3baljllp1c639nsn89hs5b86c8v1jav7";
postInstall = ''
rm -v $bin/bin/{man,script,cmd}
patches = [
(fetchpatch {
# Build fails on v2.8.0 with go 1.13 due to invalid dependency version:
# go: github.com/git-lfs/go-ntlm@v0.0.0-20190307203151-c5056e7fa066: invalid pseudo-version: does not match version-control timestamp (2019-04-01T17:57:52Z)
# TODO: Remove once https://github.com/git-lfs/git-lfs/commit/cd83f4224ce02398bdbf8b05830d92220d9b8e01 lands in a release.
url = "https://github.com/git-lfs/git-lfs/commit/cd83f4224ce02398bdbf8b05830d92220d9b8e01.patch";
sha256 = "17nmnlkknglqhzrky5caskbscrjp7kp9b5mfqznh1jx2hbxzlpbj";
})
];
subPackages = [ "." ];
preBuild = ''
go generate ./commands
'';
meta = with stdenv.lib; {

View file

@ -4,13 +4,13 @@
stdenv.mkDerivation rec {
pname = "git-repo";
version = "1.13.5.1";
version = "1.13.6";
src = fetchFromGitHub {
owner = "android";
repo = "tools_repo";
rev = "v${version}";
sha256 = "13rp0fq76a6qlw60pnipkgfng25i0ygyk66y30jv7hy8ip4aa92n";
sha256 = "1a12h84anf3sshkkcv30ljgibb35gmh01bmi6sicyhxbn1hrfi3w";
};
nativeBuildInputs = [ makeWrapper ];

View file

@ -30,6 +30,7 @@ mkDerivation rec {
prePatch = ''
sed 's_shotcutPath, "qmelt"_"${mlt}/bin/melt"_' -i src/jobs/meltjob.cpp
sed 's_shotcutPath, "ffmpeg"_"${mlt.ffmpeg}/bin/ffmpeg"_' -i src/jobs/ffmpegjob.cpp
sed 's_qApp->applicationDirPath(), "ffmpeg"_"${mlt.ffmpeg}/bin/ffmpeg"_' -i src/docks/encodedock.cpp
NICE=$(type -P nice)
sed "s_/usr/bin/nice_''${NICE}_" -i src/jobs/meltjob.cpp src/jobs/ffmpegjob.cpp
'';

View file

@ -189,6 +189,7 @@ rec {
# libraries not on the upstream include list, but nevertheless expected
# by at least one appimage
libtool.lib # for Synfigstudio
at-spi2-core
];
};
}

View file

@ -1,4 +1,5 @@
{
buildPackages,
cacert,
callPackage,
closureInfo,
@ -47,7 +48,7 @@ rec {
, imageDigest
, sha256
, os ? "linux"
, arch ? "amd64"
, arch ? buildPackages.go.GOARCH
# This is used to set name to the pulled image
, finalImageName ? imageName
@ -540,7 +541,7 @@ rec {
configJson = let
pure = writeText "${baseName}-config.json" (builtins.toJSON {
inherit created config;
architecture = "amd64";
architecture = buildPackages.go.GOARCH;
os = "linux";
});
impure = runCommand "${baseName}-standard-dynamic-date.json"
@ -658,7 +659,7 @@ rec {
baseJson = let
pure = writeText "${baseName}-config.json" (builtins.toJSON {
inherit created config;
architecture = "amd64";
architecture = buildPackages.go.GOARCH;
os = "linux";
});
impure = runCommand "${baseName}-config.json"

View file

@ -719,7 +719,7 @@ rec {
{ name, fullName, size ? 4096, urlPrefix
, packagesList ? "", packagesLists ? [packagesList]
, packages, extraPackages ? [], postInstall ? ""
, extraDebs ? []
, extraDebs ? [], createRootFS ? defaultCreateRootFS
, QEMU_OPTS ? "", memSize ? 512 }:
let
@ -729,7 +729,7 @@ rec {
};
in
(fillDiskWithDebs {
inherit name fullName size postInstall QEMU_OPTS memSize;
inherit name fullName size postInstall createRootFS QEMU_OPTS memSize;
debs = import expr {inherit fetchurl;} ++ extraDebs;
}) // {inherit expr;};

View file

@ -1,5 +1,5 @@
{
stdenv, lib,
stdenv, lib, pkgs,
fetchFromGitHub, fetchurl,
nodejs, ttfautohint-nox, otfcc,
@ -8,7 +8,9 @@
design ? [], upright ? [], italic ? [], oblique ? [],
family ? null, weights ? [],
# Custom font set name. Required if any custom settings above.
set ? null
set ? null,
# Extra parameters. Can be used for ligature mapping.
extraParameters ? null
}:
assert (design != []) -> set != null;
@ -19,38 +21,43 @@ assert (family != null) -> set != null;
assert (weights != []) -> set != null;
let
installPackageLock = import ./package-lock.nix { inherit fetchurl lib; };
system = builtins.currentSystem;
nodePackages = import ./node-packages.nix { inherit pkgs system nodejs; };
in
let pname = if set != null then "iosevka-${set}" else "iosevka"; in
let
version = "1.14.3";
version = "2.3.0";
name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "be5invis";
repo ="Iosevka";
rev = "v${version}";
sha256 = "0ba8hwxi88bp2jb9xfhk95nnlv8ykl74cv62xr4ybzm3b8ahpwqf";
sha256 = "1qnbxhx9wvij9zia226mc3sy8j7bfsw5v1cvxvsbbwjskwqdamvv";
};
in
with lib;
let unwords = concatStringsSep " "; in
let quote = str: "\"" + str + "\""; in
let toTomlList = list: "[" + (concatMapStringsSep ", " quote list) +"]"; in
let unlines = concatStringsSep "\n"; in
let
param = name: options:
if options != [] then "${name}='${unwords options}'" else null;
config = unwords (lib.filter (x: x != null) [
if options != [] then "${name}=${toTomlList options}" else null;
config = unlines (lib.filter (x: x != null) [
"[buildPlans.${pname}]"
(param "design" design)
(param "upright" upright)
(param "italic" italic)
(param "oblique" oblique)
(if family != null then "family='${family}'" else null)
(if family != null then "family=\"${family}\"" else null)
(param "weights" weights)
]);
custom = design != [] || upright != [] || italic != [] || oblique != []
|| family != null || weights != [];
installNodeModules = unlines (lib.mapAttrsToList
(name: value: "mkdir -p node_modules/${name}\n cp -r ${value.outPath}/lib/node_modules/. node_modules")
nodePackages);
in
stdenv.mkDerivation {
@ -58,33 +65,25 @@ stdenv.mkDerivation {
nativeBuildInputs = [ nodejs ttfautohint-nox otfcc ];
passAsFile = [ "installPackageLock" ];
installPackageLock = installPackageLock ./package-lock.json;
preConfigure = ''
HOME=$TMPDIR
source "$installPackageLockPath";
npm --offline rebuild
'';
passAsFile = [ "config" "extraParameters" ];
config = config;
extraParameters = extraParameters;
configurePhase = ''
runHook preConfigure
${optionalString custom ''make custom-config set=${set} ${config}''}
runHook postConfigure
mkdir -p node_modules/.bin
${installNodeModules}
${optionalString (set != null) ''mv "$configPath" private-build-plans.toml''}
${optionalString (extraParameters != null) ''cat "$extraParametersPath" >> parameters.toml''}
'';
makeFlags = lib.optionals custom [ "custom" "set=${set}" ];
buildPhase = ''
npm run build -- ttf::${pname}
'';
installPhase = ''
runHook preInstall
fontdir="$out/share/fonts/$pname"
install -d "$fontdir"
install "dist/$pname/ttf"/* "$fontdir"
runHook postInstall
'';
enableParallelBuilding = true;
@ -98,6 +97,6 @@ stdenv.mkDerivation {
'';
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [ cstrahan jfrankenau ttuegel ];
maintainers = with maintainers; [ cstrahan jfrankenau ttuegel babariviere ];
};
}

View file

@ -0,0 +1,6 @@
#!/bin/sh
node2nix --nodejs-10 --input node-packages.json \
--output node-packages-generated.nix \
--composition node-packages.nix \
--node-env ./../../../development/node-packages/node-env.nix

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,20 @@
[
"caryll-shapeops",
"libspiro-js",
"megaminx",
"object-assign",
"otfcc-ttcize",
"primitive-quadify-off-curves",
"toml",
"topsort",
"ttf2woff",
"ttf2woff2",
"unorm",
"verda",
"yargs",
"colors",
"patel",
"patrisika-scopes",
"eslint",
"stylus"
]

View file

@ -0,0 +1,17 @@
# This file has been generated by node2nix 1.7.0. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-10_x"}:
let
nodeEnv = import ../../../development/node-packages/node-env.nix {
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
inherit nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages-generated.nix {
inherit (pkgs) fetchurl fetchgit;
inherit nodeEnv;
}

File diff suppressed because it is too large Load diff

View file

@ -1,142 +0,0 @@
{ lib, fetchurl }:
with lib; with builtins;
let
# Convert a base64-encoded string into a list of quads and padding.
fromBase64 = str:
let
len = stringLength str;
quads = 3 * len - 4 * padding;
padding =
if hasSuffix "==" str then 2 else
if hasSuffix "=" str then 1 else
0;
chars = stringToCharacters (substring 0 (len - padding) str);
table = {
A = [0 0 0];
B = [0 0 1];
C = [0 0 2];
D = [0 0 3];
E = [0 1 0];
F = [0 1 1];
G = [0 1 2];
H = [0 1 3];
I = [0 2 0];
J = [0 2 1];
K = [0 2 2];
L = [0 2 3];
M = [0 3 0];
N = [0 3 1];
O = [0 3 2];
P = [0 3 3];
Q = [1 0 0];
R = [1 0 1];
S = [1 0 2];
T = [1 0 3];
U = [1 1 0];
V = [1 1 1];
W = [1 1 2];
X = [1 1 3];
Y = [1 2 0];
Z = [1 2 1];
a = [1 2 2];
b = [1 2 3];
c = [1 3 0];
d = [1 3 1];
e = [1 3 2];
f = [1 3 3];
g = [2 0 0];
h = [2 0 1];
i = [2 0 2];
j = [2 0 3];
k = [2 1 0];
l = [2 1 1];
m = [2 1 2];
n = [2 1 3];
o = [2 2 0];
p = [2 2 1];
q = [2 2 2];
r = [2 2 3];
s = [2 3 0];
t = [2 3 1];
u = [2 3 2];
v = [2 3 3];
w = [3 0 0];
x = [3 0 1];
y = [3 0 2];
z = [3 0 3];
"0" = [3 1 0];
"1" = [3 1 1];
"2" = [3 1 2];
"3" = [3 1 3];
"4" = [3 2 0];
"5" = [3 2 1];
"6" = [3 2 2];
"7" = [3 2 3];
"8" = [3 3 0];
"9" = [3 3 1];
"+" = [3 3 2];
"/" = [3 3 3];
};
in
take quads (concatMap (c: table.${c}) chars);
# Convert a list of quads with padding into a base16-encoded string.
toBase16 = quads:
if length quads == 0 then "" else
if length quads == 1 then throw "toBase16: odd quads" else
let
hexad = 4 * elemAt quads 0 + elemAt quads 1;
hexits = "0123456789abcdef";
in
substring hexad 1 hexits + toBase16 (drop 2 quads);
in
let
fetchResolved = { resolved, integrity, ... }:
let args = { url = resolved; } // integrityHash integrity; in
fetchurl args;
integrityHash = integrity:
if hasPrefix "sha1-" integrity then integritySHA1 integrity else
if hasPrefix "sha512-" integrity then integritySHA512 integrity else
throw "don't understand integrity: ${integrity}";
integritySHA1 = integrity:
{ sha1 = toBase16 (fromBase64 (removePrefix "sha1-" integrity)); };
integritySHA512 = integrity:
{ sha512 = toBase16 (fromBase64 (removePrefix "sha512-" integrity)); };
in
let
depend = name: attrs@{ version, dependencies ? {}, ... }:
{
inherit name version;
src = fetchResolved attrs;
depends = mapAttrsToList depend dependencies;
};
prepareDepend = { name, src, depends, ... }:
''
unpackFile '${src}'
mv package '${name}'
mkdir -p '${name}/node_modules'
(
cd '${name}/node_modules'
${concatMapStrings prepareDepend depends}
)
'';
in
packageLockFile:
let
packageLock = fromJSON (readFile packageLockFile);
depends = mapAttrsToList depend packageLock.dependencies;
in
''
mkdir -p node_modules
(
cd node_modules
${concatMapStrings prepareDepend depends}
)
''

View file

@ -0,0 +1,29 @@
{ stdenv, fetchFromGitHub, gtk3 }:
stdenv.mkDerivation rec {
pname = "qogir-icon-theme";
version = "2019-09-15";
src = fetchFromGitHub {
owner = "vinceliuice";
repo = pname;
rev = "4e1b6c693615bc2c7c7a11df6f4b90f2e6fb67db";
sha256 = "1vp1wp4fgmy5af8z8nb3m6wgmb6wbwlvx5smf9dxfcn254hdg8g0";
};
nativeBuildInputs = [ gtk3 ];
installPhase = ''
patchShebangs install.sh
mkdir -p $out/share/icons
name= ./install.sh -d $out/share/icons
'';
meta = with stdenv.lib; {
description = "A colorful design icon theme for linux desktops";
homepage = https://github.com/vinceliuice/Qogir-icon-theme;
license = with licenses; [ gpl3 ];
platforms = platforms.linux;
maintainers = with maintainers; [ romildo ];
};
}

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "materia-theme";
version = "20190831";
version = "20190912";
src = fetchFromGitHub {
owner = "nana-4";
repo = pname;
rev = "v${version}";
sha256 = "19b2wyq38wj3id0an47jln1y3zp5ih3kbrgmfpjp6bbdrmfcyccf";
sha256 = "07vbql1y9jfd0m34lw1674cfr6217dzg3irk0450kny8sjrrj6dx";
};
nativeBuildInputs = [ glib libxml2 bc ];

View file

@ -61,6 +61,6 @@ in stdenv.mkDerivation rec {
homepage = https://wiki.gnome.org/Apps/Boxes;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ bjornfor ];
maintainers = gnome3.maintainers;
};
}

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "atril";
version = "1.22.1";
version = "1.22.2";
src = fetchurl {
url = "https://pub.mate-desktop.org/releases/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0i2wgsksgwhrmajj1lay3iym4dcyj8cdd813yh5mrfz4rkv49190";
sha256 = "11l78zkxszvsjr74cmk1wff5ycqrzd89y6k36rydv2rb5af2nsfw";
};
nativeBuildInputs = [

View file

@ -90,9 +90,7 @@ lib.makeScope pkgs.newScope (self: with self; {
elementary-default-settings = callPackage ./desktop/elementary-default-settings { };
elementary-greeter = callPackage ./desktop/elementary-greeter {
inherit (gnome3) gnome-desktop;
};
elementary-greeter = callPackage ./desktop/elementary-greeter { };
elementary-print-shim = callPackage ./desktop/elementary-print-shim { };

View file

@ -1,20 +1,41 @@
{ stdenv, fetchFromGitHub, pantheon, pkgconfig, substituteAll, meson
, ninja, vala, desktop-file-utils, gtk3, granite, libgee, elementary-settings-daemon
, gnome-desktop, mutter, elementary-icon-theme, wingpanel-with-indicators
, elementary-gtk-theme, nixos-artwork, lightdm, numlockx
, clutter-gtk, libGL, dbus, wrapGAppsHook }:
{ stdenv
, fetchFromGitHub
, linkFarm
, elementary-greeter
, pantheon
, pkgconfig
, meson
, ninja
, vala
, desktop-file-utils
, gtk3
, granite
, libgee
, elementary-settings-daemon
, mutter
, elementary-icon-theme
, wingpanel-with-indicators
, elementary-gtk-theme
, nixos-artwork
, lightdm
, gdk-pixbuf
, clutter-gtk
, dbus
, accountsservice
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "elementary-greeter";
version = "3.3.1";
version = "unstable-2019-09-10";
repoName = "greeter";
src = fetchFromGitHub {
owner = "elementary";
repo = repoName;
rev = version;
sha256 = "1vkq4z0hrmvzv4sh2qkxjajdxcycd1zj97a3pc8n4yb858pqfyzc";
rev = "cad7d28d2b40ed04f6ce49ab44408297b5c69468";
sha256 = "0m8iq04wdwgg6arm7dzwi7a0snxvss62zpnw2knpr6lp77vd7hqr";
};
passthru = {
@ -22,6 +43,11 @@ stdenv.mkDerivation rec {
inherit repoName;
attrPath = pname;
};
xgreeters = linkFarm "pantheon-greeter-xgreeters" [{
path = "${elementary-greeter}/share/xgreeters/io.elementary.greeter.desktop";
name = "io.elementary.greeter.desktop";
}];
};
nativeBuildInputs = [
@ -34,38 +60,32 @@ stdenv.mkDerivation rec {
];
buildInputs = [
clutter-gtk
elementary-icon-theme
accountsservice
clutter-gtk # else we get could not generate cargs for mutter-clutter-2
elementary-gtk-theme
elementary-icon-theme
elementary-settings-daemon
gnome-desktop
gdk-pixbuf
granite
gtk3
libgee
libGL
lightdm
mutter
wingpanel-with-indicators
];
patches = [
(substituteAll {
src = ./gsd.patch;
elementary_settings_daemon = "${elementary-settings-daemon}/libexec/";
})
(substituteAll {
src = ./numlockx.patch;
inherit numlockx;
})
./01-sysconfdir-install.patch
./hardcode-theme.patch
];
mesonFlags = [
# A hook does this but after wrapGAppsHook so the files never get wrapped.
"--sbindir=${placeholder "out"}/bin"
# baked into the program for discovery of the greeter configuration
"--sysconfdir=/etc"
# We use the patched gnome-settings-daemon
"-Dubuntu-patched-gsd=true"
"-Dgsd-dir=${elementary-settings-daemon}/libexec/" # trailing slash is needed
];
patches = [
./sysconfdir-install.patch
];
preFixup = ''
@ -76,18 +96,19 @@ stdenv.mkDerivation rec {
# for `wingpanel -g`
--prefix PATH : "${wingpanel-with-indicators}/bin"
# TODO: they should be using meson for this
# See: https://github.com/elementary/greeter/blob/19c0730fded4e9ddec5a491f0e78f83c7c04eb59/src/PantheonGreeter.vala#L451
# for the compositor
--prefix PATH : "$out/bin"
)
'';
postFixup = ''
substituteInPlace $out/share/xgreeters/io.elementary.greeter.desktop \
--replace "Exec=io.elementary.greeter" "Exec=$out/bin/io.elementary.greeter"
# Use NixOS default wallpaper
substituteInPlace $out/etc/lightdm/io.elementary.greeter.conf \
--replace "#default-wallpaper=/usr/share/backgrounds/elementaryos-default" "default-wallpaper=${nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png"
--replace "#default-wallpaper=/usr/share/backgrounds/elementaryos-default" \
"default-wallpaper=${nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png"
substituteInPlace $out/share/xgreeters/io.elementary.greeter.desktop \
--replace "Exec=io.elementary.greeter" "Exec=$out/bin/io.elementary.greeter"
'';
meta = with stdenv.lib; {

View file

@ -1,13 +0,0 @@
diff --git a/src/meson.build b/src/meson.build
index 2450c1a..a908d11 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,7 +1,7 @@
conf_data = configuration_data()
conf_data.set('CONF_DIR', join_paths(get_option('sysconfdir'), 'lightdm'))
conf_data.set('GETTEXT_PACKAGE', meson.project_name())
-conf_data.set('GSD_DIR', '/usr/lib/gnome-settings-daemon/')
+conf_data.set('GSD_DIR', '@elementary_settings_daemon@')
conf_data.set('VERSION', meson.project_version())
config_header = configure_file (
input: 'config.vala.in',

View file

@ -1,15 +0,0 @@
diff --git a/src/PantheonGreeter.vala b/src/PantheonGreeter.vala
index 11aa4c0..daf4a8a 100644
--- a/src/PantheonGreeter.vala
+++ b/src/PantheonGreeter.vala
@@ -474,6 +474,10 @@ public static int main (string [] args) {
Gdk.CursorType.LEFT_PTR);
Gdk.get_default_root_window ().set_cursor (cursor);
+ var settings = Gtk.Settings.get_default ();
+ settings.gtk_icon_theme_name = "elementary";
+ settings.gtk_theme_name = "elementary";
+
var icon_theme = Gtk.IconTheme.get_default ();
icon_theme.add_resource_path ("/io/elementary/greeter/icons");

View file

@ -1,13 +0,0 @@
diff --git a/src/PantheonGreeter.vala b/src/PantheonGreeter.vala
index 11aa4c0..ae7bf7e 100644
--- a/src/PantheonGreeter.vala
+++ b/src/PantheonGreeter.vala
@@ -163,7 +163,7 @@ public class PantheonGreeter : Gtk.Window {
warning (e.message);
}
if (activate_numlock) {
- Granite.Services.System.execute_command ("/usr/bin/numlockx on");
+ Granite.Services.System.execute_command ("@numlockx@/bin/numlockx on");
}
var screensaver_timeout = 60;

View file

@ -1,14 +1,14 @@
From 2384bee55a46eac44eb9d329be4c2a097e053ae1 Mon Sep 17 00:00:00 2001
From 7bb0d507cbb0122f167127b9f6460bd53d8234de Mon Sep 17 00:00:00 2001
From: worldofpeace <worldofpeace@users.noreply.github.com>
Date: Tue, 17 Jul 2018 07:04:18 -0400
Subject: [PATCH 1/1] 'sysconfdir' will be etc not /etc for install
Date: Sat, 16 Mar 2019 16:07:24 -0400
Subject: [PATCH] 'sysconfdir' will be etc not /etc for install
---
data/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/meson.build b/data/meson.build
index 7621b03..7c08eaf 100644
index fd54b75..b1120ae 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -20,7 +20,7 @@ i18n.merge_file (
@ -19,7 +19,7 @@ index 7621b03..7c08eaf 100644
+ install_dir: join_paths(get_option('prefix'), 'etc', 'lightdm')
)
install_data(
test (
--
2.17.1
2.19.2

View file

@ -14,6 +14,8 @@
, mutter
, json-glib
, python3
, elementary-gtk-theme
, elementary-icon-theme
}:
stdenv.mkDerivation rec {
@ -44,6 +46,8 @@ stdenv.mkDerivation rec {
];
buildInputs = [
elementary-gtk-theme
elementary-icon-theme
gala
granite
gtk3

View file

@ -1,4 +1,6 @@
{ stdenv, fetchgit, flex, bison, pkgconfig, python2, swig, which }:
{ stdenv, lib, fetchgit, flex, bison, pkgconfig, which
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform, python2, swig
}:
stdenv.mkDerivation rec {
pname = "dtc";
@ -10,16 +12,17 @@ stdenv.mkDerivation rec {
sha256 = "1jhhfrg22h53lvm2lqhd66pyk20pil08ry03wcwyx1c3ln27k73z";
};
nativeBuildInputs = [ flex bison pkgconfig swig which ];
buildInputs = [ python2 ];
nativeBuildInputs = [ flex bison pkgconfig which ] ++ lib.optionals pythonSupport [ python2 swig ];
buildInputs = lib.optionals pythonSupport [ python2 ];
postPatch = ''
patchShebangs pylibfdt/
'';
makeFlags = lib.optionals (!pythonSupport) [ "NO_PYTHON=1" ];
installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Device Tree Compiler";
homepage = https://git.kernel.org/cgit/utils/dtc/dtc.git;
license = licenses.gpl2; # dtc itself is GPLv2, libfdt is dual GPL/BSD

View file

@ -12,7 +12,7 @@ let
inherit (stdenv.hostPlatform) system;
};
hsPkgs = haskell.packages.ghc864.override {
hsPkgs = haskell.packages.ghc865.override {
overrides = self: super: with haskell.lib;
let elmPkgs = rec {
elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: {

View file

@ -1,281 +0,0 @@
{ stdenv, pkgsBuildTarget, targetPackages
# build-tools
, bootPkgs
, autoconf, autoreconfHook, automake, coreutils, fetchurl, fetchpatch, perl, python3, sphinx
, bash
, runCommand
, libiconv ? null, ncurses
, enableDwarf ? !stdenv.isDarwin, elfutils # for DWARF support
, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
buildLlvmPackages, llvmPackages
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
enableShared ? !stdenv.targetPlatform.useiOSPrebuilt
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
, # Whether to backport https://phabricator.haskell.org/D4388 for
# deterministic profiling symbol names, at the cost of a slightly
# non-standard GHC API
deterministicProfiling ? false
}:
assert !enableIntegerSimple -> gmp != null;
let
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
inherit (bootPkgs) ghc;
# TODO(@Ericson2314) Make unconditional
targetPrefix = stdenv.lib.optionalString
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";
buildMK = ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
endif
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
GhcLibHcOpts += -fPIC
GhcRtsHcOpts += -fPIC
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
EXTRA_CC_OPTS += -std=gnu99
'';
# Splicer will pull out correct variations
libDeps = platform: [ ncurses ]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc") libiconv
++ stdenv.lib.optional enableDwarf elfutils;
toolsForTarget = [
pkgsBuildTarget.targetPackages.stdenv.cc
] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
targetCC = builtins.head toolsForTarget;
in
stdenv.mkDerivation (rec {
version = "8.2.2";
name = "${targetPrefix}ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "1z05vkpaj54xdypmaml50hgsdpw29dhbs2r7magx0cm199iw73mv";
};
enableParallelBuilding = true;
outputs = [ "out" "doc" ];
patches = [
(fetchpatch { # Fix STRIP to be substituted from configure
url = "https://git.haskell.org/ghc.git/commitdiff_plain/2fc8ce5f0c8c81771c26266ac0b150ca9b75c5f3";
sha256 = "03253ci40np1v6k0wmi4aypj3nmj3rdyvb1k6rwqipb30nfc719f";
})
(import ./abi-depends-determinism.nix { inherit fetchpatch runCommand; })
] ++ stdenv.lib.optionals (hostPlatform != targetPlatform) [
# Cherry-pick a few commits from newer hsc2hs so that proper binary is
# installed -- stage 2 normally but stage 1 with cross.
#
# TODO make unconditional next mass rebuild.
(fetchpatch {
url = "https://git.haskell.org/hsc2hs.git/patch/ecdac062b5cf1d284906487849c56f4e149b3c8e";
sha256 = "1gagswi26j50z44sdx0mk1sb3wr0nrqyaph9j724zp6iwqslxyzm";
extraPrefix = "utils/hsc2hs/";
stripLen = 1;
})
(fetchpatch {
url = "https://git.haskell.org/hsc2hs.git/patch/598303cbffcd230635fbce28ce4105d177fdf76a";
sha256 = "0hqcg434qbh1bz1pk85cap2q4v9i8bs6x65yzq4spz6xk3zq6af7";
extraPrefix = "utils/hsc2hs/";
stripLen = 1;
})
(fetchpatch {
url = "https://git.haskell.org/hsc2hs.git/patch/9483ad10064fbbb97ab525280623826b1ef63959";
sha256 = "1cpfdhfc0cz9xkjzkcgwx4fbyj96dkmd04wpwi1vji7fahw8kmf3";
extraPrefix = "utils/hsc2hs/";
stripLen = 1;
})
(fetchpatch {
url = "https://git.haskell.org/hsc2hs.git/patch/738f3666c878ee9e79c3d5e819ef8b3460288edf";
sha256 = "0plzsbfaq6vb1023lsarrjglwgr9chld4q3m99rcfzx0yx5mibp3";
extraPrefix = "utils/hsc2hs/";
stripLen = 1;
})
] ++ stdenv.lib.optionals (hostPlatform != targetPlatform && targetPlatform.system == hostPlatform.system) [
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/gentoo/08a41d2dff99645af6ac5a7bb4774f5f193b6f20/dev-lang/ghc/files/ghc-8.2.1_rc1-unphased-cross.patch";
sha256 = "1hxj80bjx0x3w0f35cj3k2wipppr1ald03jwfy5q0xlxygdha17w";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/gentoo/08a41d2dff99645af6ac5a7bb4774f5f193b6f20/dev-lang/ghc/files/ghc-8.2.1_rc1-staged-cross.patch";
sha256 = "12xsln3zyfpvml8bwdpbc003h6zl1qh2qcq1rhdrw02n45dz8lvc";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/gentoo/08a41d2dff99645af6ac5a7bb4774f5f193b6f20/dev-lang/ghc/files/ghc-8.2.1_rc1-ghci-cross.patch";
sha256 = "03dcqf5af3vjhrky3f2z26j4d9h8qd9nkv76xp0l97h4cqk7vfqb";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/gentoo/08a41d2dff99645af6ac5a7bb4774f5f193b6f20/dev-lang/ghc/files/ghc-8.2.1_rc1-stage2-cross.patch";
sha256 = "0pi2m85wjxaaablq6n4q5vyn9qxvry5d7nmja4b28i68yb4ly9g1";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/gentoo/08a41d2dff99645af6ac5a7bb4774f5f193b6f20/dev-lang/ghc/files/ghc-8.2.1_rc1-hp2ps-cross.patch";
sha256 = "1fszfavf1cvrf02x500mi7jykcpvpl2i7i4qzr2qz9sbmyq063f0";
})
] ++ stdenv.lib.optional deterministicProfiling
(fetchpatch { # Backport of https://phabricator.haskell.org/D4388 for more determinism
url = "https://github.com/shlevy/ghc/commit/fec1b8d3555c447c0d8da0e96b659be67c8bb4bc.patch";
sha256 = "1lyysz6hfd1njcigpm8xppbnkadqfs0kvrp7s8vqgb38pjswj5hg";
})
++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch;
postPatch = "patchShebangs .";
# GHC is a bit confused on its cross terminology.
preConfigure = ''
for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
export "''${env#TARGET_}=''${!env}"
done
# GHC is a bit confused on its cross terminology, as these would normally be
# the *host* tools.
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isLinux ".gold"}"
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
'';
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ]
++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# `--with` flags for libraries needed for RTS linker
configureFlags = [
"--datadir=$doc/share/doc/ghc"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform) [
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"
] ++ stdenv.lib.optionals (targetPlatform.isAarch32) [
"CFLAGS=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
] ++ stdenv.lib.optionals (targetPlatform.isDarwin && targetPlatform.isAarch64) [
# fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
"--disable-large-address-space"
] ++ stdenv.lib.optional enableDwarf [
"--enable-dwarf-unwind"
];
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.
dontAddExtraLibs = true;
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
nativeBuildInputs = [
autoconf autoreconfHook automake perl python3 sphinx
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
];
# For building runtime libs
depsBuildTarget = toolsForTarget;
buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
propagatedBuildInputs = [ targetPackages.stdenv.cc ]
++ stdenv.lib.optional useLLVM llvmPackages.llvm;
depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
# See #63511 - the only unstripped file is the debug rts which isn't meant to
# be stripped.
dontStrip = true;
checkTarget = "test";
doCheck = false; # fails with "testsuite/tests: No such file or directory. Stop."
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
postInstall = ''
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
# Patch scripts to include "readelf" and "cat" in $PATH.
for i in "$out/bin/"*; do
test ! -h $i || continue
egrep --quiet '^#!' <(head -n 1 $i) || continue
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
done
'';
passthru = {
inherit bootPkgs targetPrefix;
inherit llvmPackages;
inherit enableShared;
# Our Cabal compiler name
haskellCompilerName = "ghc-8.2.2";
};
meta = {
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;
};
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
dontStrip = true;
dontPatchELF = true;
noAuditTmpdir = true;
})

View file

@ -7,8 +7,6 @@
, libiconv ? null, ncurses
, enableDwarf ? !stdenv.isDarwin, elfutils # for DWARF support
, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
@ -73,8 +71,7 @@ let
# Splicer will pull out correct variations
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
++ stdenv.lib.optional enableDwarf elfutils;
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
toolsForTarget = [
pkgsBuildTarget.targetPackages.stdenv.cc
@ -183,8 +180,6 @@ stdenv.mkDerivation (rec {
] ++ stdenv.lib.optionals (targetPlatform.isDarwin && targetPlatform.isAarch64) [
# fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
"--disable-large-address-space"
] ++ stdenv.lib.optional enableDwarf [
"--enable-dwarf-unwind"
];
# Make sure we never relax`$PATH` and hooks support for compatability.

View file

@ -1,256 +0,0 @@
{ stdenv, pkgsBuildTarget, targetPackages
# build-tools
, bootPkgs
, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4, sphinx
, bash
, libiconv ? null, ncurses
, enableDwarf ? !stdenv.isDarwin, elfutils # for DWARF support
, # GHC can be built with system libffi or a bundled one.
libffi ? null
, useLLVM ? !stdenv.targetPlatform.isx86
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
buildLlvmPackages, llvmPackages
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
, # Whetherto build terminfo.
enableTerminfo ? !stdenv.targetPlatform.isWindows
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
(if useLLVM then "perf-cross" else "perf-cross-ncg")
, # Whether to disable the large address space allocator
# necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
}:
assert !enableIntegerSimple -> gmp != null;
let
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
inherit (bootPkgs) ghc;
# TODO(@Ericson2314) Make unconditional
targetPrefix = stdenv.lib.optionalString
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";
buildMK = ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
endif
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
GhcLibHcOpts += -fPIC
GhcRtsHcOpts += -fPIC
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
EXTRA_CC_OPTS += -std=gnu99
'';
# Splicer will pull out correct variations
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
++ [libffi]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
++ stdenv.lib.optional enableDwarf elfutils;
toolsForTarget = [
pkgsBuildTarget.targetPackages.stdenv.cc
] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
targetCC = builtins.head toolsForTarget;
in
stdenv.mkDerivation (rec {
version = "8.6.4";
name = "${targetPrefix}ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "0fihs1sr0hpk67dn9cmrsav13kkcp9hz8ggdqcrs80rj8vj0fpav";
};
enableParallelBuilding = true;
outputs = [ "out" "doc" ];
patches = [
(fetchpatch rec { # https://phabricator.haskell.org/D5123
url = "http://tarballs.nixos.org/sha256/${sha256}";
name = "D5123.diff";
sha256 = "0nhqwdamf2y4gbwqxcgjxs0kqx23w9gv5kj0zv6450dq19rji82n";
})
(fetchpatch { # https://github.com/haskell/haddock/issues/900
url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/983.diff";
name = "loadpluginsinmodules.diff";
sha256 = "0bvvv0zsfq2581zsir97zfkggc1kkircbbajc2fz3b169ycpbha1";
extraPrefix = "utils/haddock/";
stripLen = 1;
})
];
postPatch = "patchShebangs .";
# GHC is a bit confused on its cross terminology.
preConfigure = ''
for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
export "''${env#TARGET_}=''${!env}"
done
# GHC is a bit confused on its cross terminology, as these would normally be
# the *host* tools.
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isLinux ".gold"}"
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
'' + stdenv.lib.optionalString targetPlatform.isMusl ''
echo "patching llvm-targets for musl targets..."
echo "Cloning these existing '*-linux-gnu*' targets:"
grep linux-gnu llvm-targets | sed 's/^/ /'
echo "(go go gadget sed)"
sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
echo "llvm-targets now contains these '*-linux-musl*' targets:"
grep linux-musl llvm-targets | sed 's/^/ /'
echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
# (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
for x in configure aclocal.m4; do
substituteInPlace $x \
--replace '*-android*|*-gnueabi*)' \
'*-android*|*-gnueabi*|*-musleabi*)'
done
'';
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ]
++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# `--with` flags for libraries needed for RTS linker
configureFlags = [
"--datadir=$doc/share/doc/ghc"
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optionals (libffi != null) ["--with-system-libffi" "--with-ffi-includes=${targetPackages.libffi.dev}/include" "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"
] ++ stdenv.lib.optionals (targetPlatform.isAarch32) [
"CFLAGS=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
"--disable-large-address-space"
] ++ stdenv.lib.optional enableDwarf [
"--enable-dwarf-unwind"
];
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.
dontAddExtraLibs = true;
nativeBuildInputs = [
perl autoconf automake m4 python3 sphinx
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
];
# For building runtime libs
depsBuildTarget = toolsForTarget;
buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
propagatedBuildInputs = [ targetPackages.stdenv.cc ]
++ stdenv.lib.optional useLLVM llvmPackages.llvm;
depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
# See #63511 - the only unstripped file is the debug rts which isn't meant to
# be stripped.
dontStrip = true;
checkTarget = "test";
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
postInstall = ''
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
# Patch scripts to include "readelf" and "cat" in $PATH.
for i in "$out/bin/"*; do
test ! -h $i || continue
egrep --quiet '^#!' <(head -n 1 $i) || continue
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
done
'';
passthru = {
inherit bootPkgs targetPrefix;
inherit llvmPackages;
inherit enableShared;
# Our Cabal compiler name
haskellCompilerName = "ghc-8.6.4";
};
meta = {
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;
};
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
dontStrip = true;
dontPatchELF = true;
noAuditTmpdir = true;
})

View file

@ -7,8 +7,6 @@
, libiconv ? null, ncurses
, enableDwarf ? !stdenv.isDarwin, elfutils # for DWARF support
, # GHC can be built with system libffi or a bundled one.
libffi ? null
@ -78,8 +76,7 @@ let
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
++ [libffi]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
++ stdenv.lib.optional enableDwarf elfutils;
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
toolsForTarget = [
pkgsBuildTarget.targetPackages.stdenv.cc
@ -182,8 +179,6 @@ stdenv.mkDerivation (rec {
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
"--disable-large-address-space"
] ++ stdenv.lib.optional enableDwarf [
"--enable-dwarf-unwind"
];
# Make sure we never relax`$PATH` and hooks support for compatability.

View file

@ -7,8 +7,6 @@
, libiconv ? null, ncurses
, enableDwarf ? !stdenv.isDarwin, elfutils # for DWARF support
, # GHC can be built with system libffi or a bundled one.
libffi ? null
@ -78,8 +76,7 @@ let
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
++ [libffi]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
++ stdenv.lib.optional enableDwarf elfutils;
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
toolsForTarget = [
pkgsBuildTarget.targetPackages.stdenv.cc
@ -167,8 +164,6 @@ stdenv.mkDerivation (rec {
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
"--disable-large-address-space"
] ++ stdenv.lib.optional enableDwarf [
"--enable-dwarf-unwind"
];
# Make sure we never relax`$PATH` and hooks support for compatability.

Some files were not shown because too many files have changed in this diff Show more