Merge branch 'master' into staging-next
This commit is contained in:
commit
62791c3743
@ -485,10 +485,10 @@ nix-build <nixpkgs> --arg crossSystem '{ config = "<arch>-<os>
|
|||||||
<xref
|
<xref
|
||||||
linkend="ssec-cross-dependency-categorization"/> are specified as
|
linkend="ssec-cross-dependency-categorization"/> are specified as
|
||||||
lists of derivations given to <varname>mkDerivation</varname>, as
|
lists of derivations given to <varname>mkDerivation</varname>, as
|
||||||
documented in <xref linkend="ssec-stdenv-dependencies"/>. In short,
|
documented in <xref linkend="ssec-stdenv-dependencies"/>. In short, each
|
||||||
each list of dependencies for "host → target" of "foo → bar" is called
|
list of dependencies for "host → target" of "foo → bar" is called
|
||||||
<varname>depsFooBar</varname>, with exceptions for backwards
|
<varname>depsFooBar</varname>, with exceptions for backwards compatibility
|
||||||
compatibility that <varname>depsBuildHost</varname> is instead called
|
that <varname>depsBuildHost</varname> is instead called
|
||||||
<varname>nativeBuildInputs</varname> and <varname>depsHostTarget</varname>
|
<varname>nativeBuildInputs</varname> and <varname>depsHostTarget</varname>
|
||||||
is instead called <varname>buildInputs</varname>. Nixpkgs is now structured
|
is instead called <varname>buildInputs</varname>. Nixpkgs is now structured
|
||||||
so that each <varname>depsFooBar</varname> is automatically taken from
|
so that each <varname>depsFooBar</varname> is automatically taken from
|
||||||
@ -507,9 +507,8 @@ nix-build <nixpkgs> --arg crossSystem '{ config = "<arch>-<os>
|
|||||||
<varname>buildPackages</varname>, <varname>pkgs</varname>, and
|
<varname>buildPackages</varname>, <varname>pkgs</varname>, and
|
||||||
<varname>targetPackages</varname>. Those are now redefined as aliases to
|
<varname>targetPackages</varname>. Those are now redefined as aliases to
|
||||||
<varname>pkgsBuildHost</varname>, <varname>pkgsHostTarget</varname>, and
|
<varname>pkgsBuildHost</varname>, <varname>pkgsHostTarget</varname>, and
|
||||||
<varname>pkgsTargetTarget</varname>. It is acceptable, even
|
<varname>pkgsTargetTarget</varname>. It is acceptable, even recommended, to
|
||||||
recommended, to use them for libraries to show that the host platform is
|
use them for libraries to show that the host platform is irrelevant.
|
||||||
irrelevant.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -581,14 +580,15 @@ nix-build <nixpkgs> --arg crossSystem '{ config = "<arch>-<os>
|
|||||||
<varname>pkgsHostTarget</varname> refers to the current one, and
|
<varname>pkgsHostTarget</varname> refers to the current one, and
|
||||||
<varname>pkgsTargetTarget</varname> refers to the next one. When there is
|
<varname>pkgsTargetTarget</varname> refers to the next one. When there is
|
||||||
no previous or next stage, they instead refer to the current stage. Note
|
no previous or next stage, they instead refer to the current stage. Note
|
||||||
how all the invariants regarding the mapping between dependency and depending
|
how all the invariants regarding the mapping between dependency and
|
||||||
packages' build host and target platforms are preserved.
|
depending packages' build host and target platforms are preserved.
|
||||||
<varname>pkgsBuildTarget</varname> and <varname>pkgsHostHost</varname> are
|
<varname>pkgsBuildTarget</varname> and <varname>pkgsHostHost</varname> are
|
||||||
more complex in that the stage fitting the requirements isn't always a
|
more complex in that the stage fitting the requirements isn't always a
|
||||||
fixed chain of "prevs" and "nexts" away (modulo the "saturating"
|
fixed chain of "prevs" and "nexts" away (modulo the "saturating"
|
||||||
self-references at the ends). We just special case each instead. All the primary
|
self-references at the ends). We just special case each instead. All the
|
||||||
edges are implemented is in <filename>pkgs/stdenv/booter.nix</filename>,
|
primary edges are implemented is in
|
||||||
and secondarily aliases in <filename>pkgs/top-level/stage.nix</filename>.
|
<filename>pkgs/stdenv/booter.nix</filename>, and secondarily aliases in
|
||||||
|
<filename>pkgs/top-level/stage.nix</filename>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
@ -645,19 +645,19 @@ nix-build <nixpkgs> --arg crossSystem '{ config = "<arch>-<os>
|
|||||||
"infinite recursions" / cycles. When only package sets that don't mention
|
"infinite recursions" / cycles. When only package sets that don't mention
|
||||||
target are used, the package set forms a directed acyclic graph. This
|
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
|
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
|
they are a lot smaller, and easier to follow in the code or a backtrace.
|
||||||
also means they are present in native and cross builds alike, and so more
|
It also means they are present in native and cross builds alike, and so
|
||||||
likely to be caught by CI and other users.
|
more likely to be caught by CI and other users.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Thirdly, it is because everything target-mentioning only exists to
|
Thirdly, it is because everything target-mentioning only exists to
|
||||||
accommodate compilers with lousy build systems that insist on the compiler
|
accommodate compilers with lousy build systems that insist on the compiler
|
||||||
itself and standard library being built together. Of course that is bad
|
itself and standard library being built together. Of course that is bad
|
||||||
because bigger derivations means longer rebuilds. It is also problematic because
|
because bigger derivations means longer rebuilds. It is also problematic
|
||||||
it tends to make the standard libraries less like other libraries than
|
because it tends to make the standard libraries less like other libraries
|
||||||
they could be, complicating code and build systems alike. Because of the
|
than they could be, complicating code and build systems alike. Because of
|
||||||
other problems, and because of these innate disadvantages, compilers ought
|
the other problems, and because of these innate disadvantages, compilers
|
||||||
to be packaged another way where possible.
|
ought to be packaged another way where possible.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
|
@ -325,10 +325,9 @@ hello latest de2bf4786de6 About a minute ago 25.2MB
|
|||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Shell commands to run while building the final layer, without access
|
Shell commands to run while building the final layer, without access to
|
||||||
to most of the layer contents. Changes to this layer are "on top"
|
most of the layer contents. Changes to this layer are "on top" of all the
|
||||||
of all the other layers, so can create additional directories
|
other layers, so can create additional directories and files.
|
||||||
and files.
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -493,28 +492,23 @@ pullImage {
|
|||||||
</calloutlist>
|
</calloutlist>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<literal>nix-prefetch-docker</literal> command can be used to get required
|
<literal>nix-prefetch-docker</literal> command can be used to get required
|
||||||
image parameters:
|
image parameters:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>$ </prompt>nix run nixpkgs.nix-prefetch-docker -c nix-prefetch-docker --image-name mysql --image-tag 5
|
<prompt>$ </prompt>nix run nixpkgs.nix-prefetch-docker -c nix-prefetch-docker --image-name mysql --image-tag 5
|
||||||
</screen>
|
</screen>
|
||||||
|
Since a given <varname>imageName</varname> may transparently refer to a
|
||||||
Since a given <varname>imageName</varname> may transparently refer to a
|
manifest list of images which support multiple architectures and/or
|
||||||
manifest list of images which support multiple architectures and/or
|
operating systems, you can supply the <option>--os</option> and
|
||||||
operating systems, you can supply the <option>--os</option> and
|
<option>--arch</option> arguments to specify exactly which image you want.
|
||||||
<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
|
||||||
By default it will match the OS and architecture of the host the command is
|
run on.
|
||||||
run on.
|
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>$ </prompt>nix-prefetch-docker --image-name mysql --image-tag 5 --arch x86_64 --os linux
|
<prompt>$ </prompt>nix-prefetch-docker --image-name mysql --image-tag 5 --arch x86_64 --os linux
|
||||||
</screen>
|
</screen>
|
||||||
|
Desired image name and tag can be set using
|
||||||
Desired image name and tag can be set using
|
<option>--final-image-name</option> and <option>--final-image-tag</option>
|
||||||
<option>--final-image-name</option> and <option>--final-image-tag</option>
|
arguments:
|
||||||
arguments:
|
|
||||||
|
|
||||||
<screen>
|
<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
|
<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>
|
</screen>
|
||||||
|
@ -51,10 +51,10 @@ buildContainer {
|
|||||||
<calloutlist>
|
<calloutlist>
|
||||||
<callout arearefs='ex-ociTools-buildContainer-1'>
|
<callout arearefs='ex-ociTools-buildContainer-1'>
|
||||||
<para>
|
<para>
|
||||||
<varname>args</varname> specifies a set of arguments to run inside the container.
|
<varname>args</varname> specifies a set of arguments to run inside the
|
||||||
This is the only required argument for <varname>buildContainer</varname>.
|
container. This is the only required argument for
|
||||||
All referenced packages inside the derivation will be made available
|
<varname>buildContainer</varname>. All referenced packages inside the
|
||||||
inside the container
|
derivation will be made available inside the container
|
||||||
</para>
|
</para>
|
||||||
</callout>
|
</callout>
|
||||||
<callout arearefs='ex-ociTools-buildContainer-2'>
|
<callout arearefs='ex-ociTools-buildContainer-2'>
|
||||||
@ -66,8 +66,8 @@ buildContainer {
|
|||||||
</callout>
|
</callout>
|
||||||
<callout arearefs='ex-ociTools-buildContainer-3'>
|
<callout arearefs='ex-ociTools-buildContainer-3'>
|
||||||
<para>
|
<para>
|
||||||
<varname>readonly</varname> makes the container's rootfs read-only if it is set to true.
|
<varname>readonly</varname> makes the container's rootfs read-only if it
|
||||||
The default value is false <literal>false</literal>.
|
is set to true. The default value is false <literal>false</literal>.
|
||||||
</para>
|
</para>
|
||||||
</callout>
|
</callout>
|
||||||
</calloutlist>
|
</calloutlist>
|
||||||
|
@ -5,26 +5,53 @@
|
|||||||
<title>Packaging GNOME applications</title>
|
<title>Packaging GNOME applications</title>
|
||||||
|
|
||||||
<para>
|
<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 Nix’s 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 Nix’s 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>
|
</para>
|
||||||
|
|
||||||
<section xml:id="ssec-gnome-settings">
|
<section xml:id="ssec-gnome-settings">
|
||||||
<title>Settings</title>
|
<title>Settings</title>
|
||||||
|
|
||||||
<para>
|
<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>
|
||||||
|
|
||||||
<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>
|
||||||
|
|
||||||
<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>
|
||||||
|
|
||||||
<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>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -32,7 +59,16 @@
|
|||||||
<title>Icons</title>
|
<title>Icons</title>
|
||||||
|
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -40,7 +76,12 @@
|
|||||||
<title>GTK Themes</title>
|
<title>GTK Themes</title>
|
||||||
|
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -48,7 +89,10 @@
|
|||||||
<title>GObject introspection typelibs</title>
|
<title>GObject introspection typelibs</title>
|
||||||
|
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -56,7 +100,11 @@
|
|||||||
<title>Various plug-ins</title>
|
<title>Various plug-ins</title>
|
||||||
|
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@ -65,7 +113,8 @@
|
|||||||
<title>Onto <package>wrapGAppsHook</package></title>
|
<title>Onto <package>wrapGAppsHook</package></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Given the requirements above, the package expression would become messy quickly:
|
Given the requirements above, the package expression would become messy
|
||||||
|
quickly:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
for f in $(find $out/bin/ $out/libexec/ -type f -executable); do
|
for f in $(find $out/bin/ $out/libexec/ -type f -executable); do
|
||||||
@ -79,48 +128,76 @@ preFixup = ''
|
|||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
</programlisting>
|
</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>
|
<itemizedlist>
|
||||||
<listitem xml:id="ssec-gnome-hooks-wrapgappshook">
|
<listitem xml:id="ssec-gnome-hooks-wrapgappshook">
|
||||||
<para>
|
<para>
|
||||||
<package>wrapGAppsHook</package> itself will add the package’s <filename>share</filename> directory to <envar>XDG_DATA_DIRS</envar>.
|
<package>wrapGAppsHook</package> itself will add the package’s
|
||||||
|
<filename>share</filename> directory to <envar>XDG_DATA_DIRS</envar>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem xml:id="ssec-gnome-hooks-glib">
|
<listitem xml:id="ssec-gnome-hooks-glib">
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem xml:id="ssec-gnome-hooks-dconf">
|
<listitem xml:id="ssec-gnome-hooks-dconf">
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem xml:id="ssec-gnome-hooks-hicolor-icon-theme">
|
<listitem xml:id="ssec-gnome-hooks-hicolor-icon-theme">
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem xml:id="ssec-gnome-hooks-gobject-introspection">
|
<listitem xml:id="ssec-gnome-hooks-gobject-introspection">
|
||||||
<para>
|
<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>
|
</para>
|
||||||
<warning>
|
<warning>
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</warning>
|
</warning>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem xml:id="ssec-gnome-hooks-gst-grl-plugins">
|
<listitem xml:id="ssec-gnome-hooks-gst-grl-plugins">
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<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>
|
<programlisting>
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
gappsWrapperArgs+=(
|
gappsWrapperArgs+=(
|
||||||
@ -138,7 +215,13 @@ preFixup = ''
|
|||||||
<title>Updating GNOME packages</title>
|
<title>Updating GNOME packages</title>
|
||||||
|
|
||||||
<para>
|
<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 package’s <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
|
||||||
|
package’s <filename>NEWS</filename> file to see what changed.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -152,7 +235,17 @@ preFixup = ''
|
|||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -162,7 +255,11 @@ preFixup = ''
|
|||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -172,7 +269,14 @@ preFixup = ''
|
|||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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>
|
||||||
<para>
|
<para>
|
||||||
In the case of a Python application it could look like:
|
In the case of a Python application it could look like:
|
||||||
@ -224,34 +328,55 @@ mkDerivation {
|
|||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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>
|
<itemizedlist>
|
||||||
<listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gnome-shell-ext">
|
<listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gnome-shell-ext">
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings">
|
<listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings">
|
||||||
<para>
|
<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>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
<para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-vala">
|
<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>
|
||||||
<para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-c">
|
<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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
@ -141,8 +141,8 @@ ClassC3Componentised = buildPerlPackage rec {
|
|||||||
<para>
|
<para>
|
||||||
On Darwin, if a script has too many
|
On Darwin, if a script has too many
|
||||||
<literal>-I<replaceable>dir</replaceable></literal> flags in its first line
|
<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
|
(its “shebang line”), it will not run. This can be worked around by
|
||||||
the <literal>shortenPerlShebang</literal> function from the
|
calling the <literal>shortenPerlShebang</literal> function from the
|
||||||
<literal>postInstall</literal> phase:
|
<literal>postInstall</literal> phase:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{ stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
|
{ stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
|
||||||
@ -162,10 +162,10 @@ ImageExifTool = buildPerlPackage {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
</programlisting>
|
</programlisting>
|
||||||
This will remove the <literal>-I</literal> flags from the shebang line,
|
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
|
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
|
line instead. This function can be given any number of Perl scripts as
|
||||||
arguments; it will modify them in-place.
|
arguments; it will modify them in-place.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section xml:id="ssec-generation-from-CPAN">
|
<section xml:id="ssec-generation-from-CPAN">
|
||||||
|
@ -4,16 +4,16 @@
|
|||||||
<title>Qt</title>
|
<title>Qt</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This section describes the differences between Nix expressions for Qt
|
This section describes the differences between Nix expressions for Qt
|
||||||
libraries and applications and Nix expressions for other C++ software. Some
|
libraries and applications and Nix expressions for other C++ software. Some
|
||||||
knowledge of the latter is assumed. There are primarily two problems which
|
knowledge of the latter is assumed. There are primarily two problems which
|
||||||
the Qt infrastructure is designed to address: ensuring consistent versioning
|
the Qt infrastructure is designed to address: ensuring consistent versioning
|
||||||
of all dependencies and finding dependencies at runtime.
|
of all dependencies and finding dependencies at runtime.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<example xml:id='qt-default-nix'>
|
<example xml:id='qt-default-nix'>
|
||||||
<title>Nix expression for a Qt package (<filename>default.nix</filename>)</title>
|
<title>Nix expression for a Qt package (<filename>default.nix</filename>)</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{ mkDerivation, lib, qtbase }: <co xml:id='qt-default-nix-co-1' />
|
{ mkDerivation, lib, qtbase }: <co xml:id='qt-default-nix-co-1' />
|
||||||
|
|
||||||
mkDerivation { <co xml:id='qt-default-nix-co-2' />
|
mkDerivation { <co xml:id='qt-default-nix-co-2' />
|
||||||
@ -26,53 +26,51 @@ mkDerivation { <co xml:id='qt-default-nix-co-2' />
|
|||||||
</example>
|
</example>
|
||||||
|
|
||||||
<calloutlist>
|
<calloutlist>
|
||||||
<callout arearefs='qt-default-nix-co-1'>
|
<callout arearefs='qt-default-nix-co-1'>
|
||||||
<para>
|
<para>
|
||||||
Import <literal>mkDerivation</literal> and Qt (such as
|
Import <literal>mkDerivation</literal> and Qt (such as
|
||||||
<literal>qtbase</literal> modules directly. <emphasis>Do not</emphasis>
|
<literal>qtbase</literal> modules directly. <emphasis>Do not</emphasis>
|
||||||
import Qt package sets; the Qt versions of dependencies may not be
|
import Qt package sets; the Qt versions of dependencies may not be
|
||||||
coherent, causing build and runtime failures.
|
coherent, causing build and runtime failures.
|
||||||
</para>
|
</para>
|
||||||
</callout>
|
</callout>
|
||||||
<callout arearefs='qt-default-nix-co-2'>
|
<callout arearefs='qt-default-nix-co-2'>
|
||||||
<para>
|
<para>
|
||||||
Use <literal>mkDerivation</literal> instead of
|
Use <literal>mkDerivation</literal> instead of
|
||||||
<literal>stdenv.mkDerivation</literal>. <literal>mkDerivation</literal>
|
<literal>stdenv.mkDerivation</literal>. <literal>mkDerivation</literal> is
|
||||||
is a wrapper around <literal>stdenv.mkDerivation</literal> which
|
a wrapper around <literal>stdenv.mkDerivation</literal> which applies some
|
||||||
applies some Qt-specific settings.
|
Qt-specific settings. This deriver accepts the same arguments as
|
||||||
This deriver accepts the same arguments as
|
<literal>stdenv.mkDerivation</literal>; refer to
|
||||||
<literal>stdenv.mkDerivation</literal>; refer to
|
<xref linkend='chap-stdenv' /> for details.
|
||||||
<xref linkend='chap-stdenv' /> for details.
|
</para>
|
||||||
</para>
|
<para>
|
||||||
<para>
|
To use another deriver instead of <literal>stdenv.mkDerivation</literal>,
|
||||||
To use another deriver instead of
|
use <literal>mkDerivationWith</literal>:
|
||||||
<literal>stdenv.mkDerivation</literal>, use
|
|
||||||
<literal>mkDerivationWith</literal>:
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
mkDerivationWith myDeriver {
|
mkDerivationWith myDeriver {
|
||||||
# ...
|
# ...
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
If you cannot use <literal>mkDerivationWith</literal>, please refer to
|
If you cannot use <literal>mkDerivationWith</literal>, please refer to
|
||||||
<xref linkend='qt-runtime-dependencies' />.
|
<xref linkend='qt-runtime-dependencies' />.
|
||||||
</para>
|
</para>
|
||||||
</callout>
|
</callout>
|
||||||
<callout arearefs='qt-default-nix-co-3'>
|
<callout arearefs='qt-default-nix-co-3'>
|
||||||
<para>
|
<para>
|
||||||
<literal>mkDerivation</literal> accepts the same arguments as
|
<literal>mkDerivation</literal> accepts the same arguments as
|
||||||
<literal>stdenv.mkDerivation</literal>, such as
|
<literal>stdenv.mkDerivation</literal>, such as
|
||||||
<literal>buildInputs</literal>.
|
<literal>buildInputs</literal>.
|
||||||
</para>
|
</para>
|
||||||
</callout>
|
</callout>
|
||||||
</calloutlist>
|
</calloutlist>
|
||||||
|
|
||||||
<formalpara xml:id='qt-runtime-dependencies'>
|
<formalpara xml:id='qt-runtime-dependencies'>
|
||||||
<title>Locating runtime dependencies</title>
|
<title>Locating runtime dependencies</title>
|
||||||
<para>
|
<para>
|
||||||
Qt applications need to be wrapped to find runtime dependencies. If you
|
Qt applications need to be wrapped to find runtime dependencies. If you
|
||||||
cannot use <literal>mkDerivation</literal> or
|
cannot use <literal>mkDerivation</literal> or
|
||||||
<literal>mkDerivationWith</literal> above, include
|
<literal>mkDerivationWith</literal> above, include
|
||||||
<literal>wrapQtAppsHook</literal> in <literal>nativeBuildInputs</literal>:
|
<literal>wrapQtAppsHook</literal> in <literal>nativeBuildInputs</literal>:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
# ...
|
# ...
|
||||||
@ -80,13 +78,13 @@ stdenv.mkDerivation {
|
|||||||
nativeBuildInputs = [ wrapQtAppsHook ];
|
nativeBuildInputs = [ wrapQtAppsHook ];
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</formalpara>
|
</formalpara>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Entries added to <literal>qtWrapperArgs</literal> are used to modify the
|
Entries added to <literal>qtWrapperArgs</literal> are used to modify the
|
||||||
wrappers created by <literal>wrapQtAppsHook</literal>. The entries are
|
wrappers created by <literal>wrapQtAppsHook</literal>. The entries are passed
|
||||||
passed as arguments to <xref linkend='fun-wrapProgram' />.
|
as arguments to <xref linkend='fun-wrapProgram' />.
|
||||||
<programlisting>
|
<programlisting>
|
||||||
mkDerivation {
|
mkDerivation {
|
||||||
# ...
|
# ...
|
||||||
@ -97,8 +95,8 @@ mkDerivation {
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Set <literal>dontWrapQtApps</literal> to stop applications from being
|
Set <literal>dontWrapQtApps</literal> to stop applications from being wrapped
|
||||||
wrapped automatically. It is required to wrap applications manually with
|
automatically. It is required to wrap applications manually with
|
||||||
<literal>wrapQtApp</literal>, using the syntax of
|
<literal>wrapQtApp</literal>, using the syntax of
|
||||||
<xref linkend='fun-wrapProgram' />:
|
<xref linkend='fun-wrapProgram' />:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
@ -115,16 +113,17 @@ mkDerivation {
|
|||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
<literal>wrapQtAppsHook</literal> ignores files that are non-ELF executables.
|
<literal>wrapQtAppsHook</literal> ignores files that are non-ELF
|
||||||
This means that scripts won't be automatically wrapped so you'll need to manually
|
executables. This means that scripts won't be automatically wrapped so
|
||||||
wrap them as previously mentioned. An example of when you'd always need to do this
|
you'll need to manually wrap them as previously mentioned. An example of
|
||||||
is with Python applications that use PyQT.
|
when you'd always need to do this is with Python applications that use PyQT.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Libraries are built with every available version of Qt. Use the <literal>meta.broken</literal>
|
Libraries are built with every available version of Qt. Use the
|
||||||
attribute to disable the package for unsupported Qt versions:
|
<literal>meta.broken</literal> attribute to disable the package for
|
||||||
|
unsupported Qt versions:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
mkDerivation {
|
mkDerivation {
|
||||||
# ...
|
# ...
|
||||||
@ -136,13 +135,13 @@ mkDerivation {
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<formalpara>
|
<formalpara>
|
||||||
<title>Adding a library to Nixpkgs</title>
|
<title>Adding a library to Nixpkgs</title>
|
||||||
<para>
|
<para>
|
||||||
Add a Qt library to <filename>all-packages.nix</filename> by adding it to the
|
Add a Qt library to <filename>all-packages.nix</filename> by adding it to
|
||||||
collection inside <literal>mkLibsForQt5</literal>. This ensures that the
|
the collection inside <literal>mkLibsForQt5</literal>. This ensures that the
|
||||||
library is built with every available version of Qt as needed.
|
library is built with every available version of Qt as needed.
|
||||||
<example xml:id='qt-library-all-packages-nix'>
|
<example xml:id='qt-library-all-packages-nix'>
|
||||||
<title>Adding a Qt library to <filename>all-packages.nix</filename></title>
|
<title>Adding a Qt library to <filename>all-packages.nix</filename></title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{
|
{
|
||||||
# ...
|
# ...
|
||||||
@ -156,19 +155,19 @@ mkDerivation {
|
|||||||
# ...
|
# ...
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</para>
|
</para>
|
||||||
</formalpara>
|
</formalpara>
|
||||||
|
|
||||||
<formalpara>
|
<formalpara>
|
||||||
<title>Adding an application to Nixpkgs</title>
|
<title>Adding an application to Nixpkgs</title>
|
||||||
<para>
|
<para>
|
||||||
Add a Qt application to <filename>all-packages.nix</filename> using
|
Add a Qt application to <filename>all-packages.nix</filename> using
|
||||||
<literal>libsForQt5.callPackage</literal> instead of the usual
|
<literal>libsForQt5.callPackage</literal> instead of the usual
|
||||||
<literal>callPackage</literal>. The former ensures that all dependencies
|
<literal>callPackage</literal>. The former ensures that all dependencies are
|
||||||
are built with the same version of Qt.
|
built with the same version of Qt.
|
||||||
<example xml:id='qt-application-all-packages-nix'>
|
<example xml:id='qt-application-all-packages-nix'>
|
||||||
<title>Adding a Qt application to <filename>all-packages.nix</filename></title>
|
<title>Adding a Qt application to <filename>all-packages.nix</filename></title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{
|
{
|
||||||
# ...
|
# ...
|
||||||
@ -178,8 +177,7 @@ mkDerivation {
|
|||||||
# ...
|
# ...
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</para>
|
</para>
|
||||||
</formalpara>
|
</formalpara>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
10
doc/meta.xml
10
doc/meta.xml
@ -156,9 +156,9 @@ hello-2.3 A program that produces a familiar, friendly greeting
|
|||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
A link or a list of links to the location of Changelog for a package.
|
A link or a list of links to the location of Changelog for a package. A
|
||||||
A link may use expansion to refer to the correct changelog version.
|
link may use expansion to refer to the correct changelog version.
|
||||||
Example:
|
Example:
|
||||||
<literal>"https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${version}"</literal>
|
<literal>"https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${version}"</literal>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@ -273,8 +273,8 @@ meta.platforms = stdenv.lib.platforms.linux;
|
|||||||
This attribute is special in that it is not actually under the
|
This attribute is special in that it is not actually under the
|
||||||
<literal>meta</literal> attribute set but rather under the
|
<literal>meta</literal> attribute set but rather under the
|
||||||
<literal>passthru</literal> attribute set. This is due to how
|
<literal>passthru</literal> attribute set. This is due to how
|
||||||
<literal>meta</literal> attributes work, and the fact that they
|
<literal>meta</literal> attributes work, and the fact that they are
|
||||||
are supposed to contain only metadata, not derivations.
|
supposed to contain only metadata, not derivations.
|
||||||
</para>
|
</para>
|
||||||
</warning>
|
</warning>
|
||||||
<para>
|
<para>
|
||||||
|
@ -311,7 +311,8 @@ packageOverrides = pkgs: {
|
|||||||
<title>Elm</title>
|
<title>Elm</title>
|
||||||
|
|
||||||
<para>
|
<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>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -506,10 +507,11 @@ stdenv.mkDerivation {
|
|||||||
<para>
|
<para>
|
||||||
The IBus engine is based on <literal>hunspell</literal> to support
|
The IBus engine is based on <literal>hunspell</literal> to support
|
||||||
completion in many languages. By default the dictionaries
|
completion in many languages. By default the dictionaries
|
||||||
<literal>de-de</literal>, <literal>en-us</literal>, <literal>fr-moderne</literal>
|
<literal>de-de</literal>, <literal>en-us</literal>,
|
||||||
<literal>es-es</literal>, <literal>it-it</literal>,
|
<literal>fr-moderne</literal> <literal>es-es</literal>,
|
||||||
<literal>sv-se</literal> and <literal>sv-fi</literal> are in use. To add
|
<literal>it-it</literal>, <literal>sv-se</literal> and
|
||||||
another dictionary, the package can be overridden like this:
|
<literal>sv-fi</literal> are in use. To add another dictionary, the package
|
||||||
|
can be overridden like this:
|
||||||
<programlisting>ibus-engines.typing-booster.override {
|
<programlisting>ibus-engines.typing-booster.override {
|
||||||
langs = [ "de-at" "en-gb" ];
|
langs = [ "de-at" "en-gb" ];
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
@ -543,47 +545,45 @@ stdenv.mkDerivation {
|
|||||||
<title>Nginx</title>
|
<title>Nginx</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<link xlink:href="https://nginx.org/">Nginx</link> is a
|
<link xlink:href="https://nginx.org/">Nginx</link> is a reverse proxy and
|
||||||
reverse proxy and lightweight webserver.
|
lightweight webserver.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section xml:id="sec-nginx-etag">
|
<section xml:id="sec-nginx-etag">
|
||||||
<title>ETags on static files served from the Nix store</title>
|
<title>ETags on static files served from the Nix store</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
HTTP has a couple different mechanisms for caching to prevent
|
HTTP has a couple different mechanisms for caching to prevent clients from
|
||||||
clients from having to download the same content repeatedly
|
having to download the same content repeatedly if a resource has not
|
||||||
if a resource has not changed since the last time it was requested.
|
changed since the last time it was requested. When nginx is used as a
|
||||||
When nginx is used as a server for static files, it implements
|
server for static files, it implements the caching mechanism based on the
|
||||||
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>
|
||||||
<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
|
||||||
response header automatically; unfortunately, it works by using
|
timestamps to determine the value of the <literal>Last-Modified</literal>
|
||||||
filesystem timestamps to determine the value of the
|
header. This doesn't give the desired behavior when the file is in the Nix
|
||||||
<literal>Last-Modified</literal> header. This doesn't give the
|
store, because all file timestamps are set to 0 (for reasons related to
|
||||||
desired behavior when the file is in the Nix store, because all
|
build reproducibility).
|
||||||
file timestamps are set to 0 (for reasons related to build
|
|
||||||
reproducibility).
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Fortunately, HTTP supports an alternative (and more effective)
|
Fortunately, HTTP supports an alternative (and more effective) caching
|
||||||
caching mechanism: the
|
mechanism: the
|
||||||
<link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag"><literal>ETag</literal></link>
|
<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
|
response header. The value of the <literal>ETag</literal> header specifies
|
||||||
specifies some identifier for the particular content that the
|
some identifier for the particular content that the server is sending (e.g.
|
||||||
server is sending (e.g. a hash). When a client makes a second
|
a hash). When a client makes a second request for the same resource, it
|
||||||
request for the same resource, it sends that value back in an
|
sends that value back in an <literal>If-None-Match</literal> header. If the
|
||||||
<literal>If-None-Match</literal> header. If the ETag value is
|
ETag value is unchanged, then the server does not need to resend the
|
||||||
unchanged, then the server does not need to resend the content.
|
content.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
As of NixOS 19.09, the nginx package in Nixpkgs is patched such
|
As of NixOS 19.09, the nginx package in Nixpkgs is patched such that when
|
||||||
that when nginx serves a file out of <filename>/nix/store</filename>,
|
nginx serves a file out of <filename>/nix/store</filename>, the hash in the
|
||||||
the hash in the store path is used as the <literal>ETag</literal>
|
store path is used as the <literal>ETag</literal> header in the HTTP
|
||||||
header in the HTTP response, thus providing proper caching functionality.
|
response, thus providing proper caching functionality. This happens
|
||||||
This happens automatically; you do not need to do modify any
|
automatically; you do not need to do modify any configuration to get this
|
||||||
configuration to get this behavior.
|
behavior.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
@ -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">
|
<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>
|
<title>Package-specific usage notes</title>
|
||||||
<para>
|
<para>
|
||||||
These chapters includes some notes
|
These chapters includes some notes that apply to specific packages and should
|
||||||
that apply to specific packages and should
|
answer some of the frequently asked questions related to Nixpkgs use. Some
|
||||||
answer some of the frequently asked questions
|
useful information related to package use can be found in
|
||||||
related to Nixpkgs use.
|
<link linkend="chap-package-notes">package-specific development notes</link>.
|
||||||
|
|
||||||
Some useful information related to package use
|
|
||||||
can be found in <link linkend="chap-package-notes">package-specific development notes</link>.
|
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
<section xml:id="opengl">
|
<section xml:id="opengl">
|
||||||
<title>OpenGL</title>
|
<title>OpenGL</title>
|
||||||
@ -47,7 +43,6 @@
|
|||||||
<literal>locales</literal> of the package.
|
<literal>locales</literal> of the package.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-emacs">
|
<section xml:id="sec-emacs">
|
||||||
<title>Emacs</title>
|
<title>Emacs</title>
|
||||||
|
|
||||||
@ -204,46 +199,43 @@ overrides = self: super: rec {
|
|||||||
</screen>
|
</screen>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="dlib">
|
<section xml:id="dlib">
|
||||||
<title>DLib</title>
|
<title>DLib</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<link xlink:href="http://dlib.net/">DLib</link> is a modern, C++-based toolkit which
|
<link xlink:href="http://dlib.net/">DLib</link> is a modern, C++-based
|
||||||
provides several machine learning algorithms.
|
toolkit which provides several machine learning algorithms.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section xml:id="compiling-without-avx-support">
|
<section xml:id="compiling-without-avx-support">
|
||||||
<title>Compiling without AVX support</title>
|
<title>Compiling without AVX support</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Especially older CPUs don't support
|
Especially older CPUs don't support
|
||||||
<link xlink:href="https://en.wikipedia.org/wiki/Advanced_Vector_Extensions">AVX</link>
|
<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
|
(<abbrev>Advanced Vector Extensions</abbrev>) instructions that are used by
|
||||||
optimize their algorithms.
|
DLib to optimize their algorithms.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
On the affected hardware errors like <literal>Illegal instruction</literal> will occur.
|
On the affected hardware errors like <literal>Illegal instruction</literal>
|
||||||
In those cases AVX support needs to be disabled:
|
will occur. In those cases AVX support needs to be disabled:
|
||||||
<programlisting>self: super: {
|
<programlisting>self: super: {
|
||||||
dlib = super.dlib.override { avxSupport = false; };
|
dlib = super.dlib.override { avxSupport = false; };
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="unfree-software">
|
<section xml:id="unfree-software">
|
||||||
<title>Unfree software</title>
|
<title>Unfree software</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
All users of Nixpkgs are free software users, and many users (and
|
All users of Nixpkgs are free software users, and many users (and
|
||||||
developers) of Nixpkgs want to limit and tightly control their exposure to
|
developers) of Nixpkgs want to limit and tightly control their exposure to
|
||||||
unfree software. At the same time, many users need (or want)
|
unfree software. At the same time, many users need (or want) to run some
|
||||||
to run some specific
|
specific pieces of proprietary software. Nixpkgs includes some expressions
|
||||||
pieces of proprietary software. Nixpkgs includes some expressions for unfree
|
for unfree software packages. By default unfree software cannot be installed
|
||||||
software packages. By default unfree software cannot be installed and
|
and doesn’t show up in searches. To allow installing unfree software in a
|
||||||
doesn’t show up in searches. To allow installing unfree software in a
|
|
||||||
single Nix invocation one can export
|
single Nix invocation one can export
|
||||||
<literal>NIXPKGS_ALLOW_UNFREE=1</literal>. For a persistent solution, users
|
<literal>NIXPKGS_ALLOW_UNFREE=1</literal>. For a persistent solution, users
|
||||||
can set <literal>allowUnfree</literal> in the Nixpkgs configuration.
|
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.
|
<literal>true</literal> for unfree packages that should be allowed.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-steam">
|
<section xml:id="sec-steam">
|
||||||
<title>Steam</title>
|
<title>Steam</title>
|
||||||
|
|
||||||
@ -407,21 +398,24 @@ overrides = self: super: rec {
|
|||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-citrix">
|
<section xml:id="sec-citrix">
|
||||||
<title>Citrix Receiver & Citrix Workspace App</title>
|
<title>Citrix Receiver & Citrix Workspace App</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
Please note that the <literal>citrix_receiver</literal> package has been deprecated since its
|
Please note that the <literal>citrix_receiver</literal> package has been
|
||||||
development was <link xlink:href="https://docs.citrix.com/en-us/citrix-workspace-app.html">discontinued by upstream</link>
|
deprecated since its development was
|
||||||
and has been replaced by <link xlink:href="https://www.citrix.com/products/workspace-app/">the citrix workspace app</link>.
|
<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>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
<link xlink:href="https://www.citrix.com/products/receiver/">Citrix Receiver</link> and
|
<link xlink:href="https://www.citrix.com/products/receiver/">Citrix
|
||||||
<link xlink:href="https://www.citrix.com/products/workspace-app/">Citrix Workspace App</link>
|
Receiver</link> and
|
||||||
are a remote desktop viewers which provide access to
|
<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>
|
<link xlink:href="https://www.citrix.com/products/xenapp-xendesktop/">XenDesktop</link>
|
||||||
installations.
|
installations.
|
||||||
</para>
|
</para>
|
||||||
@ -432,24 +426,24 @@ overrides = self: super: rec {
|
|||||||
<para>
|
<para>
|
||||||
The tarball archive needs to be downloaded manually as the license
|
The tarball archive needs to be downloaded manually as the license
|
||||||
agreements of the vendor for
|
agreements of the vendor for
|
||||||
<link xlink:href="https://www.citrix.com/downloads/citrix-receiver/">Citrix Receiver</link>
|
<link xlink:href="https://www.citrix.com/downloads/citrix-receiver/">Citrix
|
||||||
or <link xlink:href="https://www.citrix.de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html">Citrix Workspace</link>
|
Receiver</link> or
|
||||||
need to be accepted first.
|
<link xlink:href="https://www.citrix.de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html">Citrix
|
||||||
Then run <command>nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz</command>.
|
Workspace</link> need to be accepted first. Then run
|
||||||
With the archive available
|
<command>nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz</command>.
|
||||||
in the store the package can be built and installed with Nix.
|
With the archive available in the store the package can be built and
|
||||||
|
installed with Nix.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<warning>
|
<warning>
|
||||||
<title>Caution with <command>nix-shell</command> installs</title>
|
<title>Caution with <command>nix-shell</command> installs</title>
|
||||||
<para>
|
<para>
|
||||||
It's recommended to install <literal>Citrix Receiver</literal>
|
It's recommended to install <literal>Citrix Receiver</literal> and/or
|
||||||
and/or <literal>Citrix Workspace</literal> using
|
<literal>Citrix Workspace</literal> using <literal>nix-env -i</literal> or
|
||||||
<literal>nix-env -i</literal> or globally to
|
globally to ensure that the <literal>.desktop</literal> files are
|
||||||
ensure that the <literal>.desktop</literal> files are installed properly
|
installed properly into <literal>$XDG_CONFIG_DIRS</literal>. Otherwise it
|
||||||
into <literal>$XDG_CONFIG_DIRS</literal>. Otherwise it won't be possible to
|
won't be possible to open <literal>.ica</literal> files automatically from
|
||||||
open <literal>.ica</literal> files automatically from the browser to start
|
the browser to start a Citrix connection.
|
||||||
a Citrix connection.
|
|
||||||
</para>
|
</para>
|
||||||
</warning>
|
</warning>
|
||||||
</section>
|
</section>
|
||||||
@ -458,8 +452,8 @@ overrides = self: super: rec {
|
|||||||
<title>Custom certificates</title>
|
<title>Custom certificates</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <literal>Citrix Workspace App</literal>
|
The <literal>Citrix Workspace App</literal> in <literal>nixpkgs</literal>
|
||||||
in <literal>nixpkgs</literal> trust several certificates
|
trust several certificates
|
||||||
<link xlink:href="https://curl.haxx.se/docs/caextract.html">from the
|
<link xlink:href="https://curl.haxx.se/docs/caextract.html">from the
|
||||||
Mozilla database</link> by default. However several companies using Citrix
|
Mozilla database</link> by default. However several companies using Citrix
|
||||||
might require their own corporate certificate. On distros with imperative
|
might require their own corporate certificate. On distros with imperative
|
||||||
|
@ -210,9 +210,11 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Optionally commit the new package and open a pull request <link
|
Optionally commit the new package and open a pull request
|
||||||
xlink:href="https://github.com/NixOS/nixpkgs/pulls">to nixpkgs</link>, or
|
<link
|
||||||
use <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">
|
xlink:href="https://discourse.nixos.org/t/about-the-patches-category/477">
|
||||||
the Patches category</link> on Discourse for sending a patch without a
|
the Patches category</link> on Discourse for sending a patch without a
|
||||||
GitHub account.
|
GitHub account.
|
||||||
|
126
doc/stdenv.xml
126
doc/stdenv.xml
@ -736,8 +736,8 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
|||||||
commit</command> or any other commands that cannot handle that.
|
commit</command> or any other commands that cannot handle that.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
For information about how to run the updates, execute
|
For information about how to run the updates, execute <command>nix-shell
|
||||||
<command>nix-shell maintainers/scripts/update.nix</command>.
|
maintainers/scripts/update.nix</command>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</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
|
to <emphasis>add</emphasis> some commands to a phase, e.g. by defining
|
||||||
<literal>postInstall</literal> or <literal>preFixup</literal>, as skipping
|
<literal>postInstall</literal> or <literal>preFixup</literal>, as skipping
|
||||||
some of the default actions may have unexpected consequences. The default
|
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>
|
</para>
|
||||||
|
|
||||||
<section xml:id="ssec-controlling-phases">
|
<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
|
set, the default value is used, which is <literal>$prePhases
|
||||||
unpackPhase patchPhase $preConfigurePhases configurePhase
|
unpackPhase patchPhase $preConfigurePhases configurePhase
|
||||||
$preBuildPhases buildPhase checkPhase $preInstallPhases installPhase
|
$preBuildPhases buildPhase checkPhase $preInstallPhases installPhase
|
||||||
fixupPhase installCheckPhase $preDistPhases distPhase $postPhases</literal>.
|
fixupPhase installCheckPhase $preDistPhases distPhase
|
||||||
|
$postPhases</literal>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Usually, if you just want to add a few phases, it’s more convenient
|
Usually, if you just want to add a few phases, it’s more convenient
|
||||||
@ -1605,7 +1607,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
|||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Set to true to skip the fixup phase.
|
Set to true to skip the fixup phase.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2411,12 +2413,12 @@ addEnvHooks "$hostOffset" myBashFunction
|
|||||||
<para>
|
<para>
|
||||||
The Bintools Wrapper was only just recently split off from CC Wrapper,
|
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
|
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
|
shouldn't care about the C standard library, but just take a derivation
|
||||||
derivation with the dynamic loader (which happens to be the glibc on
|
with the dynamic loader (which happens to be the glibc on linux).
|
||||||
linux). Dependency finding however is a task both wrappers will continue
|
Dependency finding however is a task both wrappers will continue to need
|
||||||
to need to share, and probably the most important to understand. It is
|
to share, and probably the most important to understand. It is currently
|
||||||
currently accomplished by collecting directories of host-platform
|
accomplished by collecting directories of host-platform dependencies
|
||||||
dependencies (i.e. <varname>buildInputs</varname> and
|
(i.e. <varname>buildInputs</varname> and
|
||||||
<varname>nativeBuildInputs</varname>) in environment variables. The
|
<varname>nativeBuildInputs</varname>) in environment variables. The
|
||||||
Bintools Wrapper's setup hook causes any <filename>lib</filename> and
|
Bintools Wrapper's setup hook causes any <filename>lib</filename> and
|
||||||
<filename>lib64</filename> subdirectories to be added to
|
<filename>lib64</filename> subdirectories to be added to
|
||||||
@ -2633,7 +2635,8 @@ addEnvHooks "$hostOffset" myBashFunction
|
|||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2688,12 +2691,12 @@ addEnvHooks "$hostOffset" myBashFunction
|
|||||||
At <filename>/var/lib/cntr</filename> the sandboxed filesystem is
|
At <filename>/var/lib/cntr</filename> the sandboxed filesystem is
|
||||||
mounted. All commands and files of the system are still accessible
|
mounted. All commands and files of the system are still accessible
|
||||||
within the shell. To execute commands from the sandbox use the cntr exec
|
within the shell. To execute commands from the sandbox use the cntr exec
|
||||||
subcommand. <command>cntr</command> is only supported
|
subcommand. <command>cntr</command> is only supported on Linux-based
|
||||||
on Linux-based platforms. To use it first add <literal>cntr</literal> to
|
platforms. To use it first add <literal>cntr</literal> to your
|
||||||
your <literal>environment.systemPackages</literal> on NixOS or
|
<literal>environment.systemPackages</literal> on NixOS or alternatively
|
||||||
alternatively to the root user on non-NixOS systems. Then in the package
|
to the root user on non-NixOS systems. Then in the package that is
|
||||||
that is supposed to be inspected, add <literal>breakpointHook</literal>
|
supposed to be inspected, add <literal>breakpointHook</literal> to
|
||||||
to <literal>nativeBuildInputs</literal>.
|
<literal>nativeBuildInputs</literal>.
|
||||||
<programlisting>
|
<programlisting>
|
||||||
nativeBuildInputs = [ breakpointHook ];
|
nativeBuildInputs = [ breakpointHook ];
|
||||||
</programlisting>
|
</programlisting>
|
||||||
@ -2703,11 +2706,11 @@ nativeBuildInputs = [ breakpointHook ];
|
|||||||
<note>
|
<note>
|
||||||
<title>Caution with remote builds</title>
|
<title>Caution with remote builds</title>
|
||||||
<para>
|
<para>
|
||||||
This won't work with remote builds as the build environment is on
|
This won't work with remote builds as the build environment is on a
|
||||||
a different machine and can't be accessed by <command>cntr</command>.
|
different machine and can't be accessed by <command>cntr</command>.
|
||||||
Remote builds can be turned off by setting <literal>--option builders ''</literal>
|
Remote builds can be turned off by setting <literal>--option builders
|
||||||
for <command>nix-build</command> or <literal>--builders ''</literal> for
|
''</literal> for <command>nix-build</command> or <literal>--builders
|
||||||
<command>nix build</command>.
|
''</literal> for <command>nix build</command>.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
</listitem>
|
</listitem>
|
||||||
@ -2806,17 +2809,78 @@ postInstall = ''
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
meson
|
Meson
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Overrides the configure phase to run meson to generate Ninja files. You
|
Overrides the configure phase to run meson to generate Ninja files. To
|
||||||
can disable this behavior by setting configurePhase to a custom value,
|
run these files, you should accompany Meson with ninja. By default,
|
||||||
or by setting dontUseMesonConfigure. To run these files, you should
|
<varname>enableParallelBuilding</varname> is enabled as Meson supports
|
||||||
accompany meson with ninja. mesonFlags controls only the flags passed to
|
|
||||||
meson. By default, parallel building is enabled as Meson supports
|
|
||||||
parallel building almost everywhere.
|
parallel building almost everywhere.
|
||||||
</para>
|
</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>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -2851,8 +2915,8 @@ postInstall = ''
|
|||||||
<para>
|
<para>
|
||||||
Overrides the configure, build, and install phases. This will run the
|
Overrides the configure, build, and install phases. This will run the
|
||||||
"waf" script used by many projects. If wafPath (default ./waf) doesn’t
|
"waf" script used by many projects. If wafPath (default ./waf) doesn’t
|
||||||
exist, it will copy the version of waf available in Nixpkgs. wafFlags can
|
exist, it will copy the version of waf available in Nixpkgs. wafFlags
|
||||||
be used to pass flags to the waf script.
|
can be used to pass flags to the waf script.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -157,6 +157,8 @@ in
|
|||||||
# terminal instead of logging out of X11).
|
# terminal instead of logging out of X11).
|
||||||
environment.variables = config.environment.sessionVariables;
|
environment.variables = config.environment.sessionVariables;
|
||||||
|
|
||||||
|
environment.profileRelativeEnvVars = config.environment.profileRelativeSessionVariables;
|
||||||
|
|
||||||
environment.shellAliases = mapAttrs (name: mkDefault) {
|
environment.shellAliases = mapAttrs (name: mkDefault) {
|
||||||
ls = "ls --color=tty";
|
ls = "ls --color=tty";
|
||||||
ll = "ls -l";
|
ll = "ls -l";
|
||||||
|
@ -8,6 +8,11 @@ let
|
|||||||
|
|
||||||
cfg = config.environment;
|
cfg = config.environment;
|
||||||
|
|
||||||
|
pamProfiles =
|
||||||
|
map
|
||||||
|
(replaceStrings ["$HOME" "$USER"] ["@{HOME}" "@{PAM_USER}"])
|
||||||
|
cfg.profiles;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -18,25 +23,76 @@ in
|
|||||||
default = {};
|
default = {};
|
||||||
description = ''
|
description = ''
|
||||||
A set of environment variables used in the global environment.
|
A set of environment variables used in the global environment.
|
||||||
These variables will be set by PAM.
|
These variables will be set by PAM early in the login process.
|
||||||
The value of each variable can be either a string or a list of
|
|
||||||
strings. The latter is concatenated, interspersed with colon
|
The value of each session variable can be either a string or a
|
||||||
characters.
|
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));
|
type = with types; attrsOf (either str (listOf str));
|
||||||
apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else v);
|
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 = {
|
config = {
|
||||||
|
|
||||||
system.build.pamEnvironment = pkgs.writeText "pam-environment"
|
system.build.pamEnvironment =
|
||||||
''
|
let
|
||||||
${concatStringsSep "\n" (
|
suffixedVariables =
|
||||||
(mapAttrsToList (n: v: ''${n}="${concatStringsSep ":" v}"'')
|
flip mapAttrs cfg.profileRelativeSessionVariables (envVar: suffixes:
|
||||||
(zipAttrsWith (const concatLists) ([ (mapAttrs (n: v: [ v ]) cfg.sessionVariables) ]))))}
|
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";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
source = "${config.system.path}/share/terminfo";
|
source = "${config.system.path}/share/terminfo";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.profileRelativeEnvVars = {
|
environment.profileRelativeSessionVariables = {
|
||||||
TERMINFO_DIRS = [ "/share/terminfo" ];
|
TERMINFO_DIRS = [ "/share/terminfo" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ with lib;
|
|||||||
"/share/pixmaps"
|
"/share/pixmaps"
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.profileRelativeEnvVars = {
|
environment.profileRelativeSessionVariables = {
|
||||||
XCURSOR_PATH = [ "/share/icons" ];
|
XCURSOR_PATH = [ "/share/icons" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -25,6 +25,7 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.udev.packages = with pkgs; [ brightnessctl ];
|
services.udev.packages = with pkgs; [ brightnessctl ];
|
||||||
|
environment.systemPackages = with pkgs; [ brightnessctl ];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,8 @@ in
|
|||||||
EDITOR = mkDefault "nano";
|
EDITOR = mkDefault "nano";
|
||||||
XCURSOR_PATH = [ "$HOME/.icons" ];
|
XCURSOR_PATH = [ "$HOME/.icons" ];
|
||||||
XDG_CONFIG_DIRS = [ "/etc/xdg" ]; # needs to be before profile-relative paths to allow changes through environment.etc
|
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
|
environment.profiles = mkAfter
|
||||||
@ -30,7 +32,7 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
# TODO: move most of these elsewhere
|
# TODO: move most of these elsewhere
|
||||||
environment.profileRelativeEnvVars =
|
environment.profileRelativeSessionVariables =
|
||||||
{ PATH = [ "/bin" ];
|
{ PATH = [ "/bin" ];
|
||||||
INFOPATH = [ "/info" "/share/info" ];
|
INFOPATH = [ "/info" "/share/info" ];
|
||||||
KDEDIRS = [ "" ];
|
KDEDIRS = [ "" ];
|
||||||
|
@ -415,7 +415,7 @@ let
|
|||||||
|
|
||||||
# Session management.
|
# Session management.
|
||||||
${optionalString cfg.setEnvironment ''
|
${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
|
session required pam_unix.so
|
||||||
${optionalString cfg.setLoginUid
|
${optionalString cfg.setLoginUid
|
||||||
|
@ -193,7 +193,7 @@ in {
|
|||||||
then ""
|
then ""
|
||||||
else
|
else
|
||||||
let pluginCmds = lib.attrsets.mapAttrsToList
|
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;
|
cfg.plugins;
|
||||||
in ''
|
in ''
|
||||||
rm -r ${cfg.home}/plugins || true
|
rm -r ${cfg.home}/plugins || true
|
||||||
|
@ -95,13 +95,7 @@ in {
|
|||||||
|
|
||||||
environment.systemPackages = [ cfg.package editorScript desktopApplicationFile ];
|
environment.systemPackages = [ cfg.package editorScript desktopApplicationFile ];
|
||||||
|
|
||||||
environment.variables = {
|
environment.variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "${editorScript}/bin/emacseditor");
|
||||||
# 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 {});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
meta.doc = ./emacs.xml;
|
meta.doc = ./emacs.xml;
|
||||||
|
@ -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 {
|
services.minidlna.loglevel = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "warn";
|
default = "warn";
|
||||||
@ -66,7 +97,37 @@ in
|
|||||||
|
|
||||||
services.minidlna.config = mkOption {
|
services.minidlna.config = mkOption {
|
||||||
type = types.lines;
|
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 =
|
services.minidlna.config =
|
||||||
''
|
''
|
||||||
port=${toString port}
|
port=${toString port}
|
||||||
friendly_name=${config.networking.hostName} MiniDLNA
|
friendly_name=${cfg.friendlyName}
|
||||||
db_dir=/var/cache/minidlna
|
db_dir=/var/cache/minidlna
|
||||||
log_level=${cfg.loglevel}
|
log_level=${cfg.loglevel}
|
||||||
inotify=yes
|
inotify=yes
|
||||||
|
root_container=${cfg.rootContainer}
|
||||||
${concatMapStrings (dir: ''
|
${concatMapStrings (dir: ''
|
||||||
media_dir=${dir}
|
media_dir=${dir}
|
||||||
'') cfg.mediaDirs}
|
'') cfg.mediaDirs}
|
||||||
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
users.users.minidlna = {
|
users.users.minidlna = {
|
||||||
|
@ -45,6 +45,8 @@ let
|
|||||||
$CFG->aspellpath = '${pkgs.aspell}/bin/aspell';
|
$CFG->aspellpath = '${pkgs.aspell}/bin/aspell';
|
||||||
$CFG->pathtodot = '${pkgs.graphviz}/bin/dot';
|
$CFG->pathtodot = '${pkgs.graphviz}/bin/dot';
|
||||||
|
|
||||||
|
${cfg.extraConfig}
|
||||||
|
|
||||||
require_once('${cfg.package}/share/moodle/lib/setup.php');
|
require_once('${cfg.package}/share/moodle/lib/setup.php');
|
||||||
|
|
||||||
// There is no php closing tag in this file,
|
// There is no php closing tag in this file,
|
||||||
@ -172,6 +174,19 @@ in
|
|||||||
for details on configuration directives.
|
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
|
# implementation
|
||||||
|
@ -48,10 +48,6 @@ in
|
|||||||
services.xserver.desktopManager.session = [
|
services.xserver.desktopManager.session = [
|
||||||
{ name = "Enlightenment";
|
{ name = "Enlightenment";
|
||||||
start = ''
|
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 XDG_MENU_PREFIX=e-
|
||||||
|
|
||||||
export GST_PLUGIN_PATH="${GST_PLUGIN_PATH}"
|
export GST_PLUGIN_PATH="${GST_PLUGIN_PATH}"
|
||||||
|
@ -48,12 +48,6 @@ in
|
|||||||
name = "mate";
|
name = "mate";
|
||||||
bgSupport = true;
|
bgSupport = true;
|
||||||
start = ''
|
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-
|
export XDG_MENU_PREFIX=mate-
|
||||||
|
|
||||||
# Let caja find extensions
|
# Let caja find extensions
|
||||||
|
@ -79,8 +79,7 @@ in
|
|||||||
Using Pantheon without LightDM as a displayManager will break screenlocking from the UI.
|
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.pantheon.enable = mkDefault true;
|
||||||
services.xserver.displayManager.lightdm.greeters.gtk.enable = mkDefault true;
|
|
||||||
|
|
||||||
# If not set manually Pantheon session cannot be started
|
# If not set manually Pantheon session cannot be started
|
||||||
# Known issue of https://github.com/NixOS/nixpkgs/pull/43992
|
# 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
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
|
||||||
fi
|
fi
|
||||||
'') cfg.sessionPath}
|
'') cfg.sessionPath}
|
||||||
|
|
||||||
# Settings from elementary-default-settings
|
|
||||||
export GTK_CSD=1
|
|
||||||
export GTK_MODULES=$GTK_MODULES:pantheon-filechooser-module
|
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -166,9 +161,14 @@ in
|
|||||||
networkmanager-iodine networkmanager-l2tp; };
|
networkmanager-iodine networkmanager-l2tp; };
|
||||||
|
|
||||||
# Override GSettings schemas
|
# 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 = [
|
environment.pathsToLink = [
|
||||||
# FIXME: modules should link subdirs of `/share` rather than relying on this
|
# FIXME: modules should link subdirs of `/share` rather than relying on this
|
||||||
|
@ -107,12 +107,6 @@ in
|
|||||||
start = ''
|
start = ''
|
||||||
${cfg.extraSessionCommands}
|
${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} &
|
${pkgs.runtimeShell} ${pkgs.xfce.xinitrc} &
|
||||||
waitPID=$!
|
waitPID=$!
|
||||||
'';
|
'';
|
||||||
|
@ -114,12 +114,6 @@ in
|
|||||||
name = "xfce4-14";
|
name = "xfce4-14";
|
||||||
bgSupport = true;
|
bgSupport = true;
|
||||||
start = ''
|
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} &
|
${pkgs.runtimeShell} ${pkgs.xfce4-14.xinitrc} &
|
||||||
waitPID=$!
|
waitPID=$!
|
||||||
'';
|
'';
|
||||||
|
@ -142,8 +142,6 @@ in
|
|||||||
GDM_X_SERVER_EXTRA_ARGS = toString
|
GDM_X_SERVER_EXTRA_ARGS = toString
|
||||||
(filter (arg: arg != "-terminate") cfg.xserverArgs);
|
(filter (arg: arg != "-terminate") cfg.xserverArgs);
|
||||||
XDG_DATA_DIRS = "${cfg.session.desktops}/share/";
|
XDG_DATA_DIRS = "${cfg.session.desktops}/share/";
|
||||||
# Find the mouse
|
|
||||||
XCURSOR_PATH = "~/.icons:${pkgs.gnome3.adwaita-icon-theme}/share/icons";
|
|
||||||
} // optionalAttrs (xSessionWrapper != null) {
|
} // optionalAttrs (xSessionWrapper != null) {
|
||||||
# Make GDM use this wrapper before running the session, which runs the
|
# Make GDM use this wrapper before running the session, which runs the
|
||||||
# configured setupCommands. This relies on a patched GDM which supports
|
# configured setupCommands. This relies on a patched GDM which supports
|
||||||
@ -262,7 +260,7 @@ in
|
|||||||
password required pam_deny.so
|
password required pam_deny.so
|
||||||
|
|
||||||
session required pam_succeed_if.so audit quiet_success user = gdm
|
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 ${pkgs.systemd}/lib/security/pam_systemd.so
|
||||||
session optional pam_keyinit.so force revoke
|
session optional pam_keyinit.so force revoke
|
||||||
session optional pam_permit.so
|
session optional pam_permit.so
|
||||||
|
@ -10,32 +10,6 @@ let
|
|||||||
icons = cfg.iconTheme.package;
|
icons = cfg.iconTheme.package;
|
||||||
cursors = cfg.cursorTheme.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" ''
|
ensoGreeterConf = pkgs.writeText "lightdm-enso-os-greeter.conf" ''
|
||||||
[greeter]
|
[greeter]
|
||||||
default-wallpaper=${ldmcfg.background}
|
default-wallpaper=${ldmcfg.background}
|
||||||
@ -144,10 +118,16 @@ in {
|
|||||||
config = mkIf (ldmcfg.enable && cfg.enable) {
|
config = mkIf (ldmcfg.enable && cfg.enable) {
|
||||||
environment.etc."lightdm/greeter.conf".source = ensoGreeterConf;
|
environment.etc."lightdm/greeter.conf".source = ensoGreeterConf;
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
cursors
|
||||||
|
icons
|
||||||
|
theme
|
||||||
|
];
|
||||||
|
|
||||||
services.xserver.displayManager.lightdm = {
|
services.xserver.displayManager.lightdm = {
|
||||||
greeter = mkDefault {
|
greeter = mkDefault {
|
||||||
package = wrappedEnsoGreeter;
|
package = pkgs.lightdm-enso-os-greeter.xgreeters;
|
||||||
name = "lightdm-enso-os-greeter";
|
name = "pantheon-greeter";
|
||||||
};
|
};
|
||||||
|
|
||||||
greeters = {
|
greeters = {
|
||||||
|
@ -15,34 +15,6 @@ let
|
|||||||
icons = cfg.iconTheme.package;
|
icons = cfg.iconTheme.package;
|
||||||
cursors = cfg.cursorTheme.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"
|
gtkGreeterConf = writeText "lightdm-gtk-greeter.conf"
|
||||||
''
|
''
|
||||||
[greeter]
|
[greeter]
|
||||||
@ -185,10 +157,16 @@ in
|
|||||||
config = mkIf (ldmcfg.enable && cfg.enable) {
|
config = mkIf (ldmcfg.enable && cfg.enable) {
|
||||||
|
|
||||||
services.xserver.displayManager.lightdm.greeter = mkDefault {
|
services.xserver.displayManager.lightdm.greeter = mkDefault {
|
||||||
package = wrappedGtkGreeter;
|
package = pkgs.lightdm_gtk_greeter.xgreeters;
|
||||||
name = "lightdm-gtk-greeter";
|
name = "lightdm-gtk-greeter";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
cursors
|
||||||
|
icons
|
||||||
|
theme
|
||||||
|
];
|
||||||
|
|
||||||
environment.etc."lightdm/lightdm-gtk-greeter.conf".source = gtkGreeterConf;
|
environment.etc."lightdm/lightdm-gtk-greeter.conf".source = gtkGreeterConf;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -8,11 +8,6 @@ let
|
|||||||
ldmcfg = dmcfg.lightdm;
|
ldmcfg = dmcfg.lightdm;
|
||||||
cfg = ldmcfg.greeters.mini;
|
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"
|
miniGreeterConf = pkgs.writeText "lightdm-mini-greeter.conf"
|
||||||
''
|
''
|
||||||
[greeter]
|
[greeter]
|
||||||
@ -90,7 +85,7 @@ in
|
|||||||
services.xserver.displayManager.lightdm.greeters.gtk.enable = false;
|
services.xserver.displayManager.lightdm.greeters.gtk.enable = false;
|
||||||
|
|
||||||
services.xserver.displayManager.lightdm.greeter = mkDefault {
|
services.xserver.displayManager.lightdm.greeter = mkDefault {
|
||||||
package = xgreeters;
|
package = pkgs.lightdm-mini-greeter.xgreeters;
|
||||||
name = "lightdm-mini-greeter";
|
name = "lightdm-mini-greeter";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,11 +8,6 @@ let
|
|||||||
ldmcfg = dmcfg.lightdm;
|
ldmcfg = dmcfg.lightdm;
|
||||||
cfg = ldmcfg.greeters.pantheon;
|
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
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
@ -33,17 +28,10 @@ in
|
|||||||
|
|
||||||
config = mkIf (ldmcfg.enable && cfg.enable) {
|
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.greeters.gtk.enable = false;
|
||||||
|
|
||||||
services.xserver.displayManager.lightdm.greeter = mkDefault {
|
services.xserver.displayManager.lightdm.greeter = mkDefault {
|
||||||
package = xgreeters;
|
package = pkgs.pantheon.elementary-greeter.xgreeters;
|
||||||
name = "io.elementary.greeter";
|
name = "io.elementary.greeter";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ in
|
|||||||
password required pam_deny.so
|
password required pam_deny.so
|
||||||
|
|
||||||
session required pam_succeed_if.so audit quiet_success user = lightdm
|
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 ${pkgs.systemd}/lib/security/pam_systemd.so
|
||||||
session optional pam_keyinit.so force revoke
|
session optional pam_keyinit.so force revoke
|
||||||
session optional pam_permit.so
|
session optional pam_permit.so
|
||||||
|
@ -219,8 +219,6 @@ in
|
|||||||
# Load themes from system environment
|
# Load themes from system environment
|
||||||
QT_PLUGIN_PATH = "/run/current-system/sw/" + pkgs.qt5.qtbase.qtPluginPrefix;
|
QT_PLUGIN_PATH = "/run/current-system/sw/" + pkgs.qt5.qtbase.qtPluginPrefix;
|
||||||
QML2_IMPORT_PATH = "/run/current-system/sw/" + pkgs.qt5.qtbase.qtQmlPrefix;
|
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";
|
execCmd = "exec /run/current-system/sw/bin/sddm";
|
||||||
@ -242,7 +240,7 @@ in
|
|||||||
password required pam_deny.so
|
password required pam_deny.so
|
||||||
|
|
||||||
session required pam_succeed_if.so audit quiet_success user = sddm
|
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 ${pkgs.systemd}/lib/security/pam_systemd.so
|
||||||
session optional pam_keyinit.so force revoke
|
session optional pam_keyinit.so force revoke
|
||||||
session optional pam_permit.so
|
session optional pam_permit.so
|
||||||
|
@ -292,6 +292,12 @@ in rec {
|
|||||||
services.xserver.desktopManager.xfce.enable = true;
|
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.
|
# Linux/Apache/PostgreSQL/PHP stack.
|
||||||
lapp = makeClosure ({ pkgs, ... }:
|
lapp = makeClosure ({ pkgs, ... }:
|
||||||
{ services.httpd.enable = true;
|
{ services.httpd.enable = true;
|
||||||
|
@ -162,6 +162,7 @@ in
|
|||||||
metabase = handleTest ./metabase.nix {};
|
metabase = handleTest ./metabase.nix {};
|
||||||
miniflux = handleTest ./miniflux.nix {};
|
miniflux = handleTest ./miniflux.nix {};
|
||||||
minio = handleTest ./minio.nix {};
|
minio = handleTest ./minio.nix {};
|
||||||
|
minidlna = handleTest ./minidlna.nix {};
|
||||||
misc = handleTest ./misc.nix {};
|
misc = handleTest ./misc.nix {};
|
||||||
mongodb = handleTest ./mongodb.nix {};
|
mongodb = handleTest ./mongodb.nix {};
|
||||||
moodle = handleTest ./moodle.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 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-userdata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).userdata or {};
|
||||||
openstack-image-metadata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).metadata 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 {};
|
osquery = handleTest ./osquery.nix {};
|
||||||
osrm-backend = handleTest ./osrm-backend.nix {};
|
osrm-backend = handleTest ./osrm-backend.nix {};
|
||||||
ostree = handleTest ./ostree.nix {};
|
ostree = handleTest ./ostree.nix {};
|
||||||
|
@ -10,6 +10,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||||||
{ users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; };
|
{ users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; };
|
||||||
users.users.sybil = { isNormalUser = true; group = "wheel"; };
|
users.users.sybil = { isNormalUser = true; group = "wheel"; };
|
||||||
imports = [ ../modules/profiles/hardened.nix ];
|
imports = [ ../modules/profiles/hardened.nix ];
|
||||||
|
environment.memoryAllocator.provider = "graphene-hardened";
|
||||||
nix.useSandbox = false;
|
nix.useSandbox = false;
|
||||||
virtualisation.emptyDiskImages = [ 4096 ];
|
virtualisation.emptyDiskImages = [ 4096 ];
|
||||||
boot.initrd.postDeviceCommands = ''
|
boot.initrd.postDeviceCommands = ''
|
||||||
|
39
nixos/tests/minidlna.nix
Normal file
39
nixos/tests/minidlna.nix
Normal 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
119
nixos/tests/os-prober.nix
Normal 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");
|
||||||
|
'';
|
||||||
|
})
|
@ -20,8 +20,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A console front-end for Pandora.com";
|
description = "A console front-end for Pandora.com";
|
||||||
homepage = http://6xq.net/projects/pianobar/;
|
homepage = "https://6xq.net/pianobar/";
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
license = licenses.mit; # expat version
|
license = licenses.mit; # expat version
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ mkDerivation rec {
|
|||||||
};
|
};
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
(python3.withPackages (pp: with pp; [ pyyaml jinja2 ]))
|
(python3.withPackages (pp: with pp; [ pyyaml jinja2 setuptools ]))
|
||||||
];
|
];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
qtbase
|
qtbase
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, libsodium, fetchFromGitHub, wget, pkgconfig, autoreconfHook, openssl, db62, boost
|
{ stdenv, libsodium, fetchFromGitHub, wget, pkgconfig, autoreconfHook, openssl, db62, boost
|
||||||
, zlib, gtest, gmock, callPackage, gmp, qt4, utillinux, protobuf, qrencode, libevent
|
, zlib, gtest, gmock, callPackage, gmp, qt4, utillinux, protobuf, qrencode, libevent
|
||||||
, withGui }:
|
, libsnark, withGui }:
|
||||||
|
|
||||||
let librustzcash = callPackage ./librustzcash {};
|
let librustzcash = callPackage ./librustzcash {};
|
||||||
in
|
in
|
||||||
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
||||||
buildInputs = [ gtest gmock gmp openssl wget db62 boost zlib
|
buildInputs = [ gtest gmock gmp openssl wget db62 boost zlib
|
||||||
protobuf libevent libsodium librustzcash ]
|
protobuf libevent libsodium librustzcash libsnark ]
|
||||||
++ optionals stdenv.isLinux [ utillinux ]
|
++ optionals stdenv.isLinux [ utillinux ]
|
||||||
++ optionals withGui [ qt4 qrencode ];
|
++ optionals withGui [ qt4 qrencode ];
|
||||||
|
|
||||||
|
@ -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
|
, 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 {
|
stdenv.mkDerivation {
|
||||||
version = "0.2.1";
|
version = "0.2.1";
|
||||||
@ -12,12 +12,21 @@ stdenv.mkDerivation {
|
|||||||
sha256 = "11jm181jq1vbn83h235avpdxz7pqq6prqyzki5yryy53mkj4kgxz";
|
sha256 = "11jm181jq1vbn83h235avpdxz7pqq6prqyzki5yryy53mkj4kgxz";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./fix-paths.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
pkgconfig
|
||||||
|
vala
|
||||||
|
wrapGAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
dbus
|
dbus
|
||||||
gtk3
|
gtk3
|
||||||
pcre
|
pcre
|
||||||
vala
|
|
||||||
cmake
|
|
||||||
epoxy
|
epoxy
|
||||||
libgee
|
libgee
|
||||||
libX11
|
libX11
|
||||||
@ -29,31 +38,21 @@ stdenv.mkDerivation {
|
|||||||
at-spi2-core
|
at-spi2-core
|
||||||
libxkbcommon
|
libxkbcommon
|
||||||
libpthreadstubs
|
libpthreadstubs
|
||||||
|
librsvg
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
pkgconfig
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
sed -i "s@\''${CMAKE_INSTALL_PREFIX}/@@" greeter/CMakeLists.txt
|
|
||||||
'';
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
cd greeter
|
cd greeter
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installFlags = [
|
passthru.xgreeters = linkFarm "enso-os-greeter-xgreeters" [{
|
||||||
"DESTDIR=$(out)"
|
path = "${lightdm-enso-os-greeter}/share/xgreeters/pantheon-greeter.desktop";
|
||||||
];
|
name = "pantheon-greeter.desktop";
|
||||||
|
}];
|
||||||
preFixup = ''
|
|
||||||
mv $out/usr/* $out
|
|
||||||
rm -r $out/usr
|
|
||||||
'';
|
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
rm -r $out/sbin
|
substituteInPlace $out/share/xgreeters/pantheon-greeter.desktop \
|
||||||
|
--replace "pantheon-greeter" "$out/bin/pantheon-greeter"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -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})
|
@ -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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "lightdm-mini-greeter";
|
pname = "lightdm-mini-greeter";
|
||||||
@ -11,17 +11,22 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1qi0bsqi8z2zv3303ww0kd7bciz6qx8na5bkvgrqlwyvq31czai5";
|
sha256 = "1qi0bsqi8z2zv3303ww0kd7bciz6qx8na5bkvgrqlwyvq31czai5";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
nativeBuildInputs = [ autoreconfHook pkgconfig wrapGAppsHook ];
|
||||||
buildInputs = [ lightdm gtk3 ];
|
buildInputs = [ lightdm gtk3 glib gdk-pixbuf librsvg ];
|
||||||
|
|
||||||
configureFlags = [ "--sysconfdir=/etc" ];
|
configureFlags = [ "--sysconfdir=/etc" ];
|
||||||
makeFlags = [ "configdir=$(out)/etc" ];
|
makeFlags = [ "configdir=${placeholder "out"}/etc" ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
substituteInPlace "$out/share/xgreeters/lightdm-mini-greeter.desktop" \
|
substituteInPlace "$out/share/xgreeters/lightdm-mini-greeter.desktop" \
|
||||||
--replace "Exec=lightdm-mini-greeter" "Exec=$out/bin/lightdm-mini-greeter"
|
--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; {
|
meta = with stdenv.lib; {
|
||||||
description = "A minimal, configurable, single-user GTK3 LightDM greeter";
|
description = "A minimal, configurable, single-user GTK3 LightDM greeter";
|
||||||
homepage = https://github.com/prikhi/lightdm-mini-greeter;
|
homepage = https://github.com/prikhi/lightdm-mini-greeter;
|
||||||
|
@ -1,7 +1,18 @@
|
|||||||
{ stdenv, fetchurl, lightdm, pkgconfig, intltool
|
{ stdenv
|
||||||
, hicolor-icon-theme, makeWrapper
|
, lightdm_gtk_greeter
|
||||||
, useGTK2 ? false, gtk2, gtk3 # gtk3 seems better supported
|
, fetchurl
|
||||||
, exo, at-spi2-core
|
, 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;
|
#ToDo: bad icons with gtk2;
|
||||||
@ -20,14 +31,15 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1pis5qyg95pg31dvnfqq34bzgj00hg4vs547r8h60lxjk81z8p15";
|
sha256 = "1pis5qyg95pg31dvnfqq34bzgj00hg4vs547r8h60lxjk81z8p15";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ];
|
||||||
buildInputs = [ lightdm exo intltool makeWrapper hicolor-icon-theme ]
|
buildInputs = [ lightdm exo librsvg hicolor-icon-theme ]
|
||||||
++ (if useGTK2 then [ gtk2 ] else [ gtk3 ]);
|
++ (if useGTK2 then [ gtk2 ] else [ gtk3 ]);
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--localstatedir=/var"
|
"--localstatedir=/var"
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
"--disable-indicator-services-command"
|
"--disable-indicator-services-command"
|
||||||
|
"--sbindir=${placeholder "out"}/bin" # for wrapGAppsHook to wrap automatically
|
||||||
] ++ stdenv.lib.optional useGTK2 "--with-gtk2";
|
] ++ stdenv.lib.optional useGTK2 "--with-gtk2";
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
@ -43,11 +55,14 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
substituteInPlace "$out/share/xgreeters/lightdm-gtk-greeter.desktop" \
|
substituteInPlace "$out/share/xgreeters/lightdm-gtk-greeter.desktop" \
|
||||||
--replace "Exec=lightdm-gtk-greeter" "Exec=$out/sbin/lightdm-gtk-greeter"
|
--replace "Exec=lightdm-gtk-greeter" "Exec=$out/bin/lightdm-gtk-greeter"
|
||||||
wrapProgram "$out/sbin/lightdm-gtk-greeter" \
|
|
||||||
--prefix XDG_DATA_DIRS ":" "${hicolor-icon-theme}/share"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
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; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://launchpad.net/lightdm-gtk-greeter;
|
homepage = https://launchpad.net/lightdm-gtk-greeter;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
@ -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 {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "amp";
|
pname = "amp";
|
||||||
@ -15,7 +16,8 @@ rustPlatform.buildRustPackage rec {
|
|||||||
cargoSha256 = "1bvj2zg19ak4vi47vjkqlybz011kn5zq1j7zznr76zrryacw4lz1";
|
cargoSha256 = "1bvj2zg19ak4vi47vjkqlybz011kn5zq1j7zznr76zrryacw4lz1";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig ];
|
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.
|
# Tests need to write to the theme directory in HOME.
|
||||||
preCheck = "export HOME=`mktemp -d`";
|
preCheck = "export HOME=`mktemp -d`";
|
||||||
|
@ -48,7 +48,11 @@ stdenv.mkDerivation {
|
|||||||
# The sparkle patch modified the nibs, so we have to recompile them
|
# The sparkle patch modified the nibs, so we have to recompile them
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
for nib in MainMenu Preferences; do
|
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
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
38
pkgs/applications/graphics/kcc/default.nix
Normal file
38
pkgs/applications/graphics/kcc/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -22,6 +22,7 @@
|
|||||||
libxcb,
|
libxcb,
|
||||||
libxkbcommon,
|
libxkbcommon,
|
||||||
wayland,
|
wayland,
|
||||||
|
xdg_utils,
|
||||||
|
|
||||||
# Darwin Frameworks
|
# Darwin Frameworks
|
||||||
AppKit,
|
AppKit,
|
||||||
@ -75,6 +76,10 @@ in buildRustPackage rec {
|
|||||||
++ lib.optionals stdenv.isDarwin [ AppKit CoreGraphics CoreServices CoreText Foundation OpenGL ];
|
++ lib.optionals stdenv.isDarwin [ AppKit CoreGraphics CoreServices CoreText Foundation OpenGL ];
|
||||||
|
|
||||||
outputs = [ "out" "terminfo" ];
|
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";
|
postBuild = lib.optionalString stdenv.isDarwin "make app";
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ python3Packages.buildPythonApplication rec {
|
|||||||
homepage = https://electrum-ltc.org/;
|
homepage = https://electrum-ltc.org/;
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ asymmetric ];
|
maintainers = with maintainers; [ ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,15 +3,17 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gpscorrelate";
|
pname = "gpscorrelate";
|
||||||
version = "unstable-2019-06-05";
|
version = "unstable-2019-09-03";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "dfandrich";
|
owner = "dfandrich";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "80b14fe7c10c1cc8f62c13f517c062577ce88c85";
|
rev = "e1dd44a34f67b1ab7201440e60a840258ee448d2";
|
||||||
sha256 = "1gaan0nd7ai0bwilfnkza7lg5mz87804mvlygj0gjc672izr37r6";
|
sha256 = "0gjwwdqh9dprzylmmnk3gm41khka9arkij3i9amd8y7d49pm9rlv";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ ./fix-localedir.diff ];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
desktop-file-utils
|
desktop-file-utils
|
||||||
docbook_xml_dtd_42
|
docbook_xml_dtd_42
|
||||||
@ -31,11 +33,12 @@ stdenv.mkDerivation rec {
|
|||||||
"GTK=3"
|
"GTK=3"
|
||||||
"CC=cc"
|
"CC=cc"
|
||||||
"CXX=c++"
|
"CXX=c++"
|
||||||
|
"CFLAGS=-DENABLE_NLS"
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
installTargets = [ "install" "install-desktop-file" ];
|
installTargets = [ "install" "install-po" "install-desktop-file" ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A GPS photo correlation tool, to add EXIF geotags";
|
description = "A GPS photo correlation tool, to add EXIF geotags";
|
||||||
@ -59,5 +62,6 @@ stdenv.mkDerivation rec {
|
|||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
homepage = "https://github.com/dfandrich/gpscorrelate";
|
homepage = "https://github.com/dfandrich/gpscorrelate";
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ sikmir ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
27
pkgs/applications/misc/gpscorrelate/fix-localedir.diff
Normal file
27
pkgs/applications/misc/gpscorrelate/fix-localedir.diff
Normal 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");
|
||||||
|
|
41
pkgs/applications/misc/minder/default.nix
Normal file
41
pkgs/applications/misc/minder/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,17 +1,14 @@
|
|||||||
{ fetchFromGitHub, lib, gobject-introspection, gtk3, python3Packages }:
|
{ 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
|
# 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
|
# adding this to services.udev.packages on NixOS
|
||||||
|
python3Packages.buildPythonApplication rec {
|
||||||
python3Packages.buildPythonApplication {
|
pname = "solaar";
|
||||||
pname = "solaar-unstable";
|
version = "1.0.1";
|
||||||
version = "2019-01-30";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pwr";
|
owner = "pwr-Solaar";
|
||||||
repo = "Solaar";
|
repo = "Solaar";
|
||||||
rev = "c07c115ee379e82db84283aaa29dc53df033a8c8";
|
rev = "${version}";
|
||||||
sha256 = "0xg181xcwzzs8pdqvjrkjyaaga7ir93hzjvd17j9g3ns8xfj2mvr";
|
sha256 = "1ni3aimpl9vyhwzi61mvm8arkii52cmb6bzjma9cnkjyx328pkid";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ gobject-introspection gtk3 pygobject3 pyudev ];
|
propagatedBuildInputs = with python3Packages; [ gobject-introspection gtk3 pygobject3 pyudev ];
|
||||||
@ -28,7 +25,6 @@ python3Packages.buildPythonApplication {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Linux devices manager for the Logitech Unifying Receiver";
|
description = "Linux devices manager for the Logitech Unifying Receiver";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
@ -43,7 +39,7 @@ python3Packages.buildPythonApplication {
|
|||||||
To be able to use it, make sure you have access to /dev/hidraw* files.
|
To be able to use it, make sure you have access to /dev/hidraw* files.
|
||||||
'';
|
'';
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
homepage = https://pwr.github.io/Solaar/;
|
homepage = https://pwr-solaar.github.io/Solaar/;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ spinus ysndr ];
|
maintainers = with maintainers; [ spinus ysndr ];
|
||||||
};
|
};
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "todoist";
|
pname = "todoist";
|
||||||
version = "0.13.1";
|
version = "0.14.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "sachaos";
|
owner = "sachaos";
|
||||||
repo = "todoist";
|
repo = "todoist";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1kwvlsjr2a7wdhlwpxxpdh87wz8k9yjwl59vl2g7ya6m0rvhd3mc";
|
sha256 = "0qhmv65il14lns817yxhma784jw5bz629svzh2ykrmilx5f7dxqc";
|
||||||
};
|
};
|
||||||
|
|
||||||
modSha256 = "09n6abyaqwz4zcdz8934rvpbxhp4v2nmm5v739kkcc98c3h93i64";
|
modSha256 = "1nnp5ijz4n34gc97rar4wlvlbx21ndpjyb2mc6gxdk1wzx3mgswp";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = https://github.com/sachaos/todoist;
|
homepage = https://github.com/sachaos/todoist;
|
||||||
|
@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
|
|||||||
cp -r $out/libexec/configuration/ \$HOME/.xmind/configuration-cathy/
|
cp -r $out/libexec/configuration/ \$HOME/.xmind/configuration-cathy/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec "$out/libexec/XMind" "$@"
|
exec "$out/libexec/XMind" "\$@"
|
||||||
EOF
|
EOF
|
||||||
chmod +x $out/bin/XMind
|
chmod +x $out/bin/XMind
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, kubernetes-helm, ... }:
|
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, kubernetes-helm, ... }:
|
||||||
|
|
||||||
let version = "0.79.3"; in
|
let version = "0.85.0"; in
|
||||||
|
|
||||||
buildGoModule {
|
buildGoModule {
|
||||||
pname = "helmfile";
|
pname = "helmfile";
|
||||||
@ -10,12 +10,12 @@ buildGoModule {
|
|||||||
owner = "roboll";
|
owner = "roboll";
|
||||||
repo = "helmfile";
|
repo = "helmfile";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0wgfpidpqyvh41dnw351v91z4szi1s6lqak9li2pmddz1rdkx66v";
|
sha256 = "0k1019ddzhhl8kn70ibqf6srlfv92jkc26m78pic5c7ibqyq5fds";
|
||||||
};
|
};
|
||||||
|
|
||||||
goPackagePath = "github.com/roboll/helmfile";
|
goPackagePath = "github.com/roboll/helmfile";
|
||||||
|
|
||||||
modSha256 = "1ksz1c4j7mhsbq6ifqab04588d48c9glyhr4d3d4jyvi19qhwx1d";
|
modSha256 = "1npjm3rs32c1rwx8xb9s03jhd156da6p66hpaqccm7b6zxsm32nv";
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
22
pkgs/applications/networking/cluster/qbec/default.nix
Normal file
22
pkgs/applications/networking/cluster/qbec/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,14 +1,15 @@
|
|||||||
{ stdenv, fetchdarcs, pythonPackages, libvncserver, zlib
|
{ stdenv, fetchdarcs, pythonPackages, libvncserver, zlib
|
||||||
, gnutls, libvpx, makeDesktopItem }:
|
, gnutls, libvpx, makeDesktopItem, mkDerivationWith }:
|
||||||
|
|
||||||
|
mkDerivationWith pythonPackages.buildPythonApplication rec {
|
||||||
|
|
||||||
pythonPackages.buildPythonApplication rec {
|
|
||||||
pname = "blink";
|
pname = "blink";
|
||||||
version = "3.0.3";
|
version = "3.2.0";
|
||||||
|
|
||||||
src = fetchdarcs {
|
src = fetchdarcs {
|
||||||
url = http://devel.ag-projects.com/repositories/blink-qt;
|
url = http://devel.ag-projects.com/repositories/blink-qt;
|
||||||
rev = "release-${version}";
|
rev = "release-${version}";
|
||||||
sha256 = "1vj6zzfvxygz0fzr8bhymcw6j4v8xmr0kba53d6qg285j7hj1bdi";
|
sha256 = "19rcwr5scw48qnj79q1pysw95fz9h98nyc3161qy2kph5g7dwkc3";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./pythonpath.patch ];
|
patches = [ ./pythonpath.patch ];
|
||||||
@ -16,9 +17,20 @@ pythonPackages.buildPythonApplication rec {
|
|||||||
sed -i 's|@out@|'"''${out}"'|g' blink/resources.py
|
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 {
|
desktopItem = makeDesktopItem {
|
||||||
name = "Blink";
|
name = "Blink";
|
||||||
@ -30,9 +42,14 @@ pythonPackages.buildPythonApplication rec {
|
|||||||
categories = "Application;Internet;";
|
categories = "Application;Internet;";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
|
makeWrapperArgs = [
|
||||||
|
"\${qtWrapperArgs[@]}"
|
||||||
|
"--prefix LD_LIBRARY_PATH: ${gnutls.out}/lib"
|
||||||
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/blink \
|
|
||||||
--prefix LD_LIBRARY_PATH ":" ${gnutls.out}/lib
|
|
||||||
mkdir -p "$out/share/applications"
|
mkdir -p "$out/share/applications"
|
||||||
mkdir -p "$out/share/pixmaps"
|
mkdir -p "$out/share/pixmaps"
|
||||||
cp "$desktopItem"/share/applications/* "$out/share/applications"
|
cp "$desktopItem"/share/applications/* "$out/share/applications"
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
, gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }:
|
, gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "5.3.2";
|
version = "5.3.3";
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
pname = "franz";
|
pname = "franz";
|
||||||
inherit version;
|
inherit version;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/meetfranz/franz/releases/download/v${version}/franz_${version}_amd64.deb";
|
url = "https://github.com/meetfranz/franz/releases/download/v${version}/franz_${version}_amd64.deb";
|
||||||
sha256 = "19mfw0wgjdhq38p0xvixdxvk07j3rdwlw87p8gjh4yi1qv0paj4i";
|
sha256 = "03ii1gpc2wijy917565pqig1ihd4zhal12i2f5k916i7fp8912m1";
|
||||||
};
|
};
|
||||||
|
|
||||||
# don't remove runtime deps
|
# don't remove runtime deps
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "riot-web",
|
"name": "riot-web",
|
||||||
"productName": "Riot",
|
"productName": "Riot",
|
||||||
"main": "src/electron-main.js",
|
"main": "src/electron-main.js",
|
||||||
"version": "1.3.3",
|
"version": "1.3.5",
|
||||||
"description": "A feature-rich client for Matrix.org",
|
"description": "A feature-rich client for Matrix.org",
|
||||||
"author": "New Vector Ltd.",
|
"author": "New Vector Ltd.",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
executableName = "riot-desktop";
|
executableName = "riot-desktop";
|
||||||
version = "1.3.3";
|
version = "1.3.5";
|
||||||
riot-web-src = fetchFromGitHub {
|
riot-web-src = fetchFromGitHub {
|
||||||
owner = "vector-im";
|
owner = "vector-im";
|
||||||
repo = "riot-web";
|
repo = "riot-web";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1nzzxcz4r9932cha80q1bzn1425m67fsl89pn7n7ybrv6y0jnxpc";
|
sha256 = "05xwp6062lvjsy539swa6dxj3k3dw1667nkx8ffwdl1dg17wphy8";
|
||||||
};
|
};
|
||||||
|
|
||||||
in yarn2nix-moretea.mkYarnPackage rec {
|
in yarn2nix-moretea.mkYarnPackage rec {
|
||||||
|
@ -5,11 +5,11 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "riot-web";
|
pname = "riot-web";
|
||||||
version = "1.3.3";
|
version = "1.3.5";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/vector-im/riot-web/releases/download/v${version}/riot-v${version}.tar.gz";
|
url = "https://github.com/vector-im/riot-web/releases/download/v${version}/riot-v${version}.tar.gz";
|
||||||
sha256 = "1n5h7q3h0akw09p4z7nwprxsa8jnmwbvwn2npq7zz62ccasb4fv9";
|
sha256 = "0vpfv5rvrhrws52j4lxnj1qyagf9894znpxkdnkp72g19qsjn66g";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = let
|
installPhase = let
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtsvg, qtdeclarative, qttools, qtgraphicaleffects, qtquickcontrols2, full
|
{ 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
|
let
|
||||||
version = "1.1.6-1";
|
version = "1.2.2-1";
|
||||||
|
|
||||||
description = ''
|
description = ''
|
||||||
An application that runs on your computer in the background and seamlessly encrypts
|
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.
|
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 {
|
in mkDerivation {
|
||||||
pname = "protonmail-bridge";
|
pname = "protonmail-bridge";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://protonmail.com/download/protonmail-bridge_${version}_amd64.deb";
|
url = "https://protonmail.com/download/protonmail-bridge_${version}_amd64.deb";
|
||||||
sha256 = "108dql9q5znsqjkrs41pc6psjbg5bz09rdmjl036xxbvsdvq4a8r";
|
sha256 = "16hfa07wdqcns79395wjdglg2cjyblqgz1hx8rl15qm7n5f24ckl";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
@ -37,12 +26,10 @@ in mkDerivation {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/{bin,lib,share/applications}
|
mkdir -p $out/{bin,lib,share}
|
||||||
mkdir -p $out/share/{applications,icons/hicolor/scalable/apps}
|
|
||||||
|
|
||||||
cp -r usr/lib/protonmail/bridge/protonmail-bridge $out/lib
|
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 -r usr/share $out
|
||||||
cp ${desktopItem}/share/applications/* $out/share/applications
|
|
||||||
|
|
||||||
ln -s $out/lib/protonmail-bridge $out/bin/protonmail-bridge
|
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-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||||
--set-rpath "${rpath}" \
|
--set-rpath "${rpath}" \
|
||||||
$out/lib/protonmail-bridge
|
$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 ];
|
buildInputs = [ qtbase qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative ];
|
||||||
|
@ -28,12 +28,9 @@ in stdenv.mkDerivation rec {
|
|||||||
" echo \"Connecting...\"" \
|
" echo \"Connecting...\"" \
|
||||||
" sed -ri 's@${expectedUpdateResolvPath}@${actualUpdateResolvePath}@g' \"\$openvpn_config\"; echo \"Connecting...\""
|
" sed -ri 's@${expectedUpdateResolvPath}@${actualUpdateResolvePath}@g' \"\$openvpn_config\"; echo \"Connecting...\""
|
||||||
cp protonvpn-cli.sh "$out/bin/protonvpn-cli"
|
cp protonvpn-cli.sh "$out/bin/protonvpn-cli"
|
||||||
ln -s "$out/bin/protonvpn-cli" "$out/bin/pvpn"
|
wrapProgram $out/bin/protonvpn-cli \
|
||||||
'';
|
|
||||||
|
|
||||||
postInstallPhase = ''
|
|
||||||
wrapProgram $out/protonvpn-cli \
|
|
||||||
--prefix PATH : ${lib.makeBinPath [ coreutils openvpn python dialog wget update-resolv-conf ]}
|
--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; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "rclone";
|
pname = "rclone";
|
||||||
version = "1.49.2";
|
version = "1.49.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = pname;
|
owner = pname;
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1a90fr7cw78qhwdgkjwshap345jk1ipm3nnk7xf3nayiyibvk5dg";
|
sha256 = "0dd5xrbf62n4y77zzaai1rc069ism1ikvcw43hzja3mzwfa0sqqa";
|
||||||
};
|
};
|
||||||
|
|
||||||
modSha256 = "158mpmy8q67dk1ks9p926n1670gsk7rhd0vpjh44f4g64ddnhk03";
|
modSha256 = "158mpmy8q67dk1ks9p926n1670gsk7rhd0vpjh44f4g64ddnhk03";
|
||||||
|
@ -61,7 +61,7 @@ python3Packages.buildPythonApplication rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
propagatedBuildInputs = with python3Packages; [
|
||||||
paperwork-backend pypillowfight gtk3 cairo pyxdg dateutil
|
paperwork-backend pypillowfight gtk3 cairo pyxdg dateutil setuptools
|
||||||
];
|
];
|
||||||
|
|
||||||
makeWrapperArgs = [
|
makeWrapperArgs = [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, mkDerivation, pkgconfig, cmake, qtbase, cairo, pixman,
|
{ stdenv, fetchurl, mkDerivation, pkgconfig, cmake, qtbase, cairo, pixman,
|
||||||
boost, cups, fontconfig, freetype, hunspell, libjpeg, libtiff, libxml2, lcms2,
|
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
|
let
|
||||||
pythonEnv = python2.withPackages(ps: [ps.tkinter ps.pillow]);
|
pythonEnv = python2.withPackages(ps: [ps.tkinter ps.pillow]);
|
||||||
@ -20,7 +20,7 @@ mkDerivation rec {
|
|||||||
buildInputs = [
|
buildInputs = [
|
||||||
qtbase cairo pixman boost cups fontconfig
|
qtbase cairo pixman boost cups fontconfig
|
||||||
freetype hunspell libjpeg libtiff libxml2 lcms2 podofo poppler
|
freetype hunspell libjpeg libtiff libxml2 lcms2 podofo poppler
|
||||||
poppler_data pythonEnv harfbuzz qtimageformats qttools harfbuzzFull
|
poppler_data pythonEnv qtimageformats qttools harfbuzzFull
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -1,26 +1,32 @@
|
|||||||
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
{ stdenv, buildGoModule, fetchFromGitHub, fetchpatch }:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoModule rec {
|
||||||
pname = "git-lfs";
|
pname = "git-lfs";
|
||||||
version = "2.7.2";
|
version = "2.8.0";
|
||||||
|
|
||||||
goPackagePath = "github.com/git-lfs/git-lfs";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
owner = "git-lfs";
|
owner = "git-lfs";
|
||||||
repo = "git-lfs";
|
repo = "git-lfs";
|
||||||
sha256 = "1nf40rbdz901vsahg5cm09pznpina6wimmxl0lmh8pn0mi51yzvc";
|
sha256 = "17x9q4g1acf51bxr9lfmd2ym7w740n4ghdi0ncmma77kwabw9d3x";
|
||||||
};
|
};
|
||||||
|
|
||||||
preBuild = ''
|
modSha256 = "1rjscc52rh8kxa64canw3baljllp1c639nsn89hs5b86c8v1jav7";
|
||||||
pushd go/src/github.com/git-lfs/git-lfs
|
|
||||||
go generate ./commands
|
|
||||||
popd
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
patches = [
|
||||||
rm -v $bin/bin/{man,script,cmd}
|
(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; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "git-repo";
|
pname = "git-repo";
|
||||||
version = "1.13.5.1";
|
version = "1.13.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "android";
|
owner = "android";
|
||||||
repo = "tools_repo";
|
repo = "tools_repo";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "13rp0fq76a6qlw60pnipkgfng25i0ygyk66y30jv7hy8ip4aa92n";
|
sha256 = "1a12h84anf3sshkkcv30ljgibb35gmh01bmi6sicyhxbn1hrfi3w";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
@ -30,6 +30,7 @@ mkDerivation rec {
|
|||||||
prePatch = ''
|
prePatch = ''
|
||||||
sed 's_shotcutPath, "qmelt"_"${mlt}/bin/melt"_' -i src/jobs/meltjob.cpp
|
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_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)
|
NICE=$(type -P nice)
|
||||||
sed "s_/usr/bin/nice_''${NICE}_" -i src/jobs/meltjob.cpp src/jobs/ffmpegjob.cpp
|
sed "s_/usr/bin/nice_''${NICE}_" -i src/jobs/meltjob.cpp src/jobs/ffmpegjob.cpp
|
||||||
'';
|
'';
|
||||||
|
@ -189,6 +189,7 @@ rec {
|
|||||||
# libraries not on the upstream include list, but nevertheless expected
|
# libraries not on the upstream include list, but nevertheless expected
|
||||||
# by at least one appimage
|
# by at least one appimage
|
||||||
libtool.lib # for Synfigstudio
|
libtool.lib # for Synfigstudio
|
||||||
|
at-spi2-core
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
buildPackages,
|
||||||
cacert,
|
cacert,
|
||||||
callPackage,
|
callPackage,
|
||||||
closureInfo,
|
closureInfo,
|
||||||
@ -47,7 +48,7 @@ rec {
|
|||||||
, imageDigest
|
, imageDigest
|
||||||
, sha256
|
, sha256
|
||||||
, os ? "linux"
|
, os ? "linux"
|
||||||
, arch ? "amd64"
|
, arch ? buildPackages.go.GOARCH
|
||||||
|
|
||||||
# This is used to set name to the pulled image
|
# This is used to set name to the pulled image
|
||||||
, finalImageName ? imageName
|
, finalImageName ? imageName
|
||||||
@ -540,7 +541,7 @@ rec {
|
|||||||
configJson = let
|
configJson = let
|
||||||
pure = writeText "${baseName}-config.json" (builtins.toJSON {
|
pure = writeText "${baseName}-config.json" (builtins.toJSON {
|
||||||
inherit created config;
|
inherit created config;
|
||||||
architecture = "amd64";
|
architecture = buildPackages.go.GOARCH;
|
||||||
os = "linux";
|
os = "linux";
|
||||||
});
|
});
|
||||||
impure = runCommand "${baseName}-standard-dynamic-date.json"
|
impure = runCommand "${baseName}-standard-dynamic-date.json"
|
||||||
@ -658,7 +659,7 @@ rec {
|
|||||||
baseJson = let
|
baseJson = let
|
||||||
pure = writeText "${baseName}-config.json" (builtins.toJSON {
|
pure = writeText "${baseName}-config.json" (builtins.toJSON {
|
||||||
inherit created config;
|
inherit created config;
|
||||||
architecture = "amd64";
|
architecture = buildPackages.go.GOARCH;
|
||||||
os = "linux";
|
os = "linux";
|
||||||
});
|
});
|
||||||
impure = runCommand "${baseName}-config.json"
|
impure = runCommand "${baseName}-config.json"
|
||||||
|
@ -719,7 +719,7 @@ rec {
|
|||||||
{ name, fullName, size ? 4096, urlPrefix
|
{ name, fullName, size ? 4096, urlPrefix
|
||||||
, packagesList ? "", packagesLists ? [packagesList]
|
, packagesList ? "", packagesLists ? [packagesList]
|
||||||
, packages, extraPackages ? [], postInstall ? ""
|
, packages, extraPackages ? [], postInstall ? ""
|
||||||
, extraDebs ? []
|
, extraDebs ? [], createRootFS ? defaultCreateRootFS
|
||||||
, QEMU_OPTS ? "", memSize ? 512 }:
|
, QEMU_OPTS ? "", memSize ? 512 }:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -729,7 +729,7 @@ rec {
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
(fillDiskWithDebs {
|
(fillDiskWithDebs {
|
||||||
inherit name fullName size postInstall QEMU_OPTS memSize;
|
inherit name fullName size postInstall createRootFS QEMU_OPTS memSize;
|
||||||
debs = import expr {inherit fetchurl;} ++ extraDebs;
|
debs = import expr {inherit fetchurl;} ++ extraDebs;
|
||||||
}) // {inherit expr;};
|
}) // {inherit expr;};
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
stdenv, lib,
|
stdenv, lib, pkgs,
|
||||||
fetchFromGitHub, fetchurl,
|
fetchFromGitHub, fetchurl,
|
||||||
nodejs, ttfautohint-nox, otfcc,
|
nodejs, ttfautohint-nox, otfcc,
|
||||||
|
|
||||||
@ -8,7 +8,9 @@
|
|||||||
design ? [], upright ? [], italic ? [], oblique ? [],
|
design ? [], upright ? [], italic ? [], oblique ? [],
|
||||||
family ? null, weights ? [],
|
family ? null, weights ? [],
|
||||||
# Custom font set name. Required if any custom settings above.
|
# 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;
|
assert (design != []) -> set != null;
|
||||||
@ -19,38 +21,43 @@ assert (family != null) -> set != null;
|
|||||||
assert (weights != []) -> set != null;
|
assert (weights != []) -> set != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
installPackageLock = import ./package-lock.nix { inherit fetchurl lib; };
|
system = builtins.currentSystem;
|
||||||
|
nodePackages = import ./node-packages.nix { inherit pkgs system nodejs; };
|
||||||
in
|
in
|
||||||
|
|
||||||
let pname = if set != null then "iosevka-${set}" else "iosevka"; in
|
let pname = if set != null then "iosevka-${set}" else "iosevka"; in
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "1.14.3";
|
version = "2.3.0";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "be5invis";
|
owner = "be5invis";
|
||||||
repo ="Iosevka";
|
repo ="Iosevka";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0ba8hwxi88bp2jb9xfhk95nnlv8ykl74cv62xr4ybzm3b8ahpwqf";
|
sha256 = "1qnbxhx9wvij9zia226mc3sy8j7bfsw5v1cvxvsbbwjskwqdamvv";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let unwords = concatStringsSep " "; in
|
let quote = str: "\"" + str + "\""; in
|
||||||
|
let toTomlList = list: "[" + (concatMapStringsSep ", " quote list) +"]"; in
|
||||||
|
let unlines = concatStringsSep "\n"; in
|
||||||
|
|
||||||
let
|
let
|
||||||
param = name: options:
|
param = name: options:
|
||||||
if options != [] then "${name}='${unwords options}'" else null;
|
if options != [] then "${name}=${toTomlList options}" else null;
|
||||||
config = unwords (lib.filter (x: x != null) [
|
config = unlines (lib.filter (x: x != null) [
|
||||||
|
"[buildPlans.${pname}]"
|
||||||
(param "design" design)
|
(param "design" design)
|
||||||
(param "upright" upright)
|
(param "upright" upright)
|
||||||
(param "italic" italic)
|
(param "italic" italic)
|
||||||
(param "oblique" oblique)
|
(param "oblique" oblique)
|
||||||
(if family != null then "family='${family}'" else null)
|
(if family != null then "family=\"${family}\"" else null)
|
||||||
(param "weights" weights)
|
(param "weights" weights)
|
||||||
]);
|
]);
|
||||||
custom = design != [] || upright != [] || italic != [] || oblique != []
|
installNodeModules = unlines (lib.mapAttrsToList
|
||||||
|| family != null || weights != [];
|
(name: value: "mkdir -p node_modules/${name}\n cp -r ${value.outPath}/lib/node_modules/. node_modules")
|
||||||
|
nodePackages);
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
@ -58,33 +65,25 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
nativeBuildInputs = [ nodejs ttfautohint-nox otfcc ];
|
nativeBuildInputs = [ nodejs ttfautohint-nox otfcc ];
|
||||||
|
|
||||||
passAsFile = [ "installPackageLock" ];
|
passAsFile = [ "config" "extraParameters" ];
|
||||||
installPackageLock = installPackageLock ./package-lock.json;
|
config = config;
|
||||||
|
extraParameters = extraParameters;
|
||||||
preConfigure = ''
|
|
||||||
HOME=$TMPDIR
|
|
||||||
source "$installPackageLockPath";
|
|
||||||
npm --offline rebuild
|
|
||||||
'';
|
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
runHook preConfigure
|
mkdir -p node_modules/.bin
|
||||||
|
${installNodeModules}
|
||||||
${optionalString custom ''make custom-config set=${set} ${config}''}
|
${optionalString (set != null) ''mv "$configPath" private-build-plans.toml''}
|
||||||
|
${optionalString (extraParameters != null) ''cat "$extraParametersPath" >> parameters.toml''}
|
||||||
runHook postConfigure
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = lib.optionals custom [ "custom" "set=${set}" ];
|
buildPhase = ''
|
||||||
|
npm run build -- ttf::${pname}
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
fontdir="$out/share/fonts/$pname"
|
fontdir="$out/share/fonts/$pname"
|
||||||
install -d "$fontdir"
|
install -d "$fontdir"
|
||||||
install "dist/$pname/ttf"/* "$fontdir"
|
install "dist/$pname/ttf"/* "$fontdir"
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
@ -98,6 +97,6 @@ stdenv.mkDerivation {
|
|||||||
'';
|
'';
|
||||||
license = licenses.ofl;
|
license = licenses.ofl;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = with maintainers; [ cstrahan jfrankenau ttuegel ];
|
maintainers = with maintainers; [ cstrahan jfrankenau ttuegel babariviere ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
6
pkgs/data/fonts/iosevka/generate.sh
Normal file
6
pkgs/data/fonts/iosevka/generate.sh
Normal 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
|
4257
pkgs/data/fonts/iosevka/node-packages-generated.nix
Normal file
4257
pkgs/data/fonts/iosevka/node-packages-generated.nix
Normal file
File diff suppressed because it is too large
Load Diff
20
pkgs/data/fonts/iosevka/node-packages.json
Normal file
20
pkgs/data/fonts/iosevka/node-packages.json
Normal 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"
|
||||||
|
]
|
17
pkgs/data/fonts/iosevka/node-packages.nix
generated
Normal file
17
pkgs/data/fonts/iosevka/node-packages.nix
generated
Normal 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;
|
||||||
|
}
|
1025
pkgs/data/fonts/iosevka/package-lock.json
generated
1025
pkgs/data/fonts/iosevka/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -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}
|
|
||||||
)
|
|
||||||
''
|
|
||||||
|
|
29
pkgs/data/icons/qogir-icon-theme/default.nix
Normal file
29
pkgs/data/icons/qogir-icon-theme/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "materia-theme";
|
pname = "materia-theme";
|
||||||
version = "20190831";
|
version = "20190912";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nana-4";
|
owner = "nana-4";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "19b2wyq38wj3id0an47jln1y3zp5ih3kbrgmfpjp6bbdrmfcyccf";
|
sha256 = "07vbql1y9jfd0m34lw1674cfr6217dzg3irk0450kny8sjrrj6dx";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ glib libxml2 bc ];
|
nativeBuildInputs = [ glib libxml2 bc ];
|
||||||
|
@ -61,6 +61,6 @@ in stdenv.mkDerivation rec {
|
|||||||
homepage = https://wiki.gnome.org/Apps/Boxes;
|
homepage = https://wiki.gnome.org/Apps/Boxes;
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ bjornfor ];
|
maintainers = gnome3.maintainers;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "atril";
|
pname = "atril";
|
||||||
version = "1.22.1";
|
version = "1.22.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://pub.mate-desktop.org/releases/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
url = "https://pub.mate-desktop.org/releases/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||||
sha256 = "0i2wgsksgwhrmajj1lay3iym4dcyj8cdd813yh5mrfz4rkv49190";
|
sha256 = "11l78zkxszvsjr74cmk1wff5ycqrzd89y6k36rydv2rb5af2nsfw";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -90,9 +90,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
|||||||
|
|
||||||
elementary-default-settings = callPackage ./desktop/elementary-default-settings { };
|
elementary-default-settings = callPackage ./desktop/elementary-default-settings { };
|
||||||
|
|
||||||
elementary-greeter = callPackage ./desktop/elementary-greeter {
|
elementary-greeter = callPackage ./desktop/elementary-greeter { };
|
||||||
inherit (gnome3) gnome-desktop;
|
|
||||||
};
|
|
||||||
|
|
||||||
elementary-print-shim = callPackage ./desktop/elementary-print-shim { };
|
elementary-print-shim = callPackage ./desktop/elementary-print-shim { };
|
||||||
|
|
||||||
|
@ -1,20 +1,41 @@
|
|||||||
{ stdenv, fetchFromGitHub, pantheon, pkgconfig, substituteAll, meson
|
{ stdenv
|
||||||
, ninja, vala, desktop-file-utils, gtk3, granite, libgee, elementary-settings-daemon
|
, fetchFromGitHub
|
||||||
, gnome-desktop, mutter, elementary-icon-theme, wingpanel-with-indicators
|
, linkFarm
|
||||||
, elementary-gtk-theme, nixos-artwork, lightdm, numlockx
|
, elementary-greeter
|
||||||
, clutter-gtk, libGL, dbus, wrapGAppsHook }:
|
, 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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "elementary-greeter";
|
pname = "elementary-greeter";
|
||||||
version = "3.3.1";
|
version = "unstable-2019-09-10";
|
||||||
|
|
||||||
repoName = "greeter";
|
repoName = "greeter";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "elementary";
|
owner = "elementary";
|
||||||
repo = repoName;
|
repo = repoName;
|
||||||
rev = version;
|
rev = "cad7d28d2b40ed04f6ce49ab44408297b5c69468";
|
||||||
sha256 = "1vkq4z0hrmvzv4sh2qkxjajdxcycd1zj97a3pc8n4yb858pqfyzc";
|
sha256 = "0m8iq04wdwgg6arm7dzwi7a0snxvss62zpnw2knpr6lp77vd7hqr";
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
@ -22,6 +43,11 @@ stdenv.mkDerivation rec {
|
|||||||
inherit repoName;
|
inherit repoName;
|
||||||
attrPath = pname;
|
attrPath = pname;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xgreeters = linkFarm "pantheon-greeter-xgreeters" [{
|
||||||
|
path = "${elementary-greeter}/share/xgreeters/io.elementary.greeter.desktop";
|
||||||
|
name = "io.elementary.greeter.desktop";
|
||||||
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -34,38 +60,32 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
clutter-gtk
|
accountsservice
|
||||||
elementary-icon-theme
|
clutter-gtk # else we get could not generate cargs for mutter-clutter-2
|
||||||
elementary-gtk-theme
|
elementary-gtk-theme
|
||||||
|
elementary-icon-theme
|
||||||
elementary-settings-daemon
|
elementary-settings-daemon
|
||||||
gnome-desktop
|
gdk-pixbuf
|
||||||
granite
|
granite
|
||||||
gtk3
|
gtk3
|
||||||
libgee
|
libgee
|
||||||
libGL
|
|
||||||
lightdm
|
lightdm
|
||||||
mutter
|
mutter
|
||||||
wingpanel-with-indicators
|
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 = [
|
mesonFlags = [
|
||||||
# A hook does this but after wrapGAppsHook so the files never get wrapped.
|
# A hook does this but after wrapGAppsHook so the files never get wrapped.
|
||||||
"--sbindir=${placeholder "out"}/bin"
|
"--sbindir=${placeholder "out"}/bin"
|
||||||
# baked into the program for discovery of the greeter configuration
|
# baked into the program for discovery of the greeter configuration
|
||||||
"--sysconfdir=/etc"
|
"--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 = ''
|
preFixup = ''
|
||||||
@ -76,18 +96,19 @@ stdenv.mkDerivation rec {
|
|||||||
# for `wingpanel -g`
|
# for `wingpanel -g`
|
||||||
--prefix PATH : "${wingpanel-with-indicators}/bin"
|
--prefix PATH : "${wingpanel-with-indicators}/bin"
|
||||||
|
|
||||||
# TODO: they should be using meson for this
|
# for the compositor
|
||||||
# See: https://github.com/elementary/greeter/blob/19c0730fded4e9ddec5a491f0e78f83c7c04eb59/src/PantheonGreeter.vala#L451
|
|
||||||
--prefix PATH : "$out/bin"
|
--prefix PATH : "$out/bin"
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
substituteInPlace $out/share/xgreeters/io.elementary.greeter.desktop \
|
# Use NixOS default wallpaper
|
||||||
--replace "Exec=io.elementary.greeter" "Exec=$out/bin/io.elementary.greeter"
|
|
||||||
|
|
||||||
substituteInPlace $out/etc/lightdm/io.elementary.greeter.conf \
|
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; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -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',
|
|
@ -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");
|
|
||||||
|
|
@ -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;
|
|
@ -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>
|
From: worldofpeace <worldofpeace@users.noreply.github.com>
|
||||||
Date: Tue, 17 Jul 2018 07:04:18 -0400
|
Date: Sat, 16 Mar 2019 16:07:24 -0400
|
||||||
Subject: [PATCH 1/1] 'sysconfdir' will be etc not /etc for install
|
Subject: [PATCH] 'sysconfdir' will be etc not /etc for install
|
||||||
|
|
||||||
---
|
---
|
||||||
data/meson.build | 2 +-
|
data/meson.build | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/data/meson.build b/data/meson.build
|
diff --git a/data/meson.build b/data/meson.build
|
||||||
index 7621b03..7c08eaf 100644
|
index fd54b75..b1120ae 100644
|
||||||
--- a/data/meson.build
|
--- a/data/meson.build
|
||||||
+++ b/data/meson.build
|
+++ b/data/meson.build
|
||||||
@@ -20,7 +20,7 @@ i18n.merge_file (
|
@@ -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_dir: join_paths(get_option('prefix'), 'etc', 'lightdm')
|
||||||
)
|
)
|
||||||
|
|
||||||
install_data(
|
test (
|
||||||
--
|
--
|
||||||
2.17.1
|
2.19.2
|
||||||
|
|
@ -14,6 +14,8 @@
|
|||||||
, mutter
|
, mutter
|
||||||
, json-glib
|
, json-glib
|
||||||
, python3
|
, python3
|
||||||
|
, elementary-gtk-theme
|
||||||
|
, elementary-icon-theme
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -44,6 +46,8 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
elementary-gtk-theme
|
||||||
|
elementary-icon-theme
|
||||||
gala
|
gala
|
||||||
granite
|
granite
|
||||||
gtk3
|
gtk3
|
||||||
|
@ -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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "dtc";
|
pname = "dtc";
|
||||||
@ -10,16 +12,17 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1jhhfrg22h53lvm2lqhd66pyk20pil08ry03wcwyx1c3ln27k73z";
|
sha256 = "1jhhfrg22h53lvm2lqhd66pyk20pil08ry03wcwyx1c3ln27k73z";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ flex bison pkgconfig swig which ];
|
nativeBuildInputs = [ flex bison pkgconfig which ] ++ lib.optionals pythonSupport [ python2 swig ];
|
||||||
buildInputs = [ python2 ];
|
buildInputs = lib.optionals pythonSupport [ python2 ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs pylibfdt/
|
patchShebangs pylibfdt/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
makeFlags = lib.optionals (!pythonSupport) [ "NO_PYTHON=1" ];
|
||||||
installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ];
|
installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "Device Tree Compiler";
|
description = "Device Tree Compiler";
|
||||||
homepage = https://git.kernel.org/cgit/utils/dtc/dtc.git;
|
homepage = https://git.kernel.org/cgit/utils/dtc/dtc.git;
|
||||||
license = licenses.gpl2; # dtc itself is GPLv2, libfdt is dual GPL/BSD
|
license = licenses.gpl2; # dtc itself is GPLv2, libfdt is dual GPL/BSD
|
||||||
|
@ -12,7 +12,7 @@ let
|
|||||||
inherit (stdenv.hostPlatform) system;
|
inherit (stdenv.hostPlatform) system;
|
||||||
};
|
};
|
||||||
|
|
||||||
hsPkgs = haskell.packages.ghc864.override {
|
hsPkgs = haskell.packages.ghc865.override {
|
||||||
overrides = self: super: with haskell.lib;
|
overrides = self: super: with haskell.lib;
|
||||||
let elmPkgs = rec {
|
let elmPkgs = rec {
|
||||||
elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: {
|
elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: {
|
||||||
|
@ -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"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Don’t 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;
|
|
||||||
})
|
|
@ -7,8 +7,6 @@
|
|||||||
|
|
||||||
, libiconv ? null, ncurses
|
, libiconv ? null, ncurses
|
||||||
|
|
||||||
, enableDwarf ? !stdenv.isDarwin, elfutils # for DWARF support
|
|
||||||
|
|
||||||
, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
|
, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
|
||||||
, # LLVM is conceptually a run-time-only depedendency, but for
|
, # LLVM is conceptually a run-time-only depedendency, but for
|
||||||
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
|
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
|
||||||
@ -73,8 +71,7 @@ let
|
|||||||
# Splicer will pull out correct variations
|
# Splicer will pull out correct variations
|
||||||
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
|
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
|
||||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
||||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
|
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||||
++ stdenv.lib.optional enableDwarf elfutils;
|
|
||||||
|
|
||||||
toolsForTarget = [
|
toolsForTarget = [
|
||||||
pkgsBuildTarget.targetPackages.stdenv.cc
|
pkgsBuildTarget.targetPackages.stdenv.cc
|
||||||
@ -183,8 +180,6 @@ stdenv.mkDerivation (rec {
|
|||||||
] ++ stdenv.lib.optionals (targetPlatform.isDarwin && targetPlatform.isAarch64) [
|
] ++ 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/
|
# fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
|
||||||
"--disable-large-address-space"
|
"--disable-large-address-space"
|
||||||
] ++ stdenv.lib.optional enableDwarf [
|
|
||||||
"--enable-dwarf-unwind"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||||
|
@ -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;
|
|
||||||
|
|
||||||
# Don’t 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;
|
|
||||||
})
|
|
@ -7,8 +7,6 @@
|
|||||||
|
|
||||||
, libiconv ? null, ncurses
|
, libiconv ? null, ncurses
|
||||||
|
|
||||||
, enableDwarf ? !stdenv.isDarwin, elfutils # for DWARF support
|
|
||||||
|
|
||||||
, # GHC can be built with system libffi or a bundled one.
|
, # GHC can be built with system libffi or a bundled one.
|
||||||
libffi ? null
|
libffi ? null
|
||||||
|
|
||||||
@ -78,8 +76,7 @@ let
|
|||||||
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
|
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
|
||||||
++ [libffi]
|
++ [libffi]
|
||||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
||||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
|
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||||
++ stdenv.lib.optional enableDwarf elfutils;
|
|
||||||
|
|
||||||
toolsForTarget = [
|
toolsForTarget = [
|
||||||
pkgsBuildTarget.targetPackages.stdenv.cc
|
pkgsBuildTarget.targetPackages.stdenv.cc
|
||||||
@ -182,8 +179,6 @@ stdenv.mkDerivation (rec {
|
|||||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||||
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
||||||
"--disable-large-address-space"
|
"--disable-large-address-space"
|
||||||
] ++ stdenv.lib.optional enableDwarf [
|
|
||||||
"--enable-dwarf-unwind"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||||
|
@ -7,8 +7,6 @@
|
|||||||
|
|
||||||
, libiconv ? null, ncurses
|
, libiconv ? null, ncurses
|
||||||
|
|
||||||
, enableDwarf ? !stdenv.isDarwin, elfutils # for DWARF support
|
|
||||||
|
|
||||||
, # GHC can be built with system libffi or a bundled one.
|
, # GHC can be built with system libffi or a bundled one.
|
||||||
libffi ? null
|
libffi ? null
|
||||||
|
|
||||||
@ -78,8 +76,7 @@ let
|
|||||||
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
|
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
|
||||||
++ [libffi]
|
++ [libffi]
|
||||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
||||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
|
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||||
++ stdenv.lib.optional enableDwarf elfutils;
|
|
||||||
|
|
||||||
toolsForTarget = [
|
toolsForTarget = [
|
||||||
pkgsBuildTarget.targetPackages.stdenv.cc
|
pkgsBuildTarget.targetPackages.stdenv.cc
|
||||||
@ -167,8 +164,6 @@ stdenv.mkDerivation (rec {
|
|||||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||||
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
||||||
"--disable-large-address-space"
|
"--disable-large-address-space"
|
||||||
] ++ stdenv.lib.optional enableDwarf [
|
|
||||||
"--enable-dwarf-unwind"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
# 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
Loading…
Reference in New Issue
Block a user