mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
Merge branch 'staging-next' into staging
This commit is contained in:
commit
70c0c48970
6
.github/CODEOWNERS
vendored
6
.github/CODEOWNERS
vendored
@ -157,6 +157,12 @@
|
||||
/pkgs/applications/editors/emacs @adisbladis
|
||||
/pkgs/top-level/emacs-packages.nix @adisbladis
|
||||
|
||||
# VimPlugins
|
||||
/pkgs/misc/vim-plugins @jonringer
|
||||
|
||||
# VsCode Extensions
|
||||
/pkgs/misc/vscode-extensions @jonringer
|
||||
|
||||
# Prometheus exporter modules and tests
|
||||
/nixos/modules/services/monitoring/prometheus/exporters.nix @WilliButz
|
||||
/nixos/modules/services/monitoring/prometheus/exporters.xml @WilliButz
|
||||
|
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -6,7 +6,7 @@
|
||||
|
||||
<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->
|
||||
|
||||
- [ ] Tested using sandboxing ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS, or option `sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file) on non-NixOS)
|
||||
- [ ] Tested using sandboxing ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS, or option `sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file) on non-NixOS linux)
|
||||
- Built on platform(s)
|
||||
- [ ] NixOS
|
||||
- [ ] macOS
|
||||
|
@ -3,15 +3,12 @@
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xml:id="chap-pkgs-fetchers">
|
||||
<title>Fetchers</title>
|
||||
|
||||
<para>
|
||||
When using Nix, you will frequently need to download source code and other files from the internet. Nixpkgs comes with a few helper functions that allow you to fetch fixed-output derivations in a structured way.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The two fetcher primitives are <function>fetchurl</function> and <function>fetchzip</function>. Both of these have two required arguments, a URL and a hash. The hash is typically <literal>sha256</literal>, although many more hash algorithms are supported. Nixpkgs contributors are currently recommended to use <literal>sha256</literal>. This hash will be used by Nix to identify your source. A typical usage of fetchurl is provided below.
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[
|
||||
{ stdenv, fetchurl }:
|
||||
|
||||
@ -23,19 +20,15 @@ stdenv.mkDerivation {
|
||||
};
|
||||
}
|
||||
]]></programlisting>
|
||||
|
||||
<para>
|
||||
The main difference between <function>fetchurl</function> and <function>fetchzip</function> is in how they store the contents. <function>fetchurl</function> will store the unaltered contents of the URL within the Nix store. <function>fetchzip</function> on the other hand will decompress the archive for you, making files and directories directly accessible in the future. <function>fetchzip</function> can only be used with archives. Despite the name, <function>fetchzip</function> is not limited to .zip files and can also be used with any tarball.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<function>fetchpatch</function> works very similarly to <function>fetchurl</function> with the same arguments expected. It expects patch files as a source and and performs normalization on them before computing the checksum. For example it will remove comments or other unstable parts that are sometimes added by version control systems and can change over time.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Other fetcher functions allow you to add source code directly from a VCS such as subversion or git. These are mostly straightforward names based on the name of the command used with the VCS system. Because they give you a working repository, they act most like <function>fetchzip</function>.
|
||||
</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
@ -88,11 +81,9 @@ stdenv.mkDerivation {
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<para>
|
||||
A number of fetcher functions wrap part of <function>fetchurl</function> and <function>fetchzip</function>. They are mainly convenience functions intended for commonly used destinations of source code in Nixpkgs. These wrapper fetchers are listed below.
|
||||
</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
|
44
doc/builders/packages/citrix.xml
Normal file
44
doc/builders/packages/citrix.xml
Normal file
@ -0,0 +1,44 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-citrix">
|
||||
<title>Citrix Workspace</title>
|
||||
|
||||
<para>
|
||||
<note>
|
||||
<para>
|
||||
Please note that the <literal>citrix_receiver</literal> package has been deprecated since its development was <link xlink:href="https://docs.citrix.com/en-us/citrix-workspace-app.html">discontinued by upstream</link> and has been replaced by <link xlink:href="https://www.citrix.com/products/workspace-app/">the citrix workspace app</link>.
|
||||
</para>
|
||||
</note>
|
||||
<link xlink:href="https://www.citrix.com/products/receiver/">Citrix Receiver</link> and <link xlink:href="https://www.citrix.com/products/workspace-app/">Citrix Workspace App</link> are a remote desktop viewers which provide access to <link xlink:href="https://www.citrix.com/products/xenapp-xendesktop/">XenDesktop</link> installations.
|
||||
</para>
|
||||
|
||||
<section xml:id="sec-citrix-base">
|
||||
<title>Basic usage</title>
|
||||
|
||||
<para>
|
||||
The tarball archive needs to be downloaded manually as the license agreements of the vendor for <link xlink:href="https://www.citrix.com/downloads/citrix-receiver/">Citrix Receiver</link> or <link xlink:href="https://www.citrix.de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html">Citrix Workspace</link> need to be accepted first. Then run <command>nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz</command>. With the archive available in the store the package can be built and installed with Nix.
|
||||
</para>
|
||||
|
||||
<warning>
|
||||
<title>Caution with <command>nix-shell</command> installs</title>
|
||||
<para>
|
||||
It's recommended to install <literal>Citrix Receiver</literal> and/or <literal>Citrix Workspace</literal> using <literal>nix-env -i</literal> or globally to ensure that the <literal>.desktop</literal> files are installed properly into <literal>$XDG_CONFIG_DIRS</literal>. Otherwise it won't be possible to open <literal>.ica</literal> files automatically from the browser to start a Citrix connection.
|
||||
</para>
|
||||
</warning>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-citrix-custom-certs">
|
||||
<title>Custom certificates</title>
|
||||
|
||||
<para>
|
||||
The <literal>Citrix Workspace App</literal> in <literal>nixpkgs</literal> trust several certificates <link xlink:href="https://curl.haxx.se/docs/caextract.html">from the Mozilla database</link> by default. However several companies using Citrix might require their own corporate certificate. On distros with imperative packaging these certs can be stored easily in <link xlink:href="https://developer-docs.citrix.com/projects/receiver-for-linux-command-reference/en/13.7/"><literal>$ICAROOT</literal></link>, however this directory is a store path in <literal>nixpkgs</literal>. In order to work around this issue the package provides a simple mechanism to add custom certificates without rebuilding the entire package using <literal>symlinkJoin</literal>:
|
||||
<programlisting>
|
||||
<![CDATA[with import <nixpkgs> { config.allowUnfree = true; };
|
||||
let extraCerts = [ ./custom-cert-1.pem ./custom-cert-2.pem /* ... */ ]; in
|
||||
citrix_workspace.override {
|
||||
inherit extraCerts;
|
||||
}]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
24
doc/builders/packages/dlib.xml
Normal file
24
doc/builders/packages/dlib.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="dlib">
|
||||
<title>DLib</title>
|
||||
|
||||
<para>
|
||||
<link xlink:href="http://dlib.net/">DLib</link> is a modern, C++-based toolkit which provides several machine learning algorithms.
|
||||
</para>
|
||||
|
||||
<section xml:id="compiling-without-avx-support">
|
||||
<title>Compiling without AVX support</title>
|
||||
|
||||
<para>
|
||||
Especially older CPUs don't support <link xlink:href="https://en.wikipedia.org/wiki/Advanced_Vector_Extensions">AVX</link> (<abbrev>Advanced Vector Extensions</abbrev>) instructions that are used by DLib to optimize their algorithms.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
On the affected hardware errors like <literal>Illegal instruction</literal> will occur. In those cases AVX support needs to be disabled:
|
||||
<programlisting>self: super: {
|
||||
dlib = super.dlib.override { avxSupport = false; };
|
||||
}</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
72
doc/builders/packages/eclipse.xml
Normal file
72
doc/builders/packages/eclipse.xml
Normal file
@ -0,0 +1,72 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-eclipse">
|
||||
<title>Eclipse</title>
|
||||
|
||||
<para>
|
||||
The Nix expressions related to the Eclipse platform and IDE are in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/eclipse"><filename>pkgs/applications/editors/eclipse</filename></link>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Nixpkgs provides a number of packages that will install Eclipse in its various forms. These range from the bare-bones Eclipse Platform to the more fully featured Eclipse SDK or Scala-IDE packages and multiple version are often available. It is possible to list available Eclipse packages by issuing the command:
|
||||
<screen>
|
||||
<prompt>$ </prompt>nix-env -f '<nixpkgs>' -qaP -A eclipses --description
|
||||
</screen>
|
||||
Once an Eclipse variant is installed it can be run using the <command>eclipse</command> command, as expected. From within Eclipse it is then possible to install plugins in the usual manner by either manually specifying an Eclipse update site or by installing the Marketplace Client plugin and using it to discover and install other plugins. This installation method provides an Eclipse installation that closely resemble a manually installed Eclipse.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you prefer to install plugins in a more declarative manner then Nixpkgs also offer a number of Eclipse plugins that can be installed in an <emphasis>Eclipse environment</emphasis>. This type of environment is created using the function <varname>eclipseWithPlugins</varname> found inside the <varname>nixpkgs.eclipses</varname> attribute set. This function takes as argument <literal>{ eclipse, plugins ? [], jvmArgs ? [] }</literal> where <varname>eclipse</varname> is a one of the Eclipse packages described above, <varname>plugins</varname> is a list of plugin derivations, and <varname>jvmArgs</varname> is a list of arguments given to the JVM running the Eclipse. For example, say you wish to install the latest Eclipse Platform with the popular Eclipse Color Theme plugin and also allow Eclipse to use more RAM. You could then add
|
||||
<screen>
|
||||
packageOverrides = pkgs: {
|
||||
myEclipse = with pkgs.eclipses; eclipseWithPlugins {
|
||||
eclipse = eclipse-platform;
|
||||
jvmArgs = [ "-Xmx2048m" ];
|
||||
plugins = [ plugins.color-theme ];
|
||||
};
|
||||
}
|
||||
</screen>
|
||||
to your Nixpkgs configuration (<filename>~/.config/nixpkgs/config.nix</filename>) and install it by running <command>nix-env -f '<nixpkgs>' -iA myEclipse</command> and afterward run Eclipse as usual. It is possible to find out which plugins are available for installation using <varname>eclipseWithPlugins</varname> by running
|
||||
<screen>
|
||||
<prompt>$ </prompt>nix-env -f '<nixpkgs>' -qaP -A eclipses.plugins --description
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If there is a need to install plugins that are not available in Nixpkgs then it may be possible to define these plugins outside Nixpkgs using the <varname>buildEclipseUpdateSite</varname> and <varname>buildEclipsePlugin</varname> functions found in the <varname>nixpkgs.eclipses.plugins</varname> attribute set. Use the <varname>buildEclipseUpdateSite</varname> function to install a plugin distributed as an Eclipse update site. This function takes <literal>{ name, src }</literal> as argument where <literal>src</literal> indicates the Eclipse update site archive. All Eclipse features and plugins within the downloaded update site will be installed. When an update site archive is not available then the <varname>buildEclipsePlugin</varname> function can be used to install a plugin that consists of a pair of feature and plugin JARs. This function takes an argument <literal>{ name, srcFeature, srcPlugin }</literal> where <literal>srcFeature</literal> and <literal>srcPlugin</literal> are the feature and plugin JARs, respectively.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Expanding the previous example with two plugins using the above functions we have
|
||||
<screen>
|
||||
packageOverrides = pkgs: {
|
||||
myEclipse = with pkgs.eclipses; eclipseWithPlugins {
|
||||
eclipse = eclipse-platform;
|
||||
jvmArgs = [ "-Xmx2048m" ];
|
||||
plugins = [
|
||||
plugins.color-theme
|
||||
(plugins.buildEclipsePlugin {
|
||||
name = "myplugin1-1.0";
|
||||
srcFeature = fetchurl {
|
||||
url = "http://…/features/myplugin1.jar";
|
||||
sha256 = "123…";
|
||||
};
|
||||
srcPlugin = fetchurl {
|
||||
url = "http://…/plugins/myplugin1.jar";
|
||||
sha256 = "123…";
|
||||
};
|
||||
});
|
||||
(plugins.buildEclipseUpdateSite {
|
||||
name = "myplugin2-1.0";
|
||||
src = fetchurl {
|
||||
stripRoot = false;
|
||||
url = "http://…/myplugin2.zip";
|
||||
sha256 = "123…";
|
||||
};
|
||||
});
|
||||
];
|
||||
};
|
||||
}
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
17
doc/builders/packages/elm.xml
Normal file
17
doc/builders/packages/elm.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-elm">
|
||||
<title>Elm</title>
|
||||
|
||||
<para>
|
||||
To start a development environment do <command>nix-shell -p elmPackages.elm elmPackages.elm-format</command>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To update Elm compiler, see <filename>nixpkgs/pkgs/development/compilers/elm/README.md</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To package Elm applications, <link xlink:href="https://github.com/hercules-ci/elm2nix#elm2nix">read about elm2nix</link>.
|
||||
</para>
|
||||
</section>
|
@ -1,14 +1,14 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-emacs">
|
||||
<title>Emacs</title>
|
||||
<title>Emacs</title>
|
||||
|
||||
<section xml:id="sec-emacs-config">
|
||||
<title>Configuring Emacs</title>
|
||||
<section xml:id="sec-emacs-config">
|
||||
<title>Configuring Emacs</title>
|
||||
|
||||
<para>
|
||||
The Emacs package comes with some extra helpers to make it easier to configure. <varname>emacsWithPackages</varname> allows you to manage packages from ELPA. This means that you will not have to install that packages from within Emacs. For instance, if you wanted to use <literal>company</literal>, <literal>counsel</literal>, <literal>flycheck</literal>, <literal>ivy</literal>, <literal>magit</literal>, <literal>projectile</literal>, and <literal>use-package</literal> you could use this as a <filename>~/.config/nixpkgs/config.nix</filename> override:
|
||||
</para>
|
||||
<para>
|
||||
The Emacs package comes with some extra helpers to make it easier to configure. <varname>emacsWithPackages</varname> allows you to manage packages from ELPA. This means that you will not have to install that packages from within Emacs. For instance, if you wanted to use <literal>company</literal>, <literal>counsel</literal>, <literal>flycheck</literal>, <literal>ivy</literal>, <literal>magit</literal>, <literal>projectile</literal>, and <literal>use-package</literal> you could use this as a <filename>~/.config/nixpkgs/config.nix</filename> override:
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
{
|
||||
@ -26,9 +26,9 @@
|
||||
}
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
You can install it like any other packages via <command>nix-env -iA myEmacs</command>. However, this will only install those packages. It will not <literal>configure</literal> them for us. To do this, we need to provide a configuration file. Luckily, it is possible to do this from within Nix! By modifying the above example, we can make Emacs load a custom config file. The key is to create a package that provide a <filename>default.el</filename> file in <filename>/share/emacs/site-start/</filename>. Emacs knows to load this file automatically when it starts.
|
||||
</para>
|
||||
<para>
|
||||
You can install it like any other packages via <command>nix-env -iA myEmacs</command>. However, this will only install those packages. It will not <literal>configure</literal> them for us. To do this, we need to provide a configuration file. Luckily, it is possible to do this from within Nix! By modifying the above example, we can make Emacs load a custom config file. The key is to create a package that provide a <filename>default.el</filename> file in <filename>/share/emacs/site-start/</filename>. Emacs knows to load this file automatically when it starts.
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
{
|
||||
@ -108,13 +108,13 @@ cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el
|
||||
}
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
This provides a fairly full Emacs start file. It will load in addition to the user's presonal config. You can always disable it by passing <command>-q</command> to the Emacs command.
|
||||
</para>
|
||||
<para>
|
||||
This provides a fairly full Emacs start file. It will load in addition to the user's presonal config. You can always disable it by passing <command>-q</command> to the Emacs command.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Sometimes <varname>emacsWithPackages</varname> is not enough, as this package set has some priorities imposed on packages (with the lowest priority assigned to Melpa Unstable, and the highest for packages manually defined in <filename>pkgs/top-level/emacs-packages.nix</filename>). But you can't control this priorities when some package is installed as a dependency. You can override it on per-package-basis, providing all the required dependencies manually - but it's tedious and there is always a possibility that an unwanted dependency will sneak in through some other package. To completely override such a package you can use <varname>overrideScope'</varname>.
|
||||
</para>
|
||||
<para>
|
||||
Sometimes <varname>emacsWithPackages</varname> is not enough, as this package set has some priorities imposed on packages (with the lowest priority assigned to Melpa Unstable, and the highest for packages manually defined in <filename>pkgs/top-level/emacs-packages.nix</filename>). But you can't control this priorities when some package is installed as a dependency. You can override it on per-package-basis, providing all the required dependencies manually - but it's tedious and there is always a possibility that an unwanted dependency will sneak in through some other package. To completely override such a package you can use <varname>overrideScope'</varname>.
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
overrides = self: super: rec {
|
||||
@ -127,5 +127,5 @@ overrides = self: super: rec {
|
||||
dante
|
||||
])
|
||||
</screen>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
57
doc/builders/packages/ibus.xml
Normal file
57
doc/builders/packages/ibus.xml
Normal file
@ -0,0 +1,57 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-ibus-typing-booster">
|
||||
<title>ibus-engines.typing-booster</title>
|
||||
|
||||
<para>
|
||||
This package is an ibus-based completion method to speed up typing.
|
||||
</para>
|
||||
|
||||
<section xml:id="sec-ibus-typing-booster-activate">
|
||||
<title>Activating the engine</title>
|
||||
|
||||
<para>
|
||||
IBus needs to be configured accordingly to activate <literal>typing-booster</literal>. The configuration depends on the desktop manager in use. For detailed instructions, please refer to the <link xlink:href="https://mike-fabian.github.io/ibus-typing-booster/documentation.html">upstream docs</link>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
On NixOS you need to explicitly enable <literal>ibus</literal> with given engines before customizing your desktop to use <literal>typing-booster</literal>. This can be achieved using the <literal>ibus</literal> module:
|
||||
<programlisting>{ pkgs, ... }: {
|
||||
i18n.inputMethod = {
|
||||
enabled = "ibus";
|
||||
ibus.engines = with pkgs.ibus-engines; [ typing-booster ];
|
||||
};
|
||||
}</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-ibus-typing-booster-customize-hunspell">
|
||||
<title>Using custom hunspell dictionaries</title>
|
||||
|
||||
<para>
|
||||
The IBus engine is based on <literal>hunspell</literal> to support completion in many languages. By default the dictionaries <literal>de-de</literal>, <literal>en-us</literal>, <literal>fr-moderne</literal> <literal>es-es</literal>, <literal>it-it</literal>, <literal>sv-se</literal> and <literal>sv-fi</literal> are in use. To add another dictionary, the package can be overridden like this:
|
||||
<programlisting>ibus-engines.typing-booster.override {
|
||||
langs = [ "de-at" "en-gb" ];
|
||||
}</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<emphasis>Note: each language passed to <literal>langs</literal> must be an attribute name in <literal>pkgs.hunspellDicts</literal>.</emphasis>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-ibus-typing-booster-emoji-picker">
|
||||
<title>Built-in emoji picker</title>
|
||||
|
||||
<para>
|
||||
The <literal>ibus-engines.typing-booster</literal> package contains a program named <literal>emoji-picker</literal>. To display all emojis correctly, a special font such as <literal>noto-fonts-emoji</literal> is needed:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
On NixOS it can be installed using the following expression:
|
||||
<programlisting>{ pkgs, ... }: {
|
||||
fonts.fonts = with pkgs; [ noto-fonts-emoji ];
|
||||
}</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
@ -1,14 +1,14 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-kakoune">
|
||||
<title>Kakoune</title>
|
||||
<title>Kakoune</title>
|
||||
|
||||
<para>
|
||||
Kakoune can be built to autoload plugins:
|
||||
<para>
|
||||
Kakoune can be built to autoload plugins:
|
||||
<programlisting>(kakoune.override {
|
||||
configure = {
|
||||
plugins = with pkgs.kakounePlugins; [ parinfer-rust ];
|
||||
};
|
||||
})</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
</para>
|
||||
</section>
|
85
doc/builders/packages/linux.xml
Normal file
85
doc/builders/packages/linux.xml
Normal file
@ -0,0 +1,85 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-linux-kernel">
|
||||
<title>Linux kernel</title>
|
||||
|
||||
<para>
|
||||
The Nix expressions to build the Linux kernel are in <link
|
||||
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel"><filename>pkgs/os-specific/linux/kernel</filename></link>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The function that builds the kernel has an argument <varname>kernelPatches</varname> which should be a list of <literal>{name, patch, extraConfig}</literal> attribute sets, where <varname>name</varname> is the name of the patch (which is included in the kernel’s <varname>meta.description</varname> attribute), <varname>patch</varname> is the patch itself (possibly compressed), and <varname>extraConfig</varname> (optional) is a string specifying extra options to be concatenated to the kernel configuration file (<filename>.config</filename>).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The kernel derivation exports an attribute <varname>features</varname> specifying whether optional functionality is or isn’t enabled. This is used in NixOS to implement kernel-specific behaviour. For instance, if the kernel has the <varname>iwlwifi</varname> feature (i.e. has built-in support for Intel wireless chipsets), then NixOS doesn’t have to build the external <varname>iwlwifi</varname> package:
|
||||
<programlisting>
|
||||
modulesTree = [kernel]
|
||||
++ pkgs.lib.optional (!kernel.features ? iwlwifi) kernelPackages.iwlwifi
|
||||
++ ...;
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
How to add a new (major) version of the Linux kernel to Nixpkgs:
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Copy the old Nix expression (e.g. <filename>linux-2.6.21.nix</filename>) to the new one (e.g. <filename>linux-2.6.22.nix</filename>) and update it.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Add the new kernel to <filename>all-packages.nix</filename> (e.g., create an attribute <varname>kernel_2_6_22</varname>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Now we’re going to update the kernel configuration. First unpack the kernel. Then for each supported platform (<literal>i686</literal>, <literal>x86_64</literal>, <literal>uml</literal>) do the following:
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Make an copy from the old config (e.g. <filename>config-2.6.21-i686-smp</filename>) to the new one (e.g. <filename>config-2.6.22-i686-smp</filename>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Copy the config file for this platform (e.g. <filename>config-2.6.22-i686-smp</filename>) to <filename>.config</filename> in the kernel source tree.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Run <literal>make oldconfig ARCH=<replaceable>{i386,x86_64,um}</replaceable></literal> and answer all questions. (For the uml configuration, also add <literal>SHELL=bash</literal>.) Make sure to keep the configuration consistent between platforms (i.e. don’t enable some feature on <literal>i686</literal> and disable it on <literal>x86_64</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
If needed you can also run <literal>make menuconfig</literal>:
|
||||
<screen>
|
||||
<prompt>$ </prompt>nix-env -i ncurses
|
||||
<prompt>$ </prompt>export NIX_CFLAGS_LINK=-lncurses
|
||||
<prompt>$ </prompt>make menuconfig ARCH=<replaceable>arch</replaceable></screen>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Copy <filename>.config</filename> over the new config file (e.g. <filename>config-2.6.22-i686-smp</filename>).
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Test building the kernel: <literal>nix-build -A kernel_2_6_22</literal>. If it compiles, ship it! For extra credit, try booting NixOS with it.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
It may be that the new kernel requires updating the external kernel modules and kernel-dependent packages listed in the <varname>linuxPackagesFor</varname> function in <filename>all-packages.nix</filename> (such as the NVIDIA drivers, AUFS, etc.). If the updated packages aren’t backwards compatible with older kernels, you may need to keep the older versions around.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
@ -10,4 +10,4 @@
|
||||
<para>
|
||||
On non-NixOS distributions this variable is obviously not set. This can cause regressions in language support or even crashes in some Nixpkgs-provided programs. The simplest way to mitigate this problem is exporting the <literal>LOCALE_ARCHIVE</literal> variable pointing to <literal>${glibcLocales}/lib/locale/locale-archive</literal>. The drawback (and the reason this is not the default) is the relatively large (a hundred MiB) size of the full set of locales. It is possible to build a custom set of locales by overriding parameters <literal>allLocales</literal> and <literal>locales</literal> of the package.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
25
doc/builders/packages/nginx.xml
Normal file
25
doc/builders/packages/nginx.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-nginx">
|
||||
<title>Nginx</title>
|
||||
|
||||
<para>
|
||||
<link xlink:href="https://nginx.org/">Nginx</link> is a reverse proxy and lightweight webserver.
|
||||
</para>
|
||||
|
||||
<section xml:id="sec-nginx-etag">
|
||||
<title>ETags on static files served from the Nix store</title>
|
||||
|
||||
<para>
|
||||
HTTP has a couple different mechanisms for caching to prevent clients from having to download the same content repeatedly if a resource has not changed since the last time it was requested. When nginx is used as a server for static files, it implements the caching mechanism based on the <link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified"><literal>Last-Modified</literal></link> response header automatically; unfortunately, it works by using filesystem timestamps to determine the value of the <literal>Last-Modified</literal> header. This doesn't give the desired behavior when the file is in the Nix store, because all file timestamps are set to 0 (for reasons related to build reproducibility).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Fortunately, HTTP supports an alternative (and more effective) caching mechanism: the <link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag"><literal>ETag</literal></link> response header. The value of the <literal>ETag</literal> header specifies some identifier for the particular content that the server is sending (e.g. a hash). When a client makes a second request for the same resource, it sends that value back in an <literal>If-None-Match</literal> header. If the ETag value is unchanged, then the server does not need to resend the content.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As of NixOS 19.09, the nginx package in Nixpkgs is patched such that when nginx serves a file out of <filename>/nix/store</filename>, the hash in the store path is used as the <literal>ETag</literal> header in the HTTP response, thus providing proper caching functionality. This happens automatically; you do not need to do modify any configuration to get this behavior.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
9
doc/builders/packages/opengl.xml
Normal file
9
doc/builders/packages/opengl.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-opengl">
|
||||
<title>OpenGL</title>
|
||||
|
||||
<para>
|
||||
Packages that use OpenGL have NixOS desktop as their primary target. The current solution for loading the GPU-specific drivers is based on <literal>libglvnd</literal> and looks for the driver implementation in <literal>LD_LIBRARY_PATH</literal>. If you are using a non-NixOS GNU/Linux/X11 desktop with free software video drivers, consider launching OpenGL-dependent programs from Nixpkgs with Nixpkgs versions of <literal>libglvnd</literal> and <literal>mesa_drivers</literal> in <literal>LD_LIBRARY_PATH</literal>. For proprietary video drivers you might have luck with also adding the corresponding video driver package.
|
||||
</para>
|
||||
</section>
|
25
doc/builders/packages/shell-helpers.xml
Normal file
25
doc/builders/packages/shell-helpers.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-shell-helpers">
|
||||
<title>Interactive shell helpers</title>
|
||||
|
||||
<para>
|
||||
Some packages provide the shell integration to be more useful. But unlike other systems, nix doesn't have a standard share directory location. This is why a bunch <command>PACKAGE-share</command> scripts are shipped that print the location of the corresponding shared folder. Current list of such packages is as following:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>autojump</literal>: <command>autojump-share</command>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>fzf</literal>: <command>fzf-share</command>
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
E.g. <literal>autojump</literal> can then used in the .bashrc like this:
|
||||
<screen>
|
||||
source "$(autojump-share)/autojump.bash"
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
131
doc/builders/packages/steam.xml
Normal file
131
doc/builders/packages/steam.xml
Normal file
@ -0,0 +1,131 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-steam">
|
||||
<title>Steam</title>
|
||||
|
||||
<section xml:id="sec-steam-nix">
|
||||
<title>Steam in Nix</title>
|
||||
|
||||
<para>
|
||||
Steam is distributed as a <filename>.deb</filename> file, for now only as an i686 package (the amd64 package only has documentation). When unpacked, it has a script called <filename>steam</filename> that in Ubuntu (their target distro) would go to <filename>/usr/bin </filename>. When run for the first time, this script copies some files to the user's home, which include another script that is the ultimate responsible for launching the steam binary, which is also in $HOME.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Nix problems and constraints:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
We don't have <filename>/bin/bash</filename> and many scripts point there. Similarly for <filename>/usr/bin/python</filename> .
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
We don't have the dynamic loader in <filename>/lib </filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <filename>steam.sh</filename> script in $HOME can not be patched, as it is checked and rewritten by steam.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The steam binary cannot be patched, it's also checked.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The current approach to deploy Steam in NixOS is composing a FHS-compatible chroot environment, as documented <link xlink:href="http://sandervanderburg.blogspot.nl/2013/09/composing-fhs-compatible-chroot.html">here</link>. This allows us to have binaries in the expected paths without disrupting the system, and to avoid patching them to work in a non FHS environment.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-steam-play">
|
||||
<title>How to play</title>
|
||||
|
||||
<para>
|
||||
For 64-bit systems it's important to have
|
||||
<programlisting>hardware.opengl.driSupport32Bit = true;</programlisting>
|
||||
in your <filename>/etc/nixos/configuration.nix</filename>. You'll also need
|
||||
<programlisting>hardware.pulseaudio.support32Bit = true;</programlisting>
|
||||
if you are using PulseAudio - this will enable 32bit ALSA apps integration. To use the Steam controller or other Steam supported controllers such as the DualShock 4 or Nintendo Switch Pro, you need to add
|
||||
<programlisting>hardware.steam-hardware.enable = true;</programlisting>
|
||||
to your configuration.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-steam-troub">
|
||||
<title>Troubleshooting</title>
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
Steam fails to start. What do I do?
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Try to run
|
||||
<programlisting>strace steam</programlisting>
|
||||
to see what is causing steam to fail.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
Using the FOSS Radeon or nouveau (nvidia) drivers
|
||||
</term>
|
||||
<listitem>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
The <literal>newStdcpp</literal> parameter was removed since NixOS 17.09 and should not be needed anymore.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Steam ships statically linked with a version of libcrypto that conflics with the one dynamically loaded by radeonsi_dri.so. If you get the error
|
||||
<programlisting>steam.sh: line 713: 7842 Segmentation fault (core dumped)</programlisting>
|
||||
have a look at <link xlink:href="https://github.com/NixOS/nixpkgs/pull/20269">this pull request</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
Java
|
||||
</term>
|
||||
<listitem>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
There is no java in steam chrootenv by default. If you get a message like
|
||||
<programlisting>/home/foo/.local/share/Steam/SteamApps/common/towns/towns.sh: line 1: java: command not found</programlisting>
|
||||
You need to add
|
||||
<programlisting> steam.override { withJava = true; };</programlisting>
|
||||
to your configuration.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-steam-run">
|
||||
<title>steam-run</title>
|
||||
|
||||
<para>
|
||||
The FHS-compatible chroot used for steam can also be used to run other linux games that expect a FHS environment. To do it, add
|
||||
<programlisting>pkgs.(steam.override {
|
||||
nativeOnly = true;
|
||||
newStdcpp = true;
|
||||
}).run</programlisting>
|
||||
to your configuration, rebuild, and run the game with
|
||||
<programlisting>steam-run ./foo</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
@ -10,4 +10,4 @@
|
||||
<para>
|
||||
Fine-grained control is possible by defining <literal>allowUnfreePredicate</literal> function in config; it takes the <literal>mkDerivation</literal> parameter attrset and returns <literal>true</literal> for unfree packages that should be allowed.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
85
doc/builders/packages/weechat.xml
Normal file
85
doc/builders/packages/weechat.xml
Normal file
@ -0,0 +1,85 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-weechat">
|
||||
<title>Weechat</title>
|
||||
|
||||
<para>
|
||||
Weechat can be configured to include your choice of plugins, reducing its closure size from the default configuration which includes all available plugins. To make use of this functionality, install an expression that overrides its configuration such as
|
||||
<programlisting>weechat.override {configure = {availablePlugins, ...}: {
|
||||
plugins = with availablePlugins; [ python perl ];
|
||||
}
|
||||
}</programlisting>
|
||||
If the <literal>configure</literal> function returns an attrset without the <literal>plugins</literal> attribute, <literal>availablePlugins</literal> will be used automatically.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The plugins currently available are <literal>python</literal>, <literal>perl</literal>, <literal>ruby</literal>, <literal>guile</literal>, <literal>tcl</literal> and <literal>lua</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The python and perl plugins allows the addition of extra libraries. For instance, the <literal>inotify.py</literal> script in weechat-scripts requires D-Bus or libnotify, and the <literal>fish.py</literal> script requires pycrypto. To use these scripts, use the plugin's <literal>withPackages</literal> attribute:
|
||||
<programlisting>weechat.override { configure = {availablePlugins, ...}: {
|
||||
plugins = with availablePlugins; [
|
||||
(python.withPackages (ps: with ps; [ pycrypto python-dbus ]))
|
||||
];
|
||||
};
|
||||
}
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In order to also keep all default plugins installed, it is possible to use the following method:
|
||||
<programlisting>weechat.override { configure = { availablePlugins, ... }: {
|
||||
plugins = builtins.attrValues (availablePlugins // {
|
||||
python = availablePlugins.python.withPackages (ps: with ps; [ pycrypto python-dbus ]);
|
||||
});
|
||||
}; }
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
WeeChat allows to set defaults on startup using the <literal>--run-command</literal>. The <literal>configure</literal> method can be used to pass commands to the program:
|
||||
<programlisting>weechat.override {
|
||||
configure = { availablePlugins, ... }: {
|
||||
init = ''
|
||||
/set foo bar
|
||||
/server add freenode chat.freenode.org
|
||||
'';
|
||||
};
|
||||
}</programlisting>
|
||||
Further values can be added to the list of commands when running <literal>weechat --run-command "your-commands"</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Additionally it's possible to specify scripts to be loaded when starting <literal>weechat</literal>. These will be loaded before the commands from <literal>init</literal>:
|
||||
<programlisting>weechat.override {
|
||||
configure = { availablePlugins, ... }: {
|
||||
scripts = with pkgs.weechatScripts; [
|
||||
weechat-xmpp weechat-matrix-bridge wee-slack
|
||||
];
|
||||
init = ''
|
||||
/set plugins.var.python.jabber.key "val"
|
||||
'':
|
||||
};
|
||||
}</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In <literal>nixpkgs</literal> there's a subpackage which contains derivations for WeeChat scripts. Such derivations expect a <literal>passthru.scripts</literal> attribute which contains a list of all scripts inside the store path. Furthermore all scripts have to live in <literal>$out/share</literal>. An exemplary derivation looks like this:
|
||||
<programlisting>{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "exemplary-weechat-script";
|
||||
src = fetchurl {
|
||||
url = "https://scripts.tld/your-scripts.tar.gz";
|
||||
sha256 = "...";
|
||||
};
|
||||
passthru.scripts = [ "foo.py" "bar.lua" ];
|
||||
installPhase = ''
|
||||
mkdir $out/share
|
||||
cp foo.py $out/share
|
||||
cp bar.lua $out/share
|
||||
'';
|
||||
}</programlisting>
|
||||
</para>
|
||||
</section>
|
34
doc/builders/packages/xorg.xml
Normal file
34
doc/builders/packages/xorg.xml
Normal file
@ -0,0 +1,34 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-xorg">
|
||||
<title>X.org</title>
|
||||
|
||||
<para>
|
||||
The Nix expressions for the X.org packages reside in <filename>pkgs/servers/x11/xorg/default.nix</filename>. This file is automatically generated from lists of tarballs in an X.org release. As such it should not be modified directly; rather, you should modify the lists, the generator script or the file <filename>pkgs/servers/x11/xorg/overrides.nix</filename>, in which you can override or add to the derivations produced by the generator.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The generator is invoked as follows:
|
||||
<screen>
|
||||
<prompt>$ </prompt>cd pkgs/servers/x11/xorg
|
||||
<prompt>$ </prompt>cat tarballs-7.5.list extra.list old.list \
|
||||
| perl ./generate-expr-from-tarballs.pl
|
||||
</screen>
|
||||
For each of the tarballs in the <filename>.list</filename> files, the script downloads it, unpacks it, and searches its <filename>configure.ac</filename> and <filename>*.pc.in</filename> files for dependencies. This information is used to generate <filename>default.nix</filename>. The generator caches downloaded tarballs between runs. Pay close attention to the <literal>NOT FOUND: <replaceable>name</replaceable></literal> messages at the end of the run, since they may indicate missing dependencies. (Some might be optional dependencies, however.)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A file like <filename>tarballs-7.5.list</filename> contains all tarballs in a X.org release. It can be generated like this:
|
||||
<screen>
|
||||
<prompt>$ </prompt>export i="mirror://xorg/X11R7.4/src/everything/"
|
||||
<prompt>$ </prompt>cat $(PRINT_PATH=1 nix-prefetch-url $i | tail -n 1) \
|
||||
| perl -e 'while (<>) { if (/(href|HREF)="([^"]*.bz2)"/) { print "$ENV{'i'}$2\n"; }; }' \
|
||||
| sort > tarballs-7.4.list
|
||||
</screen>
|
||||
<filename>extra.list</filename> contains libraries that aren’t part of X.org proper, but are closely related to it, such as <literal>libxcb</literal>. <filename>old.list</filename> contains some packages that were removed from X.org, but are still needed by some people or by other packages (such as <varname>imake</varname>).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If the expression for a package requires derivation attributes that the generator cannot figure out automatically (say, <varname>patches</varname> or a <varname>postInstall</varname> hook), you should modify <filename>pkgs/servers/x11/xorg/overrides.nix</filename>.
|
||||
</para>
|
||||
</section>
|
@ -8,5 +8,3 @@
|
||||
<xi:include href="special/fhs-environments.xml" />
|
||||
<xi:include href="special/mkshell.xml" />
|
||||
</chapter>
|
||||
|
||||
|
||||
|
@ -3,11 +3,9 @@
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xml:id="chap-trivial-builders">
|
||||
<title>Trivial builders</title>
|
||||
|
||||
<para>
|
||||
Nixpkgs provides a couple of functions that help with building derivations. The most important one, <function>stdenv.mkDerivation</function>, has already been documented above. The following functions wrap <function>stdenv.mkDerivation</function>, making it easier to use in certain cases.
|
||||
</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
|
@ -375,31 +375,32 @@ Additional information.
|
||||
|
||||
<section xml:id="submitting-changes-master-branch">
|
||||
<title>Master branch</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
It should only see non-breaking commits that do not cause mass rebuilds.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
The <literal>master</literal> branch is the main development branch.
|
||||
It should only see non-breaking commits that do not cause mass rebuilds.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="submitting-changes-staging-branch">
|
||||
<title>Staging branch</title>
|
||||
<para>
|
||||
The <literal>staging</literal> branch is a development branch where mass-rebuilds go.
|
||||
It should only see non-breaking mass-rebuild commits.
|
||||
That means it is not to be used for testing, and changes must have been well tested already.
|
||||
If the branch is already in a broken state, please refrain from adding extra new breakages.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
It's only for non-breaking mass-rebuild commits. That means it's not to be used for testing, and changes must have been well tested already. <link xlink:href="https://web.archive.org/web/20160528180406/http://comments.gmane.org/gmane.linux.distributions.nixos/13447">Read policy here</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
If the branch is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days, merge into master, then resume development on staging. <link xlink:href="http://hydra.nixos.org/jobset/nixpkgs/staging#tabs-evaluations">Keep an eye on the staging evaluations here</link>. If any fixes for staging happen to be already in master, then master can be merged into staging.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<section xml:id="submitting-changes-staging-next-branch">
|
||||
<title>Staging-next branch</title>
|
||||
<para>
|
||||
The <literal>staging-next</literal> branch is for stabilizing mass-rebuilds submitted to the <literal>staging</literal> branch prior to merging them into <literal>master</literal>.
|
||||
Mass-rebuilds should go via the <literal>staging</literal> branch.
|
||||
It should only see non-breaking commits that are fixing issues blocking it from being merged into the <literal>master </literal> branch.
|
||||
</para>
|
||||
<para>
|
||||
If the branch is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days and then merge into master.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="submitting-changes-stable-release-branches">
|
@ -5,21 +5,21 @@
|
||||
<subtitle>Version <xi:include href=".version" parse="text" />
|
||||
</subtitle>
|
||||
</info>
|
||||
<xi:include href="introduction.chapter.xml" />
|
||||
<xi:include href="preface.chapter.xml" />
|
||||
<part>
|
||||
<title>Using Nixpkgs</title>
|
||||
<xi:include href="configuration.xml" />
|
||||
<xi:include href="overlays.xml" />
|
||||
<xi:include href="overrides.xml" />
|
||||
<xi:include href="using/configuration.xml" />
|
||||
<xi:include href="using/overlays.xml" />
|
||||
<xi:include href="using/overrides.xml" />
|
||||
<xi:include href="functions.xml" />
|
||||
</part>
|
||||
<part>
|
||||
<title>Standard environment</title>
|
||||
<xi:include href="stdenv.xml" />
|
||||
<xi:include href="meta.xml" />
|
||||
<xi:include href="multiple-output.xml" />
|
||||
<xi:include href="cross-compilation.xml" />
|
||||
<xi:include href="platform-notes.xml" />
|
||||
<xi:include href="stdenv/stdenv.xml" />
|
||||
<xi:include href="stdenv/meta.xml" />
|
||||
<xi:include href="stdenv/multiple-output.xml" />
|
||||
<xi:include href="stdenv/cross-compilation.xml" />
|
||||
<xi:include href="stdenv/platform-notes.xml" />
|
||||
</part>
|
||||
<part>
|
||||
<title>Builders</title>
|
||||
@ -28,14 +28,14 @@
|
||||
<xi:include href="builders/special.xml" />
|
||||
<xi:include href="builders/images.xml" />
|
||||
<xi:include href="languages-frameworks/index.xml" />
|
||||
<xi:include href="packages/index.xml" />
|
||||
<xi:include href="builders/packages/index.xml" />
|
||||
</part>
|
||||
<part>
|
||||
<title>Contributing to Nixpkgs</title>
|
||||
<xi:include href="quick-start.xml" />
|
||||
<xi:include href="coding-conventions.xml" />
|
||||
<xi:include href="submitting-changes.xml" />
|
||||
<xi:include href="reviewing-contributions.xml" />
|
||||
<xi:include href="contributing-to-documentation.xml" />
|
||||
<xi:include href="contributing/quick-start.xml" />
|
||||
<xi:include href="contributing/coding-conventions.xml" />
|
||||
<xi:include href="contributing/submitting-changes.xml" />
|
||||
<xi:include href="contributing/reviewing-contributions.xml" />
|
||||
<xi:include href="contributing/contributing-to-documentation.xml" />
|
||||
</part>
|
||||
</book>
|
||||
|
@ -1,44 +0,0 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-citrix">
|
||||
<title>Citrix Workspace</title>
|
||||
|
||||
<para>
|
||||
<note>
|
||||
<para>
|
||||
Please note that the <literal>citrix_receiver</literal> package has been deprecated since its development was <link xlink:href="https://docs.citrix.com/en-us/citrix-workspace-app.html">discontinued by upstream</link> and has been replaced by <link xlink:href="https://www.citrix.com/products/workspace-app/">the citrix workspace app</link>.
|
||||
</para>
|
||||
</note>
|
||||
<link xlink:href="https://www.citrix.com/products/receiver/">Citrix Receiver</link> and <link xlink:href="https://www.citrix.com/products/workspace-app/">Citrix Workspace App</link> are a remote desktop viewers which provide access to <link xlink:href="https://www.citrix.com/products/xenapp-xendesktop/">XenDesktop</link> installations.
|
||||
</para>
|
||||
|
||||
<section xml:id="sec-citrix-base">
|
||||
<title>Basic usage</title>
|
||||
|
||||
<para>
|
||||
The tarball archive needs to be downloaded manually as the license agreements of the vendor for <link xlink:href="https://www.citrix.com/downloads/citrix-receiver/">Citrix Receiver</link> or <link xlink:href="https://www.citrix.de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html">Citrix Workspace</link> need to be accepted first. Then run <command>nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz</command>. With the archive available in the store the package can be built and installed with Nix.
|
||||
</para>
|
||||
|
||||
<warning>
|
||||
<title>Caution with <command>nix-shell</command> installs</title>
|
||||
<para>
|
||||
It's recommended to install <literal>Citrix Receiver</literal> and/or <literal>Citrix Workspace</literal> using <literal>nix-env -i</literal> or globally to ensure that the <literal>.desktop</literal> files are installed properly into <literal>$XDG_CONFIG_DIRS</literal>. Otherwise it won't be possible to open <literal>.ica</literal> files automatically from the browser to start a Citrix connection.
|
||||
</para>
|
||||
</warning>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-citrix-custom-certs">
|
||||
<title>Custom certificates</title>
|
||||
|
||||
<para>
|
||||
The <literal>Citrix Workspace App</literal> in <literal>nixpkgs</literal> trust several certificates <link xlink:href="https://curl.haxx.se/docs/caextract.html">from the Mozilla database</link> by default. However several companies using Citrix might require their own corporate certificate. On distros with imperative packaging these certs can be stored easily in <link xlink:href="https://developer-docs.citrix.com/projects/receiver-for-linux-command-reference/en/13.7/"><literal>$ICAROOT</literal></link>, however this directory is a store path in <literal>nixpkgs</literal>. In order to work around this issue the package provides a simple mechanism to add custom certificates without rebuilding the entire package using <literal>symlinkJoin</literal>:
|
||||
<programlisting>
|
||||
<![CDATA[with import <nixpkgs> { config.allowUnfree = true; };
|
||||
let extraCerts = [ ./custom-cert-1.pem ./custom-cert-2.pem /* ... */ ]; in
|
||||
citrix_workspace.override {
|
||||
inherit extraCerts;
|
||||
}]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
@ -1,24 +0,0 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="dlib">
|
||||
<title>DLib</title>
|
||||
|
||||
<para>
|
||||
<link xlink:href="http://dlib.net/">DLib</link> is a modern, C++-based toolkit which provides several machine learning algorithms.
|
||||
</para>
|
||||
|
||||
<section xml:id="compiling-without-avx-support">
|
||||
<title>Compiling without AVX support</title>
|
||||
|
||||
<para>
|
||||
Especially older CPUs don't support <link xlink:href="https://en.wikipedia.org/wiki/Advanced_Vector_Extensions">AVX</link> (<abbrev>Advanced Vector Extensions</abbrev>) instructions that are used by DLib to optimize their algorithms.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
On the affected hardware errors like <literal>Illegal instruction</literal> will occur. In those cases AVX support needs to be disabled:
|
||||
<programlisting>self: super: {
|
||||
dlib = super.dlib.override { avxSupport = false; };
|
||||
}</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
@ -1,72 +0,0 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-eclipse">
|
||||
<title>Eclipse</title>
|
||||
|
||||
<para>
|
||||
The Nix expressions related to the Eclipse platform and IDE are in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/eclipse"><filename>pkgs/applications/editors/eclipse</filename></link>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Nixpkgs provides a number of packages that will install Eclipse in its various forms. These range from the bare-bones Eclipse Platform to the more fully featured Eclipse SDK or Scala-IDE packages and multiple version are often available. It is possible to list available Eclipse packages by issuing the command:
|
||||
<screen>
|
||||
<prompt>$ </prompt>nix-env -f '<nixpkgs>' -qaP -A eclipses --description
|
||||
</screen>
|
||||
Once an Eclipse variant is installed it can be run using the <command>eclipse</command> command, as expected. From within Eclipse it is then possible to install plugins in the usual manner by either manually specifying an Eclipse update site or by installing the Marketplace Client plugin and using it to discover and install other plugins. This installation method provides an Eclipse installation that closely resemble a manually installed Eclipse.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you prefer to install plugins in a more declarative manner then Nixpkgs also offer a number of Eclipse plugins that can be installed in an <emphasis>Eclipse environment</emphasis>. This type of environment is created using the function <varname>eclipseWithPlugins</varname> found inside the <varname>nixpkgs.eclipses</varname> attribute set. This function takes as argument <literal>{ eclipse, plugins ? [], jvmArgs ? [] }</literal> where <varname>eclipse</varname> is a one of the Eclipse packages described above, <varname>plugins</varname> is a list of plugin derivations, and <varname>jvmArgs</varname> is a list of arguments given to the JVM running the Eclipse. For example, say you wish to install the latest Eclipse Platform with the popular Eclipse Color Theme plugin and also allow Eclipse to use more RAM. You could then add
|
||||
<screen>
|
||||
packageOverrides = pkgs: {
|
||||
myEclipse = with pkgs.eclipses; eclipseWithPlugins {
|
||||
eclipse = eclipse-platform;
|
||||
jvmArgs = [ "-Xmx2048m" ];
|
||||
plugins = [ plugins.color-theme ];
|
||||
};
|
||||
}
|
||||
</screen>
|
||||
to your Nixpkgs configuration (<filename>~/.config/nixpkgs/config.nix</filename>) and install it by running <command>nix-env -f '<nixpkgs>' -iA myEclipse</command> and afterward run Eclipse as usual. It is possible to find out which plugins are available for installation using <varname>eclipseWithPlugins</varname> by running
|
||||
<screen>
|
||||
<prompt>$ </prompt>nix-env -f '<nixpkgs>' -qaP -A eclipses.plugins --description
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If there is a need to install plugins that are not available in Nixpkgs then it may be possible to define these plugins outside Nixpkgs using the <varname>buildEclipseUpdateSite</varname> and <varname>buildEclipsePlugin</varname> functions found in the <varname>nixpkgs.eclipses.plugins</varname> attribute set. Use the <varname>buildEclipseUpdateSite</varname> function to install a plugin distributed as an Eclipse update site. This function takes <literal>{ name, src }</literal> as argument where <literal>src</literal> indicates the Eclipse update site archive. All Eclipse features and plugins within the downloaded update site will be installed. When an update site archive is not available then the <varname>buildEclipsePlugin</varname> function can be used to install a plugin that consists of a pair of feature and plugin JARs. This function takes an argument <literal>{ name, srcFeature, srcPlugin }</literal> where <literal>srcFeature</literal> and <literal>srcPlugin</literal> are the feature and plugin JARs, respectively.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Expanding the previous example with two plugins using the above functions we have
|
||||
<screen>
|
||||
packageOverrides = pkgs: {
|
||||
myEclipse = with pkgs.eclipses; eclipseWithPlugins {
|
||||
eclipse = eclipse-platform;
|
||||
jvmArgs = [ "-Xmx2048m" ];
|
||||
plugins = [
|
||||
plugins.color-theme
|
||||
(plugins.buildEclipsePlugin {
|
||||
name = "myplugin1-1.0";
|
||||
srcFeature = fetchurl {
|
||||
url = "http://…/features/myplugin1.jar";
|
||||
sha256 = "123…";
|
||||
};
|
||||
srcPlugin = fetchurl {
|
||||
url = "http://…/plugins/myplugin1.jar";
|
||||
sha256 = "123…";
|
||||
};
|
||||
});
|
||||
(plugins.buildEclipseUpdateSite {
|
||||
name = "myplugin2-1.0";
|
||||
src = fetchurl {
|
||||
stripRoot = false;
|
||||
url = "http://…/myplugin2.zip";
|
||||
sha256 = "123…";
|
||||
};
|
||||
});
|
||||
];
|
||||
};
|
||||
}
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
@ -1,17 +0,0 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-elm">
|
||||
<title>Elm</title>
|
||||
|
||||
<para>
|
||||
To start a development environment do <command>nix-shell -p elmPackages.elm elmPackages.elm-format</command>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To update Elm compiler, see <filename>nixpkgs/pkgs/development/compilers/elm/README.md</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To package Elm applications, <link xlink:href="https://github.com/hercules-ci/elm2nix#elm2nix">read about elm2nix</link>.
|
||||
</para>
|
||||
</section>
|
@ -1,57 +0,0 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-ibus-typing-booster">
|
||||
<title>ibus-engines.typing-booster</title>
|
||||
|
||||
<para>
|
||||
This package is an ibus-based completion method to speed up typing.
|
||||
</para>
|
||||
|
||||
<section xml:id="sec-ibus-typing-booster-activate">
|
||||
<title>Activating the engine</title>
|
||||
|
||||
<para>
|
||||
IBus needs to be configured accordingly to activate <literal>typing-booster</literal>. The configuration depends on the desktop manager in use. For detailed instructions, please refer to the <link xlink:href="https://mike-fabian.github.io/ibus-typing-booster/documentation.html">upstream docs</link>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
On NixOS you need to explicitly enable <literal>ibus</literal> with given engines before customizing your desktop to use <literal>typing-booster</literal>. This can be achieved using the <literal>ibus</literal> module:
|
||||
<programlisting>{ pkgs, ... }: {
|
||||
i18n.inputMethod = {
|
||||
enabled = "ibus";
|
||||
ibus.engines = with pkgs.ibus-engines; [ typing-booster ];
|
||||
};
|
||||
}</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-ibus-typing-booster-customize-hunspell">
|
||||
<title>Using custom hunspell dictionaries</title>
|
||||
|
||||
<para>
|
||||
The IBus engine is based on <literal>hunspell</literal> to support completion in many languages. By default the dictionaries <literal>de-de</literal>, <literal>en-us</literal>, <literal>fr-moderne</literal> <literal>es-es</literal>, <literal>it-it</literal>, <literal>sv-se</literal> and <literal>sv-fi</literal> are in use. To add another dictionary, the package can be overridden like this:
|
||||
<programlisting>ibus-engines.typing-booster.override {
|
||||
langs = [ "de-at" "en-gb" ];
|
||||
}</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<emphasis>Note: each language passed to <literal>langs</literal> must be an attribute name in <literal>pkgs.hunspellDicts</literal>.</emphasis>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-ibus-typing-booster-emoji-picker">
|
||||
<title>Built-in emoji picker</title>
|
||||
|
||||
<para>
|
||||
The <literal>ibus-engines.typing-booster</literal> package contains a program named <literal>emoji-picker</literal>. To display all emojis correctly, a special font such as <literal>noto-fonts-emoji</literal> is needed:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
On NixOS it can be installed using the following expression:
|
||||
<programlisting>{ pkgs, ... }: {
|
||||
fonts.fonts = with pkgs; [ noto-fonts-emoji ];
|
||||
}</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
@ -1,85 +0,0 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-linux-kernel">
|
||||
<title>Linux kernel</title>
|
||||
|
||||
<para>
|
||||
The Nix expressions to build the Linux kernel are in <link
|
||||
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel"><filename>pkgs/os-specific/linux/kernel</filename></link>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The function that builds the kernel has an argument <varname>kernelPatches</varname> which should be a list of <literal>{name, patch, extraConfig}</literal> attribute sets, where <varname>name</varname> is the name of the patch (which is included in the kernel’s <varname>meta.description</varname> attribute), <varname>patch</varname> is the patch itself (possibly compressed), and <varname>extraConfig</varname> (optional) is a string specifying extra options to be concatenated to the kernel configuration file (<filename>.config</filename>).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The kernel derivation exports an attribute <varname>features</varname> specifying whether optional functionality is or isn’t enabled. This is used in NixOS to implement kernel-specific behaviour. For instance, if the kernel has the <varname>iwlwifi</varname> feature (i.e. has built-in support for Intel wireless chipsets), then NixOS doesn’t have to build the external <varname>iwlwifi</varname> package:
|
||||
<programlisting>
|
||||
modulesTree = [kernel]
|
||||
++ pkgs.lib.optional (!kernel.features ? iwlwifi) kernelPackages.iwlwifi
|
||||
++ ...;
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
How to add a new (major) version of the Linux kernel to Nixpkgs:
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Copy the old Nix expression (e.g. <filename>linux-2.6.21.nix</filename>) to the new one (e.g. <filename>linux-2.6.22.nix</filename>) and update it.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Add the new kernel to <filename>all-packages.nix</filename> (e.g., create an attribute <varname>kernel_2_6_22</varname>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Now we’re going to update the kernel configuration. First unpack the kernel. Then for each supported platform (<literal>i686</literal>, <literal>x86_64</literal>, <literal>uml</literal>) do the following:
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Make an copy from the old config (e.g. <filename>config-2.6.21-i686-smp</filename>) to the new one (e.g. <filename>config-2.6.22-i686-smp</filename>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Copy the config file for this platform (e.g. <filename>config-2.6.22-i686-smp</filename>) to <filename>.config</filename> in the kernel source tree.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Run <literal>make oldconfig ARCH=<replaceable>{i386,x86_64,um}</replaceable></literal> and answer all questions. (For the uml configuration, also add <literal>SHELL=bash</literal>.) Make sure to keep the configuration consistent between platforms (i.e. don’t enable some feature on <literal>i686</literal> and disable it on <literal>x86_64</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
If needed you can also run <literal>make menuconfig</literal>:
|
||||
<screen>
|
||||
<prompt>$ </prompt>nix-env -i ncurses
|
||||
<prompt>$ </prompt>export NIX_CFLAGS_LINK=-lncurses
|
||||
<prompt>$ </prompt>make menuconfig ARCH=<replaceable>arch</replaceable></screen>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Copy <filename>.config</filename> over the new config file (e.g. <filename>config-2.6.22-i686-smp</filename>).
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Test building the kernel: <literal>nix-build -A kernel_2_6_22</literal>. If it compiles, ship it! For extra credit, try booting NixOS with it.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
It may be that the new kernel requires updating the external kernel modules and kernel-dependent packages listed in the <varname>linuxPackagesFor</varname> function in <filename>all-packages.nix</filename> (such as the NVIDIA drivers, AUFS, etc.). If the updated packages aren’t backwards compatible with older kernels, you may need to keep the older versions around.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
@ -1,25 +0,0 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-nginx">
|
||||
<title>Nginx</title>
|
||||
|
||||
<para>
|
||||
<link xlink:href="https://nginx.org/">Nginx</link> is a reverse proxy and lightweight webserver.
|
||||
</para>
|
||||
|
||||
<section xml:id="sec-nginx-etag">
|
||||
<title>ETags on static files served from the Nix store</title>
|
||||
|
||||
<para>
|
||||
HTTP has a couple different mechanisms for caching to prevent clients from having to download the same content repeatedly if a resource has not changed since the last time it was requested. When nginx is used as a server for static files, it implements the caching mechanism based on the <link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified"><literal>Last-Modified</literal></link> response header automatically; unfortunately, it works by using filesystem timestamps to determine the value of the <literal>Last-Modified</literal> header. This doesn't give the desired behavior when the file is in the Nix store, because all file timestamps are set to 0 (for reasons related to build reproducibility).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Fortunately, HTTP supports an alternative (and more effective) caching mechanism: the <link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag"><literal>ETag</literal></link> response header. The value of the <literal>ETag</literal> header specifies some identifier for the particular content that the server is sending (e.g. a hash). When a client makes a second request for the same resource, it sends that value back in an <literal>If-None-Match</literal> header. If the ETag value is unchanged, then the server does not need to resend the content.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As of NixOS 19.09, the nginx package in Nixpkgs is patched such that when nginx serves a file out of <filename>/nix/store</filename>, the hash in the store path is used as the <literal>ETag</literal> header in the HTTP response, thus providing proper caching functionality. This happens automatically; you do not need to do modify any configuration to get this behavior.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
@ -1,9 +0,0 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-opengl">
|
||||
<title>OpenGL</title>
|
||||
|
||||
<para>
|
||||
Packages that use OpenGL have NixOS desktop as their primary target. The current solution for loading the GPU-specific drivers is based on <literal>libglvnd</literal> and looks for the driver implementation in <literal>LD_LIBRARY_PATH</literal>. If you are using a non-NixOS GNU/Linux/X11 desktop with free software video drivers, consider launching OpenGL-dependent programs from Nixpkgs with Nixpkgs versions of <literal>libglvnd</literal> and <literal>mesa_drivers</literal> in <literal>LD_LIBRARY_PATH</literal>. For proprietary video drivers you might have luck with also adding the corresponding video driver package.
|
||||
</para>
|
||||
</section>
|
@ -1,25 +0,0 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-shell-helpers">
|
||||
<title>Interactive shell helpers</title>
|
||||
|
||||
<para>
|
||||
Some packages provide the shell integration to be more useful. But unlike other systems, nix doesn't have a standard share directory location. This is why a bunch <command>PACKAGE-share</command> scripts are shipped that print the location of the corresponding shared folder. Current list of such packages is as following:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>autojump</literal>: <command>autojump-share</command>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>fzf</literal>: <command>fzf-share</command>
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
E.g. <literal>autojump</literal> can then used in the .bashrc like this:
|
||||
<screen>
|
||||
source "$(autojump-share)/autojump.bash"
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
@ -1,131 +0,0 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-steam">
|
||||
<title>Steam</title>
|
||||
|
||||
<section xml:id="sec-steam-nix">
|
||||
<title>Steam in Nix</title>
|
||||
|
||||
<para>
|
||||
Steam is distributed as a <filename>.deb</filename> file, for now only as an i686 package (the amd64 package only has documentation). When unpacked, it has a script called <filename>steam</filename> that in Ubuntu (their target distro) would go to <filename>/usr/bin </filename>. When run for the first time, this script copies some files to the user's home, which include another script that is the ultimate responsible for launching the steam binary, which is also in $HOME.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Nix problems and constraints:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
We don't have <filename>/bin/bash</filename> and many scripts point there. Similarly for <filename>/usr/bin/python</filename> .
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
We don't have the dynamic loader in <filename>/lib </filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <filename>steam.sh</filename> script in $HOME can not be patched, as it is checked and rewritten by steam.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The steam binary cannot be patched, it's also checked.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The current approach to deploy Steam in NixOS is composing a FHS-compatible chroot environment, as documented <link xlink:href="http://sandervanderburg.blogspot.nl/2013/09/composing-fhs-compatible-chroot.html">here</link>. This allows us to have binaries in the expected paths without disrupting the system, and to avoid patching them to work in a non FHS environment.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-steam-play">
|
||||
<title>How to play</title>
|
||||
|
||||
<para>
|
||||
For 64-bit systems it's important to have
|
||||
<programlisting>hardware.opengl.driSupport32Bit = true;</programlisting>
|
||||
in your <filename>/etc/nixos/configuration.nix</filename>. You'll also need
|
||||
<programlisting>hardware.pulseaudio.support32Bit = true;</programlisting>
|
||||
if you are using PulseAudio - this will enable 32bit ALSA apps integration. To use the Steam controller or other Steam supported controllers such as the DualShock 4 or Nintendo Switch Pro, you need to add
|
||||
<programlisting>hardware.steam-hardware.enable = true;</programlisting>
|
||||
to your configuration.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-steam-troub">
|
||||
<title>Troubleshooting</title>
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
Steam fails to start. What do I do?
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Try to run
|
||||
<programlisting>strace steam</programlisting>
|
||||
to see what is causing steam to fail.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
Using the FOSS Radeon or nouveau (nvidia) drivers
|
||||
</term>
|
||||
<listitem>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
The <literal>newStdcpp</literal> parameter was removed since NixOS 17.09 and should not be needed anymore.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Steam ships statically linked with a version of libcrypto that conflics with the one dynamically loaded by radeonsi_dri.so. If you get the error
|
||||
<programlisting>steam.sh: line 713: 7842 Segmentation fault (core dumped)</programlisting>
|
||||
have a look at <link xlink:href="https://github.com/NixOS/nixpkgs/pull/20269">this pull request</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
Java
|
||||
</term>
|
||||
<listitem>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
There is no java in steam chrootenv by default. If you get a message like
|
||||
<programlisting>/home/foo/.local/share/Steam/SteamApps/common/towns/towns.sh: line 1: java: command not found</programlisting>
|
||||
You need to add
|
||||
<programlisting> steam.override { withJava = true; };</programlisting>
|
||||
to your configuration.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-steam-run">
|
||||
<title>steam-run</title>
|
||||
|
||||
<para>
|
||||
The FHS-compatible chroot used for steam can also be used to run other linux games that expect a FHS environment. To do it, add
|
||||
<programlisting>pkgs.(steam.override {
|
||||
nativeOnly = true;
|
||||
newStdcpp = true;
|
||||
}).run</programlisting>
|
||||
to your configuration, rebuild, and run the game with
|
||||
<programlisting>steam-run ./foo</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
@ -1,85 +0,0 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-weechat">
|
||||
<title>Weechat</title>
|
||||
|
||||
<para>
|
||||
Weechat can be configured to include your choice of plugins, reducing its closure size from the default configuration which includes all available plugins. To make use of this functionality, install an expression that overrides its configuration such as
|
||||
<programlisting>weechat.override {configure = {availablePlugins, ...}: {
|
||||
plugins = with availablePlugins; [ python perl ];
|
||||
}
|
||||
}</programlisting>
|
||||
If the <literal>configure</literal> function returns an attrset without the <literal>plugins</literal> attribute, <literal>availablePlugins</literal> will be used automatically.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The plugins currently available are <literal>python</literal>, <literal>perl</literal>, <literal>ruby</literal>, <literal>guile</literal>, <literal>tcl</literal> and <literal>lua</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The python and perl plugins allows the addition of extra libraries. For instance, the <literal>inotify.py</literal> script in weechat-scripts requires D-Bus or libnotify, and the <literal>fish.py</literal> script requires pycrypto. To use these scripts, use the plugin's <literal>withPackages</literal> attribute:
|
||||
<programlisting>weechat.override { configure = {availablePlugins, ...}: {
|
||||
plugins = with availablePlugins; [
|
||||
(python.withPackages (ps: with ps; [ pycrypto python-dbus ]))
|
||||
];
|
||||
};
|
||||
}
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In order to also keep all default plugins installed, it is possible to use the following method:
|
||||
<programlisting>weechat.override { configure = { availablePlugins, ... }: {
|
||||
plugins = builtins.attrValues (availablePlugins // {
|
||||
python = availablePlugins.python.withPackages (ps: with ps; [ pycrypto python-dbus ]);
|
||||
});
|
||||
}; }
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
WeeChat allows to set defaults on startup using the <literal>--run-command</literal>. The <literal>configure</literal> method can be used to pass commands to the program:
|
||||
<programlisting>weechat.override {
|
||||
configure = { availablePlugins, ... }: {
|
||||
init = ''
|
||||
/set foo bar
|
||||
/server add freenode chat.freenode.org
|
||||
'';
|
||||
};
|
||||
}</programlisting>
|
||||
Further values can be added to the list of commands when running <literal>weechat --run-command "your-commands"</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Additionally it's possible to specify scripts to be loaded when starting <literal>weechat</literal>. These will be loaded before the commands from <literal>init</literal>:
|
||||
<programlisting>weechat.override {
|
||||
configure = { availablePlugins, ... }: {
|
||||
scripts = with pkgs.weechatScripts; [
|
||||
weechat-xmpp weechat-matrix-bridge wee-slack
|
||||
];
|
||||
init = ''
|
||||
/set plugins.var.python.jabber.key "val"
|
||||
'':
|
||||
};
|
||||
}</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In <literal>nixpkgs</literal> there's a subpackage which contains derivations for WeeChat scripts. Such derivations expect a <literal>passthru.scripts</literal> attribute which contains a list of all scripts inside the store path. Furthermore all scripts have to live in <literal>$out/share</literal>. An exemplary derivation looks like this:
|
||||
<programlisting>{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "exemplary-weechat-script";
|
||||
src = fetchurl {
|
||||
url = "https://scripts.tld/your-scripts.tar.gz";
|
||||
sha256 = "...";
|
||||
};
|
||||
passthru.scripts = [ "foo.py" "bar.lua" ];
|
||||
installPhase = ''
|
||||
mkdir $out/share
|
||||
cp foo.py $out/share
|
||||
cp bar.lua $out/share
|
||||
'';
|
||||
}</programlisting>
|
||||
</para>
|
||||
</section>
|
@ -1,34 +0,0 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-xorg">
|
||||
<title>X.org</title>
|
||||
|
||||
<para>
|
||||
The Nix expressions for the X.org packages reside in <filename>pkgs/servers/x11/xorg/default.nix</filename>. This file is automatically generated from lists of tarballs in an X.org release. As such it should not be modified directly; rather, you should modify the lists, the generator script or the file <filename>pkgs/servers/x11/xorg/overrides.nix</filename>, in which you can override or add to the derivations produced by the generator.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The generator is invoked as follows:
|
||||
<screen>
|
||||
<prompt>$ </prompt>cd pkgs/servers/x11/xorg
|
||||
<prompt>$ </prompt>cat tarballs-7.5.list extra.list old.list \
|
||||
| perl ./generate-expr-from-tarballs.pl
|
||||
</screen>
|
||||
For each of the tarballs in the <filename>.list</filename> files, the script downloads it, unpacks it, and searches its <filename>configure.ac</filename> and <filename>*.pc.in</filename> files for dependencies. This information is used to generate <filename>default.nix</filename>. The generator caches downloaded tarballs between runs. Pay close attention to the <literal>NOT FOUND: <replaceable>name</replaceable></literal> messages at the end of the run, since they may indicate missing dependencies. (Some might be optional dependencies, however.)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A file like <filename>tarballs-7.5.list</filename> contains all tarballs in a X.org release. It can be generated like this:
|
||||
<screen>
|
||||
<prompt>$ </prompt>export i="mirror://xorg/X11R7.4/src/everything/"
|
||||
<prompt>$ </prompt>cat $(PRINT_PATH=1 nix-prefetch-url $i | tail -n 1) \
|
||||
| perl -e 'while (<>) { if (/(href|HREF)="([^"]*.bz2)"/) { print "$ENV{'i'}$2\n"; }; }' \
|
||||
| sort > tarballs-7.4.list
|
||||
</screen>
|
||||
<filename>extra.list</filename> contains libraries that aren’t part of X.org proper, but are closely related to it, such as <literal>libxcb</literal>. <filename>old.list</filename> contains some packages that were removed from X.org, but are still needed by some people or by other packages (such as <varname>imake</varname>).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If the expression for a package requires derivation attributes that the generator cannot figure out automatically (say, <varname>patches</varname> or a <varname>postInstall</varname> hook), you should modify <filename>pkgs/servers/x11/xorg/overrides.nix</filename>.
|
||||
</para>
|
||||
</section>
|
@ -1,44 +1,45 @@
|
||||
---
|
||||
title: Introduction
|
||||
title: Preface
|
||||
author: Frederik Rietdijk
|
||||
date: 2015-11-25
|
||||
---
|
||||
|
||||
# Introduction
|
||||
# Preface
|
||||
|
||||
The Nix Packages collection (Nixpkgs) is a set of thousands of packages for the
|
||||
[Nix package manager](http://nixos.org/nix/), released under a
|
||||
[Nix package manager](https://nixos.org/nix/), released under a
|
||||
[permissive MIT/X11 license](https://github.com/NixOS/nixpkgs/blob/master/COPYING).
|
||||
Packages are available for several platforms, and can be used with the Nix
|
||||
package manager on most GNU/Linux distributions as well as NixOS.
|
||||
package manager on most GNU/Linux distributions as well as [NixOS](https://nixos.org/nixos).
|
||||
|
||||
This manual primarily describes how to write packages for the Nix Packages collection
|
||||
(Nixpkgs). Thus it’s mainly for packagers and developers who want to add packages to
|
||||
Nixpkgs. If you like to learn more about the Nix package manager and the Nix
|
||||
expression language, then you are kindly referred to the [Nix manual](http://nixos.org/nix/manual/).
|
||||
expression language, then you are kindly referred to the [Nix manual](https://nixos.org/nix/manual/).
|
||||
The NixOS distribution is documented in the [NixOS manual](https://nixos.org/nixos/manual/).
|
||||
|
||||
## Overview of Nixpkgs
|
||||
|
||||
Nix expressions describe how to build packages from source and are collected in
|
||||
the [nixpkgs repository](https://github.com/NixOS/nixpkgs). Also included in the
|
||||
collection are Nix expressions for
|
||||
[NixOS modules](http://nixos.org/nixos/manual/index.html#sec-writing-modules).
|
||||
[NixOS modules](https://nixos.org/nixos/manual/index.html#sec-writing-modules).
|
||||
With these expressions the Nix package manager can build binary packages.
|
||||
|
||||
Packages, including the Nix packages collection, are distributed through
|
||||
[channels](http://nixos.org/nix/manual/#sec-channels). The collection is
|
||||
[channels](https://nixos.org/nix/manual/#sec-channels). The collection is
|
||||
distributed for users of Nix on non-NixOS distributions through the channel
|
||||
`nixpkgs`. Users of NixOS generally use one of the `nixos-*` channels, e.g.
|
||||
`nixos-16.03`, which includes all packages and modules for the stable NixOS
|
||||
16.03. Stable NixOS releases are generally only given
|
||||
`nixos-19.09`, which includes all packages and modules for the stable NixOS
|
||||
19.09. Stable NixOS releases are generally only given
|
||||
security updates. More up to date packages and modules are available via the
|
||||
`nixos-unstable` channel.
|
||||
|
||||
Both `nixos-unstable` and `nixpkgs` follow the `master` branch of the Nixpkgs
|
||||
repository, although both do lag the `master` branch by generally
|
||||
[a couple of days](http://howoldis.herokuapp.com/). Updates to a channel are
|
||||
[a couple of days](https://howoldis.herokuapp.com/). Updates to a channel are
|
||||
distributed as soon as all tests for that channel pass, e.g.
|
||||
[this table](http://hydra.nixos.org/job/nixpkgs/trunk/unstable#tabs-constituents)
|
||||
[this table](https://hydra.nixos.org/job/nixpkgs/trunk/unstable#tabs-constituents)
|
||||
shows the status of tests for the `nixpkgs` channel.
|
||||
|
||||
The tests are conducted by a cluster called [Hydra](http://nixos.org/hydra/),
|
@ -3,15 +3,12 @@
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xml:id="chap-overrides">
|
||||
<title>Overriding</title>
|
||||
|
||||
<para>
|
||||
Sometimes one wants to override parts of <literal>nixpkgs</literal>, e.g. derivation attributes, the results of derivations.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
These functions are used to make changes to packages, returning only single packages. <link xlink:href="#chap-overlays">Overlays</link>, on the other hand, can be used to combine the overridden packages across the entire package set of Nixpkgs.
|
||||
</para>
|
||||
|
||||
<section xml:id="sec-pkg-override">
|
||||
<title><pkg>.override</title>
|
||||
|
||||
@ -45,7 +42,6 @@ mypkg = pkgs.callPackage ./mypkg.nix {
|
||||
In the first example, <varname>pkgs.foo</varname> is the result of a function call with some default arguments, usually a derivation. Using <varname>pkgs.foo.override</varname> will call the same function with the given new arguments.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-pkg-overrideAttrs">
|
||||
<title><pkg>.overrideAttrs</title>
|
||||
|
||||
@ -76,7 +72,6 @@ helloWithDebug = pkgs.hello.overrideAttrs (oldAttrs: rec {
|
||||
</para>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-pkg-overrideDerivation">
|
||||
<title><pkg>.overrideDerivation</title>
|
||||
|
||||
@ -124,7 +119,6 @@ mySed = pkgs.gnused.overrideDerivation (oldAttrs: {
|
||||
</para>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-lib-makeOverridable">
|
||||
<title>lib.makeOverridable</title>
|
||||
|
@ -7397,4 +7397,16 @@
|
||||
githubId = 1986844;
|
||||
name = "Daniel Wheeler";
|
||||
};
|
||||
zokrezyl = {
|
||||
email = "zokrezyl@gmail.com";
|
||||
github = "zokrezyl";
|
||||
githubId = 51886259;
|
||||
name = "Zokre Zyl";
|
||||
};
|
||||
rakesh4g = {
|
||||
email = "rakeshgupta4u@gmail.com";
|
||||
github = "rakesh4g";
|
||||
githubId = 50867187;
|
||||
name = "Rakesh Gupta";
|
||||
};
|
||||
}
|
||||
|
@ -62,14 +62,13 @@ let
|
||||
"--stringparam html.stylesheet 'style.css overrides.css highlightjs/mono-blue.css'"
|
||||
"--stringparam html.script './highlightjs/highlight.pack.js ./highlightjs/loader.js'"
|
||||
"--param xref.with.number.and.title 1"
|
||||
"--param toc.section.depth 3"
|
||||
"--param toc.section.depth 0"
|
||||
"--stringparam admon.style ''"
|
||||
"--stringparam callout.graphics.extension .svg"
|
||||
"--stringparam current.docid manual"
|
||||
"--param chunk.section.depth 0"
|
||||
"--param chunk.first.sections 1"
|
||||
"--param use.id.as.filename 1"
|
||||
"--stringparam generate.toc 'book toc appendix toc'"
|
||||
"--stringparam chunk.toc ${toc}"
|
||||
];
|
||||
|
||||
|
@ -8,32 +8,7 @@
|
||||
<subtitle>Version <xi:include href="./generated/version" parse="text" />
|
||||
</subtitle>
|
||||
</info>
|
||||
<preface xml:id="preface">
|
||||
<title>Preface</title>
|
||||
<para>
|
||||
This manual describes how to install, use and extend NixOS, a Linux
|
||||
distribution based on the purely functional package management system Nix.
|
||||
</para>
|
||||
<para>
|
||||
If you encounter problems, please report them on the
|
||||
<literal
|
||||
xlink:href="https://discourse.nixos.org">Discourse</literal> or
|
||||
on the <link
|
||||
xlink:href="irc://irc.freenode.net/#nixos">
|
||||
<literal>#nixos</literal> channel on Freenode</link>. Bugs should be
|
||||
reported in
|
||||
<link
|
||||
xlink:href="https://github.com/NixOS/nixpkgs/issues">NixOS’
|
||||
GitHub issue tracker</link>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Commands prefixed with <literal>#</literal> have to be run as root, either
|
||||
requiring to login as root user or temporarily switching to it using
|
||||
<literal>sudo</literal> for example.
|
||||
</para>
|
||||
</note>
|
||||
</preface>
|
||||
<xi:include href="preface.xml" />
|
||||
<xi:include href="installation/installation.xml" />
|
||||
<xi:include href="configuration/configuration.xml" />
|
||||
<xi:include href="administration/running.xml" />
|
||||
|
37
nixos/doc/manual/preface.xml
Normal file
37
nixos/doc/manual/preface.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<preface xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="preface">
|
||||
<title>Preface</title>
|
||||
<para>
|
||||
This manual describes how to install, use and extend NixOS, a Linux
|
||||
distribution based on the purely functional package management system
|
||||
<link xlink:href="https://nixos.org/nix">Nix</link>, that is composed
|
||||
using modules and packages defined in the
|
||||
<link xlink:href="https://nixos.org/nixpkgs">Nixpkgs</link> project.
|
||||
</para>
|
||||
<para>
|
||||
Additional information regarding the Nix package manager and the Nixpkgs
|
||||
project can be found in respectively the
|
||||
<link xlink:href="https://nixos.org/nix/manual">Nix manual</link> and the
|
||||
<link xlink:href="https://nixos.org/nixpkgs/manual">Nixpkgs manual</link>.
|
||||
</para>
|
||||
<para>
|
||||
If you encounter problems, please report them on the
|
||||
<literal
|
||||
xlink:href="https://discourse.nixos.org">Discourse</literal> or
|
||||
on the <link
|
||||
xlink:href="irc://irc.freenode.net/#nixos">
|
||||
<literal>#nixos</literal> channel on Freenode</link>. Bugs should be
|
||||
reported in
|
||||
<link
|
||||
xlink:href="https://github.com/NixOS/nixpkgs/issues">NixOS’
|
||||
GitHub issue tracker</link>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Commands prefixed with <literal>#</literal> have to be run as root, either
|
||||
requiring to login as root user or temporarily switching to it using
|
||||
<literal>sudo</literal> for example.
|
||||
</para>
|
||||
</note>
|
||||
</preface>
|
@ -14,7 +14,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
# configuration
|
||||
state_dir=/home/deploy/amis/ec2-images
|
||||
state_dir=$HOME/amis/ec2-images
|
||||
home_region=eu-west-1
|
||||
bucket=nixos-amis
|
||||
|
||||
|
@ -98,11 +98,12 @@ in {
|
||||
description = ''
|
||||
If false, a PulseAudio server is launched automatically for
|
||||
each user that tries to use the sound system. The server runs
|
||||
with user privileges. This is the recommended and most secure
|
||||
way to use PulseAudio. If true, one system-wide PulseAudio
|
||||
with user privileges. If true, one system-wide PulseAudio
|
||||
server is launched on boot, running as the user "pulse", and
|
||||
only users in the "audio" group will have access to the server.
|
||||
Please read the PulseAudio documentation for more details.
|
||||
|
||||
Don't enable this option unless you know what you are doing.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -550,6 +550,8 @@
|
||||
./services/network-filesystems/nfsd.nix
|
||||
./services/network-filesystems/openafs/client.nix
|
||||
./services/network-filesystems/openafs/server.nix
|
||||
./services/network-filesystems/orangefs/server.nix
|
||||
./services/network-filesystems/orangefs/client.nix
|
||||
./services/network-filesystems/rsyncd.nix
|
||||
./services/network-filesystems/samba.nix
|
||||
./services/network-filesystems/tahoe.nix
|
||||
@ -603,6 +605,7 @@
|
||||
./services/networking/gdomap.nix
|
||||
./services/networking/git-daemon.nix
|
||||
./services/networking/gnunet.nix
|
||||
./services/networking/go-shadowsocks2.nix
|
||||
./services/networking/gogoclient.nix
|
||||
./services/networking/gvpe.nix
|
||||
./services/networking/hans.nix
|
||||
|
@ -14,7 +14,7 @@ let
|
||||
"qt"
|
||||
else if xserverCfg.desktopManager.xfce.enable then
|
||||
"gtk2"
|
||||
else if xserverCfg.enable then
|
||||
else if xserverCfg.enable || config.programs.sway.enable then
|
||||
"gnome3"
|
||||
else
|
||||
null;
|
||||
|
@ -135,7 +135,8 @@ with lib;
|
||||
# piwik was renamed to matomo
|
||||
(mkRenamedOptionModule [ "services" "piwik" "enable" ] [ "services" "matomo" "enable" ])
|
||||
(mkRenamedOptionModule [ "services" "piwik" "webServerUser" ] [ "services" "matomo" "webServerUser" ])
|
||||
(mkRenamedOptionModule [ "services" "piwik" "phpfpmProcessManagerConfig" ] [ "services" "matomo" "phpfpmProcessManagerConfig" ])
|
||||
(mkRemovedOptionModule [ "services" "piwik" "phpfpmProcessManagerConfig" ] "Use services.phpfpm.pools.<name>.settings")
|
||||
(mkRemovedOptionModule [ "services" "matomo" "phpfpmProcessManagerConfig" ] "Use services.phpfpm.pools.<name>.settings")
|
||||
(mkRenamedOptionModule [ "services" "piwik" "nginx" ] [ "services" "matomo" "nginx" ])
|
||||
|
||||
# tarsnap
|
||||
|
@ -20,6 +20,16 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
server = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
ACME Directory Resource URI. Defaults to let's encrypt
|
||||
production endpoint,
|
||||
https://acme-v02.api.letsencrypt.org/directory, if unset.
|
||||
'';
|
||||
};
|
||||
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
default = name;
|
||||
@ -109,7 +119,15 @@ in
|
||||
{
|
||||
|
||||
###### interface
|
||||
imports = [
|
||||
(mkRemovedOptionModule [ "security" "acme" "production" ] ''
|
||||
Use security.acme.server to define your staging ACME server URL instead.
|
||||
|
||||
To use the let's encrypt staging server, use security.acme.server =
|
||||
"https://acme-staging-v02.api.letsencrypt.org/directory".
|
||||
''
|
||||
)
|
||||
];
|
||||
options = {
|
||||
security.acme = {
|
||||
|
||||
@ -129,6 +147,16 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
server = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
ACME Directory Resource URI. Defaults to let's encrypt
|
||||
production endpoint,
|
||||
<literal>https://acme-v02.api.letsencrypt.org/directory</literal>, if unset.
|
||||
'';
|
||||
};
|
||||
|
||||
preliminarySelfsigned = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
@ -142,20 +170,6 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
production = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
If set to true, use Let's Encrypt's production environment
|
||||
instead of the staging environment. The main benefit of the
|
||||
staging environment is to get much higher rate limits.
|
||||
|
||||
See
|
||||
<literal>https://letsencrypt.org/docs/staging-environment</literal>
|
||||
for more detail.
|
||||
'';
|
||||
};
|
||||
|
||||
certs = mkOption {
|
||||
default = { };
|
||||
type = with types; attrsOf (submodule certOpts);
|
||||
@ -198,7 +212,7 @@ in
|
||||
++ optionals (data.email != null) [ "--email" data.email ]
|
||||
++ concatMap (p: [ "-f" p ]) data.plugins
|
||||
++ concatLists (mapAttrsToList (name: root: [ "-d" (if root == null then name else "${name}:${root}")]) data.extraDomains)
|
||||
++ optionals (!cfg.production) ["--server" "https://acme-staging-v02.api.letsencrypt.org/directory"];
|
||||
++ optionals (cfg.server != null || data.server != null) ["--server" (if data.server == null then cfg.server else data.server)];
|
||||
acmeService = {
|
||||
description = "Renew ACME Certificate for ${cert}";
|
||||
after = [ "network.target" "network-online.target" ];
|
||||
|
@ -188,34 +188,41 @@ in
|
||||
|
||||
systemd.packages = [ package ];
|
||||
|
||||
users.users.geoclue = {
|
||||
isSystemUser = true;
|
||||
home = "/var/lib/geoclue";
|
||||
group = "geoclue";
|
||||
description = "Geoinformation service";
|
||||
# we cannot use DynamicUser as we need the the geoclue user to exist for the dbus policy to work
|
||||
users = {
|
||||
users.geoclue = {
|
||||
isSystemUser = true;
|
||||
home = "/var/lib/geoclue";
|
||||
group = "geoclue";
|
||||
description = "Geoinformation service";
|
||||
};
|
||||
|
||||
groups.geoclue = {};
|
||||
};
|
||||
|
||||
users.groups.geoclue = {};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/geoclue 0755 geoclue geoclue"
|
||||
];
|
||||
|
||||
# restart geoclue service when the configuration changes
|
||||
systemd.services.geoclue.restartTriggers = [
|
||||
config.environment.etc."geoclue/geoclue.conf".source
|
||||
];
|
||||
systemd.services.geoclue = {
|
||||
# restart geoclue service when the configuration changes
|
||||
restartTriggers = [
|
||||
config.environment.etc."geoclue/geoclue.conf".source
|
||||
];
|
||||
serviceConfig.StateDirectory = "geoclue";
|
||||
};
|
||||
|
||||
# this needs to run as a user service, since it's associated with the
|
||||
# user who is making the requests
|
||||
systemd.user.services = mkIf cfg.enableDemoAgent {
|
||||
geoclue-agent = {
|
||||
description = "Geoclue agent";
|
||||
script = "${package}/libexec/geoclue-2.0/demos/agent";
|
||||
# this should really be `partOf = [ "geoclue.service" ]`, but
|
||||
# we can't be part of a system service, and the agent should
|
||||
# be okay with the main service coming and going
|
||||
wantedBy = [ "default.target" ];
|
||||
serviceConfig = {
|
||||
Type = "exec";
|
||||
ExecStart = "${package}/libexec/geoclue-2.0/demos/agent";
|
||||
Restart = "on-failure";
|
||||
PrivateTmp = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -256,4 +263,6 @@ in
|
||||
};
|
||||
} // mapAttrs' appConfigToINICompatible cfg.appConfig);
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ worldofpeace ];
|
||||
}
|
||||
|
@ -44,20 +44,7 @@ in {
|
||||
### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.udev.packages = lib.singleton (pkgs.writeTextFile {
|
||||
name = "trezord-udev-rules";
|
||||
destination = "/etc/udev/rules.d/51-trezor.rules";
|
||||
text = ''
|
||||
# TREZOR v1 (One)
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="534c", ATTR{idProduct}=="0001", MODE="0660", GROUP="trezord", TAG+="uaccess", SYMLINK+="trezor%n"
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="534c", ATTRS{idProduct}=="0001", MODE="0660", GROUP="trezord", TAG+="uaccess"
|
||||
|
||||
# TREZOR v2 (T)
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="53c0", MODE="0660", GROUP="trezord", TAG+="uaccess", SYMLINK+="trezor%n"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="53c1", MODE="0660", GROUP="trezord", TAG+="uaccess", SYMLINK+="trezor%n"
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="53c1", MODE="0660", GROUP="trezord", TAG+="uaccess"
|
||||
'';
|
||||
});
|
||||
services.udev.packages = [ pkgs.trezor-udev-rules ];
|
||||
|
||||
systemd.services.trezord = {
|
||||
description = "TREZOR Bridge";
|
||||
|
@ -0,0 +1,97 @@
|
||||
{ config, lib, pkgs, ...} :
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.orangefs.client;
|
||||
|
||||
in {
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
services.orangefs.client = {
|
||||
enable = mkEnableOption "OrangeFS client daemon";
|
||||
|
||||
extraOptions = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
description = "Extra command line options for pvfs2-client.";
|
||||
};
|
||||
|
||||
fileSystems = mkOption {
|
||||
description = ''
|
||||
The orangefs file systems to be mounted.
|
||||
This option is prefered over using <option>fileSystems</option> directly since
|
||||
the pvfs client service needs to be running for it to be mounted.
|
||||
'';
|
||||
|
||||
example = [{
|
||||
mountPoint = "/orangefs";
|
||||
target = "tcp://server:3334/orangefs";
|
||||
}];
|
||||
|
||||
type = with types; listOf (submodule ({ ... } : {
|
||||
options = {
|
||||
|
||||
mountPoint = mkOption {
|
||||
type = types.str;
|
||||
default = "/orangefs";
|
||||
description = "Mount point.";
|
||||
};
|
||||
|
||||
options = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
description = "Mount options";
|
||||
};
|
||||
|
||||
target = mkOption {
|
||||
type = types.str;
|
||||
default = null;
|
||||
example = "tcp://server:3334/orangefs";
|
||||
description = "Target URL";
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.orangefs ];
|
||||
|
||||
boot.supportedFilesystems = [ "pvfs2" ];
|
||||
boot.kernelModules = [ "orangefs" ];
|
||||
|
||||
systemd.services.orangefs-client = {
|
||||
requires = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
|
||||
ExecStart = ''
|
||||
${pkgs.orangefs}/bin/pvfs2-client-core \
|
||||
--logtype=syslog ${concatStringsSep " " cfg.extraOptions}
|
||||
'';
|
||||
|
||||
TimeoutStopSec = "120";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.mounts = map (fs: {
|
||||
requires = [ "orangefs-client.service" ];
|
||||
after = [ "orangefs-client.service" ];
|
||||
bindsTo = [ "orangefs-client.service" ];
|
||||
wantedBy = [ "remote-fs.target" ];
|
||||
type = "pvfs2";
|
||||
options = concatStringsSep "," fs.options;
|
||||
what = fs.target;
|
||||
where = fs.mountPoint;
|
||||
}) cfg.fileSystems;
|
||||
};
|
||||
}
|
||||
|
225
nixos/modules/services/network-filesystems/orangefs/server.nix
Normal file
225
nixos/modules/services/network-filesystems/orangefs/server.nix
Normal file
@ -0,0 +1,225 @@
|
||||
{ config, lib, pkgs, ...} :
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.orangefs.server;
|
||||
|
||||
aliases = mapAttrsToList (alias: url: alias) cfg.servers;
|
||||
|
||||
# Maximum handle number is 2^63
|
||||
maxHandle = 9223372036854775806;
|
||||
|
||||
# One range of handles for each meta/data instance
|
||||
handleStep = maxHandle / (length aliases) / 2;
|
||||
|
||||
fileSystems = mapAttrsToList (name: fs: ''
|
||||
<FileSystem>
|
||||
Name ${name}
|
||||
ID ${toString fs.id}
|
||||
RootHandle ${toString fs.rootHandle}
|
||||
|
||||
${fs.extraConfig}
|
||||
|
||||
<MetaHandleRanges>
|
||||
${concatStringsSep "\n" (
|
||||
imap0 (i: alias:
|
||||
let
|
||||
begin = i * handleStep + 3;
|
||||
end = begin + handleStep - 1;
|
||||
in "Range ${alias} ${toString begin}-${toString end}") aliases
|
||||
)}
|
||||
</MetaHandleRanges>
|
||||
|
||||
<DataHandleRanges>
|
||||
${concatStringsSep "\n" (
|
||||
imap0 (i: alias:
|
||||
let
|
||||
begin = i * handleStep + 3 + (length aliases) * handleStep;
|
||||
end = begin + handleStep - 1;
|
||||
in "Range ${alias} ${toString begin}-${toString end}") aliases
|
||||
)}
|
||||
</DataHandleRanges>
|
||||
|
||||
<StorageHints>
|
||||
TroveSyncMeta ${if fs.troveSyncMeta then "yes" else "no"}
|
||||
TroveSyncData ${if fs.troveSyncData then "yes" else "no"}
|
||||
${fs.extraStorageHints}
|
||||
</StorageHints>
|
||||
|
||||
</FileSystem>
|
||||
'') cfg.fileSystems;
|
||||
|
||||
configFile = ''
|
||||
<Defaults>
|
||||
LogType ${cfg.logType}
|
||||
DataStorageSpace ${cfg.dataStorageSpace}
|
||||
MetaDataStorageSpace ${cfg.metadataStorageSpace}
|
||||
|
||||
BMIModules ${concatStringsSep "," cfg.BMIModules}
|
||||
${cfg.extraDefaults}
|
||||
</Defaults>
|
||||
|
||||
${cfg.extraConfig}
|
||||
|
||||
<Aliases>
|
||||
${concatStringsSep "\n" (mapAttrsToList (alias: url: "Alias ${alias} ${url}") cfg.servers)}
|
||||
</Aliases>
|
||||
|
||||
${concatStringsSep "\n" fileSystems}
|
||||
'';
|
||||
|
||||
in {
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
services.orangefs.server = {
|
||||
enable = mkEnableOption "OrangeFS server";
|
||||
|
||||
logType = mkOption {
|
||||
type = with types; enum [ "file" "syslog" ];
|
||||
default = "syslog";
|
||||
description = "Destination for log messages.";
|
||||
};
|
||||
|
||||
dataStorageSpace = mkOption {
|
||||
type = types.str;
|
||||
default = null;
|
||||
example = "/data/storage";
|
||||
description = "Directory for data storage.";
|
||||
};
|
||||
|
||||
metadataStorageSpace = mkOption {
|
||||
type = types.str;
|
||||
default = null;
|
||||
example = "/data/meta";
|
||||
description = "Directory for meta data storage.";
|
||||
};
|
||||
|
||||
BMIModules = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ "bmi_tcp" ];
|
||||
example = [ "bmi_tcp" "bmi_ib"];
|
||||
description = "List of BMI modules to load.";
|
||||
};
|
||||
|
||||
extraDefaults = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Extra config for <literal><Defaults></literal> section.";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Extra config for the global section.";
|
||||
};
|
||||
|
||||
servers = mkOption {
|
||||
type = with types; attrsOf types.str;
|
||||
default = {};
|
||||
example = ''
|
||||
{
|
||||
node1="tcp://node1:3334";
|
||||
node2="tcp://node2:3334";
|
||||
}
|
||||
'';
|
||||
description = "URLs for storage server including port. The attribute names define the server alias.";
|
||||
};
|
||||
|
||||
fileSystems = mkOption {
|
||||
description = ''
|
||||
These options will create the <literal><FileSystem></literal> sections of config file.
|
||||
'';
|
||||
default = { orangefs = {}; };
|
||||
defaultText = literalExample "{ orangefs = {}; }";
|
||||
example = literalExample ''
|
||||
{
|
||||
fs1 = {
|
||||
id = 101;
|
||||
};
|
||||
|
||||
fs2 = {
|
||||
id = 102;
|
||||
};
|
||||
}
|
||||
'';
|
||||
type = with types; attrsOf (submodule ({ ... } : {
|
||||
options = {
|
||||
id = mkOption {
|
||||
type = types.int;
|
||||
default = 1;
|
||||
description = "File system ID (must be unique within configuration).";
|
||||
};
|
||||
|
||||
rootHandle = mkOption {
|
||||
type = types.int;
|
||||
default = 3;
|
||||
description = "File system root ID.";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Extra config for <literal><FileSystem></literal> section.";
|
||||
};
|
||||
|
||||
troveSyncMeta = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Sync meta data.";
|
||||
};
|
||||
|
||||
troveSyncData = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Sync data.";
|
||||
};
|
||||
|
||||
extraStorageHints = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Extra config for <literal><StorageHints></literal> section.";
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.orangefs ];
|
||||
|
||||
# orangefs daemon will run as user
|
||||
users.users.orangefs.isSystemUser = true;
|
||||
users.groups.orangefs = {};
|
||||
|
||||
# To format the file system the config file is needed.
|
||||
environment.etc."orangefs/server.conf" = {
|
||||
text = configFile;
|
||||
user = "orangefs";
|
||||
group = "orangefs";
|
||||
};
|
||||
|
||||
systemd.services.orangefs-server = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
requires = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
# Run as "simple" in forground mode.
|
||||
# This is more reliable
|
||||
ExecStart = ''
|
||||
${pkgs.orangefs}/bin/pvfs2-server -d \
|
||||
/etc/orangefs/server.conf
|
||||
'';
|
||||
TimeoutStopSec = "120";
|
||||
User = "orangefs";
|
||||
Group = "orangefs";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
30
nixos/modules/services/networking/go-shadowsocks2.nix
Normal file
30
nixos/modules/services/networking/go-shadowsocks2.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.go-shadowsocks2.server;
|
||||
in {
|
||||
options.services.go-shadowsocks2.server = {
|
||||
enable = mkEnableOption "go-shadowsocks2 server";
|
||||
|
||||
listenAddress = mkOption {
|
||||
type = types.str;
|
||||
description = "Server listen address or URL";
|
||||
example = "ss://AEAD_CHACHA20_POLY1305:your-password@:8488";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.go-shadowsocks2-server = {
|
||||
description = "go-shadowsocks2 server";
|
||||
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.go-shadowsocks2}/bin/go-shadowsocks2 -s '${cfg.listenAddress}'";
|
||||
DynamicUser = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -105,7 +105,7 @@ GRANT ALL PRIVILEGES ON matomo.* TO 'matomo'@'localhost';
|
||||
<para>
|
||||
You can use other web servers by forwarding calls for
|
||||
<filename>index.php</filename> and <filename>piwik.php</filename> to the
|
||||
<literal>/run/phpfpm-matomo.sock</literal> fastcgi unix socket. You can use
|
||||
<literal><link linkend="opt-services.phpfpm.pools._name_.socket">services.phpfpm.pools.<name>.socket</link></literal> fastcgi unix socket. You can use
|
||||
the nginx configuration in the module code as a reference to what else
|
||||
should be configured.
|
||||
</para>
|
||||
|
@ -2,15 +2,13 @@
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.matomo;
|
||||
fpm = config.services.phpfpm.pools.${pool};
|
||||
|
||||
user = "matomo";
|
||||
dataDir = "/var/lib/${user}";
|
||||
deprecatedDataDir = "/var/lib/piwik";
|
||||
|
||||
pool = user;
|
||||
# it's not possible to use /run/phpfpm/${pool}.sock because /run/phpfpm/ is root:root 0770,
|
||||
# and therefore is not accessible by the web server.
|
||||
phpSocket = "/run/phpfpm-${pool}.sock";
|
||||
phpExecutionUnit = "phpfpm-${pool}";
|
||||
databaseService = "mysql.service";
|
||||
|
||||
@ -50,7 +48,7 @@ in {
|
||||
default = null;
|
||||
example = "lighttpd";
|
||||
description = ''
|
||||
Name of the web server user that forwards requests to the ${phpSocket} fastcgi socket for Matomo if the nginx
|
||||
Name of the web server user that forwards requests to <option>services.phpfpm.pools.<name>.socket</option> the fastcgi socket for Matomo if the nginx
|
||||
option is not used. Either this option or the nginx option is mandatory.
|
||||
If you want to use another webserver than nginx, you need to set this to that server's user
|
||||
and pass fastcgi requests to `index.php`, `matomo.php` and `piwik.php` (legacy name) to this socket.
|
||||
@ -71,25 +69,6 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
phpfpmProcessManagerConfig = mkOption {
|
||||
type = types.str;
|
||||
default = ''
|
||||
; default phpfpm process manager settings
|
||||
pm = dynamic
|
||||
pm.max_children = 75
|
||||
pm.start_servers = 10
|
||||
pm.min_spare_servers = 5
|
||||
pm.max_spare_servers = 20
|
||||
pm.max_requests = 500
|
||||
|
||||
; log worker's stdout, but this has a performance hit
|
||||
catch_workers_output = yes
|
||||
'';
|
||||
description = ''
|
||||
Settings for phpfpm's process manager. You might need to change this depending on the load for Matomo.
|
||||
'';
|
||||
};
|
||||
|
||||
nginx = mkOption {
|
||||
type = types.nullOr (types.submodule (
|
||||
recursiveUpdate
|
||||
@ -233,15 +212,24 @@ in {
|
||||
else if (cfg.webServerUser != null) then cfg.webServerUser else "";
|
||||
in {
|
||||
${pool} = {
|
||||
listen = phpSocket;
|
||||
extraConfig = ''
|
||||
listen.owner = ${socketOwner}
|
||||
listen.group = root
|
||||
listen.mode = 0600
|
||||
user = ${user}
|
||||
env[PIWIK_USER_PATH] = ${dataDir}
|
||||
${cfg.phpfpmProcessManagerConfig}
|
||||
inherit user;
|
||||
phpOptions = ''
|
||||
error_log = 'stderr'
|
||||
log_errors = on
|
||||
'';
|
||||
settings = mapAttrs (name: mkDefault) {
|
||||
"listen.owner" = socketOwner;
|
||||
"listen.group" = "root";
|
||||
"listen.mode" = "0660";
|
||||
"pm" = "dynamic";
|
||||
"pm.max_children" = 75;
|
||||
"pm.start_servers" = 10;
|
||||
"pm.min_spare_servers" = 5;
|
||||
"pm.max_spare_servers" = 20;
|
||||
"pm.max_requests" = 500;
|
||||
"catch_workers_output" = true;
|
||||
};
|
||||
phpEnv.PIWIK_USER_PATH = dataDir;
|
||||
};
|
||||
};
|
||||
|
||||
@ -264,15 +252,15 @@ in {
|
||||
};
|
||||
# allow index.php for webinterface
|
||||
locations."= /index.php".extraConfig = ''
|
||||
fastcgi_pass unix:${phpSocket};
|
||||
fastcgi_pass unix:${fpm.socket};
|
||||
'';
|
||||
# allow matomo.php for tracking
|
||||
locations."= /matomo.php".extraConfig = ''
|
||||
fastcgi_pass unix:${phpSocket};
|
||||
fastcgi_pass unix:${fpm.socket};
|
||||
'';
|
||||
# allow piwik.php for tracking (deprecated name)
|
||||
locations."= /piwik.php".extraConfig = ''
|
||||
fastcgi_pass unix:${phpSocket};
|
||||
fastcgi_pass unix:${fpm.socket};
|
||||
'';
|
||||
# Any other attempt to access any php files is forbidden
|
||||
locations."~* ^.+\\.php$".extraConfig = ''
|
||||
|
@ -291,5 +291,21 @@ let self = {
|
||||
"19.03".sa-east-1.hvm-ebs = "ami-0c6a43c6e0ad1f4e2";
|
||||
"19.03".ap-south-1.hvm-ebs = "ami-0303deb1b5890f878";
|
||||
|
||||
latest = self."19.03";
|
||||
# 19.09.981.205691b7cbe
|
||||
"19.09".eu-west-1.hvm-ebs = "ami-0ebd3156e21e9642f";
|
||||
"19.09".eu-west-2.hvm-ebs = "ami-02a2b5480a79084b7";
|
||||
"19.09".eu-west-3.hvm-ebs = "ami-09aa175c7588734f7";
|
||||
"19.09".eu-central-1.hvm-ebs = "ami-00a7fafd7e237a330";
|
||||
"19.09".us-east-1.hvm-ebs = "ami-00a8eeaf232a74f84";
|
||||
"19.09".us-east-2.hvm-ebs = "ami-093efd3a57a1e03a8";
|
||||
"19.09".us-west-1.hvm-ebs = "ami-0913e9a2b677fac30";
|
||||
"19.09".us-west-2.hvm-ebs = "ami-02d9a19f77b47882a";
|
||||
"19.09".ca-central-1.hvm-ebs = "ami-0627dd3f7b3627a29";
|
||||
"19.09".ap-southeast-1.hvm-ebs = "ami-083614e4d08f2164d";
|
||||
"19.09".ap-southeast-2.hvm-ebs = "ami-0048c704185ded6dc";
|
||||
"19.09".ap-northeast-1.hvm-ebs = "ami-0329e7fc2d7f60bd0";
|
||||
"19.09".ap-northeast-2.hvm-ebs = "ami-03d4ae7d0b5fc364f";
|
||||
"19.09".ap-south-1.hvm-ebs = "ami-0b599690b35aeef23";
|
||||
|
||||
latest = self."19.09";
|
||||
}; in self
|
||||
|
@ -12,8 +12,11 @@ in import ./make-test.nix {
|
||||
networking.extraHosts = ''
|
||||
${config.networking.primaryIPAddress} standalone.com
|
||||
'';
|
||||
security.acme.certs."standalone.com" = {
|
||||
webroot = "/var/lib/acme/acme-challenges";
|
||||
security.acme = {
|
||||
server = "https://acme-v02.api.letsencrypt.org/dir";
|
||||
certs."standalone.com" = {
|
||||
webroot = "/var/lib/acme/acme-challenges";
|
||||
};
|
||||
};
|
||||
systemd.targets."acme-finished-standalone.com" = {};
|
||||
systemd.services."acme-standalone.com" = {
|
||||
@ -54,6 +57,8 @@ in import ./make-test.nix {
|
||||
'';
|
||||
};
|
||||
|
||||
security.acme.server = "https://acme-v02.api.letsencrypt.org/dir";
|
||||
|
||||
nesting.clone = [
|
||||
({pkgs, ...}: {
|
||||
|
||||
|
@ -159,6 +159,7 @@ in
|
||||
#logstash = handleTest ./logstash.nix {};
|
||||
mailcatcher = handleTest ./mailcatcher.nix {};
|
||||
mathics = handleTest ./mathics.nix {};
|
||||
matomo = handleTest ./matomo.nix {};
|
||||
matrix-synapse = handleTest ./matrix-synapse.nix {};
|
||||
mediawiki = handleTest ./mediawiki.nix {};
|
||||
memcached = handleTest ./memcached.nix {};
|
||||
@ -210,6 +211,7 @@ in
|
||||
# openstack-image-userdata doesn't work in a sandbox as the simulated openstack instance needs network access
|
||||
#openstack-image-userdata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).userdata or {};
|
||||
openstack-image-metadata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).metadata or {};
|
||||
orangefs = handleTest ./orangefs.nix {};
|
||||
os-prober = handleTestOn ["x86_64-linux"] ./os-prober.nix {};
|
||||
osquery = handleTest ./osquery.nix {};
|
||||
osrm-backend = handleTest ./osrm-backend.nix {};
|
||||
|
@ -1,25 +0,0 @@
|
||||
From c3b4004386074342d22cab5e129c1f7e623f4272 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?F=C3=A9lix=20Baylac-Jacqu=C3=A9?= <felix@alternativebit.fr>
|
||||
Date: Mon, 21 Oct 2019 10:56:13 +0200
|
||||
Subject: [PATCH] Change ACME directory endpoint to /directory
|
||||
|
||||
---
|
||||
wfe/wfe.go | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/wfe/wfe.go b/wfe/wfe.go
|
||||
index e24797f..10d29fb 100644
|
||||
--- a/wfe/wfe.go
|
||||
+++ b/wfe/wfe.go
|
||||
@@ -39,7 +39,7 @@ const (
|
||||
// Note: We deliberately pick endpoint paths that differ from Boulder to
|
||||
// exercise clients processing of the /directory response
|
||||
// We export the DirectoryPath so that the pebble binary can reference it
|
||||
- DirectoryPath = "/dir"
|
||||
+ DirectoryPath = "/directory"
|
||||
noncePath = "/nonce-plz"
|
||||
newAccountPath = "/sign-me-up"
|
||||
acctPath = "/my-account/"
|
||||
--
|
||||
2.23.0
|
||||
|
@ -62,17 +62,7 @@ let
|
||||
siteDomain = "letsencrypt.org";
|
||||
siteCertFile = snakeOilCerts.${siteDomain}.cert;
|
||||
siteKeyFile = snakeOilCerts.${siteDomain}.key;
|
||||
pebble = pkgs.pebble.overrideAttrs (attrs: {
|
||||
# The pebble directory endpoint is /dir when the bouder (official
|
||||
# ACME server) is /directory. Sadly, this endpoint is hardcoded,
|
||||
# we have to patch it.
|
||||
#
|
||||
# Tried to upstream, that said upstream maintainers rather keep
|
||||
# this custom endpoint to test ACME clients robustness. See
|
||||
# https://github.com/letsencrypt/pebble/issues/283#issuecomment-545123242
|
||||
patches = [ ./0001-Change-ACME-directory-endpoint-to-directory.patch ];
|
||||
});
|
||||
|
||||
pebble = pkgs.pebble;
|
||||
resolver = let
|
||||
message = "You need to define a resolver for the letsencrypt test module.";
|
||||
firstNS = lib.head config.networking.nameservers;
|
||||
|
@ -7,7 +7,7 @@ import ./make-test.nix ({ lib, ... }:
|
||||
fonts.fonts = with pkgs; [
|
||||
noto-fonts-emoji
|
||||
cantarell-fonts
|
||||
#twitter-color-emoji # Can't be generated with Python 3 version of nototools
|
||||
twitter-color-emoji
|
||||
source-code-pro
|
||||
gentium
|
||||
];
|
||||
|
43
nixos/tests/matomo.nix
Normal file
43
nixos/tests/matomo.nix
Normal file
@ -0,0 +1,43 @@
|
||||
{ system ? builtins.currentSystem, config ? { }
|
||||
, pkgs ? import ../.. { inherit system config; } }:
|
||||
|
||||
with import ../lib/testing.nix { inherit system pkgs; };
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
matomoTest = package:
|
||||
makeTest {
|
||||
machine = { config, pkgs, ... }: {
|
||||
services.matomo = {
|
||||
package = package;
|
||||
enable = true;
|
||||
nginx = {
|
||||
forceSSL = false;
|
||||
enableACME = false;
|
||||
};
|
||||
};
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mysql;
|
||||
};
|
||||
services.nginx.enable = true;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
$machine->waitForUnit("mysql.service");
|
||||
$machine->waitForUnit("phpfpm-matomo.service");
|
||||
$machine->waitForUnit("nginx.service");
|
||||
$machine->succeed("curl -sSfL http://localhost/ | grep '<title>Matomo[^<]*Installation'");
|
||||
'';
|
||||
};
|
||||
in {
|
||||
matomo = matomoTest pkgs.matomo // {
|
||||
name = "matomo";
|
||||
meta.maintainers = with maintainers; [ florianjacob kiwi mmilata ];
|
||||
};
|
||||
matomo-beta = matomoTest pkgs.matomo-beta // {
|
||||
name = "matomo-beta";
|
||||
meta.maintainers = with maintainers; [ florianjacob kiwi mmilata ];
|
||||
};
|
||||
}
|
88
nixos/tests/orangefs.nix
Normal file
88
nixos/tests/orangefs.nix
Normal file
@ -0,0 +1,88 @@
|
||||
import ./make-test.nix ({ ... } :
|
||||
|
||||
let
|
||||
server = { pkgs, ... } : {
|
||||
networking.firewall.allowedTCPPorts = [ 3334 ];
|
||||
boot.initrd.postDeviceCommands = ''
|
||||
${pkgs.e2fsprogs}/bin/mkfs.ext4 -L data /dev/vdb
|
||||
'';
|
||||
|
||||
virtualisation.emptyDiskImages = [ 4096 ];
|
||||
|
||||
fileSystems = pkgs.lib.mkVMOverride
|
||||
[ { mountPoint = "/data";
|
||||
device = "/dev/disk/by-label/data";
|
||||
fsType = "ext4";
|
||||
}
|
||||
];
|
||||
|
||||
services.orangefs.server = {
|
||||
enable = true;
|
||||
dataStorageSpace = "/data/storage";
|
||||
metadataStorageSpace = "/data/meta";
|
||||
servers = {
|
||||
server1 = "tcp://server1:3334";
|
||||
server2 = "tcp://server2:3334";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
client = { lib, ... } : {
|
||||
networking.firewall.enable = true;
|
||||
|
||||
services.orangefs.client = {
|
||||
enable = true;
|
||||
fileSystems = [{
|
||||
target = "tcp://server1:3334/orangefs";
|
||||
mountPoint = "/orangefs";
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
in {
|
||||
name = "orangefs";
|
||||
|
||||
nodes = {
|
||||
server1 = server;
|
||||
server2 = server;
|
||||
|
||||
client1 = client;
|
||||
client2 = client;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
# format storage
|
||||
foreach my $server (($server1,$server2))
|
||||
{
|
||||
$server->start();
|
||||
$server->waitForUnit("multi-user.target");
|
||||
$server->succeed("mkdir -p /data/storage /data/meta");
|
||||
$server->succeed("chown orangefs:orangefs /data/storage /data/meta");
|
||||
$server->succeed("chmod 0770 /data/storage /data/meta");
|
||||
$server->succeed("sudo -g orangefs -u orangefs pvfs2-server -f /etc/orangefs/server.conf");
|
||||
}
|
||||
|
||||
# start services after storage is formated on all machines
|
||||
foreach my $server (($server1,$server2))
|
||||
{
|
||||
$server->succeed("systemctl start orangefs-server.service");
|
||||
}
|
||||
|
||||
# Check if clients can reach and mount the FS
|
||||
foreach my $client (($client1,$client2))
|
||||
{
|
||||
$client->start();
|
||||
$client->waitForUnit("orangefs-client.service");
|
||||
# Both servers need to be reachable
|
||||
$client->succeed("pvfs2-check-server -h server1 -f orangefs -n tcp -p 3334");
|
||||
$client->succeed("pvfs2-check-server -h server2 -f orangefs -n tcp -p 3334");
|
||||
$client->waitForUnit("orangefs.mount");
|
||||
|
||||
}
|
||||
|
||||
# R/W test between clients
|
||||
$client1->succeed("echo test > /orangefs/file1");
|
||||
$client2->succeed("grep test /orangefs/file1");
|
||||
|
||||
'';
|
||||
})
|
71
pkgs/applications/accessibility/contrast/default.nix
Normal file
71
pkgs/applications/accessibility/contrast/default.nix
Normal file
@ -0,0 +1,71 @@
|
||||
{ stdenv
|
||||
, fetchFromGitLab
|
||||
, cairo
|
||||
, dbus
|
||||
, desktop-file-utils
|
||||
, gettext
|
||||
, glib
|
||||
, gtk3
|
||||
, libhandy
|
||||
, meson
|
||||
, ninja
|
||||
, pango
|
||||
, pkgconfig
|
||||
, python3
|
||||
, rustc
|
||||
, rustPlatform
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "contrast";
|
||||
version = "0.0.2";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
group = "World";
|
||||
owner = "design";
|
||||
repo = "contrast";
|
||||
rev = version;
|
||||
sha256 = "0rm705zrk9rfv31pwbqxrswi5v6vhnghxa8dgxjmcrh00l8dm6j9";
|
||||
};
|
||||
|
||||
cargoSha256 = "06vgc89d93fhjcyy9d1v6lf8kr34pl5bbpwbv2jpfahpj9y84bgj";
|
||||
|
||||
nativeBuildInputs = [
|
||||
desktop-file-utils
|
||||
gettext
|
||||
meson
|
||||
ninja
|
||||
pkgconfig
|
||||
python3
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cairo
|
||||
dbus
|
||||
glib
|
||||
gtk3
|
||||
libhandy
|
||||
pango
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs build-aux/meson_post_install.py
|
||||
'';
|
||||
|
||||
# Don't use buildRustPackage phases, only use it for rust deps setup
|
||||
configurePhase = null;
|
||||
buildPhase = null;
|
||||
checkPhase = null;
|
||||
installPhase = null;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Checks whether the contrast between two colors meet the WCAG requirements";
|
||||
homepage = https://gitlab.gnome.org/World/design/contrast;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
};
|
||||
}
|
||||
|
28
pkgs/applications/audio/bsequencer/default.nix
Normal file
28
pkgs/applications/audio/bsequencer/default.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ stdenv, fetchFromGitHub, xorg, cairo, lv2, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "BSEQuencer";
|
||||
version = "0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sjaehn";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0c3bm2z6z2bjjv1cy50383zr81h99rcb2frmxad0r7lhi27mjyqn";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [
|
||||
xorg.libX11 cairo lv2
|
||||
];
|
||||
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/sjaehn/BSEQuencer;
|
||||
description = "Multi channel MIDI step sequencer LV2 plugin";
|
||||
maintainers = [ maintainers.magnetophon ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
28
pkgs/applications/audio/bshapr/default.nix
Normal file
28
pkgs/applications/audio/bshapr/default.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ stdenv, fetchFromGitHub, xorg, cairo, lv2, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "BShapr";
|
||||
version = "0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sjaehn";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "02b4wdfhr9y7z2k6ls086gv3vz4sjf7b1k8ryh573bzd8nr4896v";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [
|
||||
xorg.libX11 cairo lv2
|
||||
];
|
||||
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/sjaehn/BShapr;
|
||||
description = "Beat / envelope shaper LV2 plugin";
|
||||
maintainers = [ maintainers.magnetophon ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
28
pkgs/applications/audio/bslizr/default.nix
Normal file
28
pkgs/applications/audio/bslizr/default.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ stdenv, fetchFromGitHub, xorg, cairo, lv2, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "BSlizr";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sjaehn";
|
||||
repo = pname;
|
||||
rev = "${version}";
|
||||
sha256 = "1xqhpppfj47nzmyksbqgfvvi5j807g96hqla544w2f752zz4yi0s";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [
|
||||
xorg.libX11 cairo lv2
|
||||
];
|
||||
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/sjaehn/BSlizr;
|
||||
description = "Sequenced audio slicing effect LV2 plugin (step sequencer effect)";
|
||||
maintainers = [ maintainers.magnetophon ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
@ -2,16 +2,18 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "spotify-tui";
|
||||
version = "0.6.2";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Rigellute";
|
||||
repo = "spotify-tui";
|
||||
rev = "v${version}";
|
||||
sha256 = "0ksrdavnvjpph7h0lcc2hvxhygfbn0dmsabq2ilslvpa80ph2c53";
|
||||
sha256 = "0pgmcld48sd34jpsc4lr8dbqs8iwk0xp9aa3b15m61mv3lf04qc6";
|
||||
};
|
||||
|
||||
cargoSha256 = "029g80mcqvmckszpbzm4hxs5w63n41ah4rc1b93i9c1nzvncd811";
|
||||
cargoSha256 = "1rb4dl9zn3xx2yrapx5cfsli93ggmdq8w9fqi8cy8giyja1mnqfl";
|
||||
|
||||
cargoPatches = [ ./fix-cargo-lock-version.patch ];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ openssl ]
|
||||
|
@ -0,0 +1,13 @@
|
||||
diff --git i/Cargo.lock w/Cargo.lock
|
||||
index e1eae72..e004898 100644
|
||||
--- i/Cargo.lock
|
||||
+++ w/Cargo.lock
|
||||
@@ -1310,7 +1310,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "spotify-tui"
|
||||
-version = "0.7.5"
|
||||
+version = "0.8.0"
|
||||
dependencies = [
|
||||
"backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
@ -1,19 +1,19 @@
|
||||
{ stdenv, python3, pkgconfig, which, libtool, autoconf, automake,
|
||||
autogen, sqlite, gmp, zlib, fetchurl, unzip, fetchpatch }:
|
||||
autogen, sqlite, gmp, zlib, fetchurl, unzip, fetchpatch, gettext }:
|
||||
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "clightning";
|
||||
version = "0.7.2.1";
|
||||
version = "0.7.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip";
|
||||
sha256 = "3be716948efc1208b5e6a41e3034e4e4eecc5abbdac769fd1d999a104ac3a2ec";
|
||||
sha256 = "ef2193940146d1b8ff0cc03602842c4d81db9ca6a5e73927e4f8932715e931a4";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ autoconf autogen automake libtool pkgconfig which unzip ];
|
||||
nativeBuildInputs = [ autoconf autogen automake libtool pkgconfig which unzip gettext ];
|
||||
buildInputs =
|
||||
let py3 = python3.withPackages (p: [ p.Mako ]);
|
||||
in [ sqlite gmp zlib py3 ];
|
||||
@ -28,7 +28,8 @@ stdenv.mkDerivation rec {
|
||||
patchShebangs \
|
||||
tools/generate-wire.py \
|
||||
tools/update-mocks.sh \
|
||||
tools/mockup.sh
|
||||
tools/mockup.sh \
|
||||
devtools/sql-rewrite.py
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
@ -10,16 +10,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "jormungandr";
|
||||
version = "0.7.0-rc1";
|
||||
version = "0.7.0-rc3";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/input-output-hk/${pname}";
|
||||
rev = "v${version}";
|
||||
sha256 = "02ihnq7b32rwx7ychrj76rin1z3s9np5yjylppxm0qp5sjkik9ff";
|
||||
sha256 = "09hfmzgz1imz22w27c0aal6v7m4yfivh0sk63mawcd4m7sa6045c";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
cargoSha256 = "1pp829azj6aw68ba637rm852sj61nxznxfzrlqs9ds6adk9h7abs";
|
||||
cargoSha256 = "0syfwykwzfm9nqpna0qrmjiv4dp0rxxbpxv8qawq9ivs9z8fbq2m";
|
||||
|
||||
nativeBuildInputs = [ pkgconfig protobuf ];
|
||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
||||
|
@ -1,7 +1,13 @@
|
||||
{ stdenv, callPackage,
|
||||
fetchurl, guile_1_8, qt4, xmodmap, which, makeWrapper, freetype,
|
||||
libjpeg,
|
||||
sqlite,
|
||||
tex ? null,
|
||||
aspell ? null,
|
||||
git ? null,
|
||||
python3 ? null,
|
||||
cmake,
|
||||
pkgconfig,
|
||||
ghostscriptX ? null,
|
||||
extraFonts ? false,
|
||||
chineseFonts ? false,
|
||||
@ -10,7 +16,7 @@
|
||||
|
||||
let
|
||||
pname = "TeXmacs";
|
||||
version = "1.99.2";
|
||||
version = "1.99.10";
|
||||
common = callPackage ./common.nix {
|
||||
inherit tex extraFonts chineseFonts japaneseFonts koreanFonts;
|
||||
};
|
||||
@ -19,17 +25,38 @@ stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
|
||||
sha256 = "0l48g9746igiaxw657shm8g3xxk565vzsviajlrxqyljbh6py0fs";
|
||||
url = "https://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
|
||||
sha256 = "1k12bkcik7mv93q0j7q3b77x8s6rmvlb23s3v7nnzdwjxlp5lph2";
|
||||
};
|
||||
|
||||
buildInputs = [ guile_1_8 qt4 makeWrapper ghostscriptX freetype ];
|
||||
cmakeFlags = [
|
||||
# Texmacs' cmake build as of writing defaults to Qt5,
|
||||
# but we haven't updated to that yet.
|
||||
"-DTEXMACS_GUI=Qt4"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
buildInputs = [
|
||||
guile_1_8
|
||||
qt4
|
||||
makeWrapper
|
||||
ghostscriptX
|
||||
freetype
|
||||
libjpeg
|
||||
sqlite
|
||||
git
|
||||
python3
|
||||
];
|
||||
NIX_LDFLAGS = [ "-lz" ];
|
||||
|
||||
postInstall = "wrapProgram $out/bin/texmacs --suffix PATH : " +
|
||||
(if ghostscriptX == null then "" else "${ghostscriptX}/bin:") +
|
||||
(if aspell == null then "" else "${aspell}/bin:") +
|
||||
(if tex == null then "" else "${tex}/bin:") +
|
||||
(if git == null then "" else "${git}/bin:") +
|
||||
(if python3 == null then "" else "${python3}/bin:") +
|
||||
"${xmodmap}/bin:${which}/bin";
|
||||
|
||||
inherit (common) postPatch;
|
||||
|
@ -1,13 +1,53 @@
|
||||
{ fetchFromGitHub, libGLU, llvmPackages, qtbase, qtscript, qtxmlpatterns }:
|
||||
{ mkDerivation, lib, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, libGLU
|
||||
, qtbase
|
||||
, qtscript
|
||||
, qtxmlpatterns
|
||||
, lib3ds
|
||||
, bzip2
|
||||
, muparser
|
||||
, levmar
|
||||
}:
|
||||
|
||||
let
|
||||
meshlabRev = "d596d7c086c51fbdfb56050f9c30b55dd0286d4c";
|
||||
vcglibRev = "6c3c940e34327322507c703889f9f1cfa73ab183";
|
||||
meshlabRev = "25f3d17b1d1d47ddc51179cb955f3027b7638745";
|
||||
vcglibRev = "910da4c3e310f2e6557bd7a39c4f1529e61573e5";
|
||||
# ^ this should be the latest commit in the vcglib devel branch at the time of the meshlab revision
|
||||
# We keep it separate here instead of using the `vcg` nix package because
|
||||
# as of writing, meshlab upstream does not seem to follow a proper
|
||||
# release process, and the other dependencies of `vcg` may no longer
|
||||
# work when we upgrade it for the purpose of meshlab.
|
||||
|
||||
stdenv = llvmPackages.stdenv; # only building with clang seems to be tested upstream
|
||||
in stdenv.mkDerivation {
|
||||
name = "meshlab-20180627-beta";
|
||||
# Unfixed upstream compile error; see
|
||||
# https://github.com/cnr-isti-vclab/meshlab/issues/188#issuecomment-364785362
|
||||
# that has with fixed line endings.
|
||||
import_bundle_out_patch = fetchpatch {
|
||||
name = "import_bundle_out.patch";
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/import_bundle_out.patch?h=meshlab-git&id=f7250ea818470f07dc9b86726407091d39c0be6f";
|
||||
sha256 = "1g6nli15i3fjd6jsgkxvb33kzbcv67xjkc3jv9r51lrwlm1ifzxi";
|
||||
};
|
||||
|
||||
# Reduces amount of vendored libraries, fixes `/linux` vs `linux-g++`
|
||||
# directory name linker errors.
|
||||
external_patch = fetchpatch {
|
||||
name = "external.patch";
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/external.patch?h=meshlab-git&id=f7250ea818470f07dc9b86726407091d39c0be6f";
|
||||
sha256 = "1rxwkxhmxis1420rc1w7dg89gkmym68lpszsq6snl6dzpl3ingsb";
|
||||
};
|
||||
_3ds_patch = fetchpatch {
|
||||
name = "3ds.patch";
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/3ds.patch?h=meshlab-git&id=f7250ea818470f07dc9b86726407091d39c0be6f";
|
||||
sha256 = "1w435b7p1ggi2bzib4yyszmk54drjgpbn8n9mnsk1slsxnp2vmg8";
|
||||
};
|
||||
muparser_patch = fetchpatch {
|
||||
name = "muparser.patch";
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/muparser.patch?h=meshlab-git&id=f7250ea818470f07dc9b86726407091d39c0be6f";
|
||||
sha256 = "1sf7xqwc2j8xxdx2yklwifii9qqgknvx6ahk2hq76mg78ry1nzhq";
|
||||
};
|
||||
|
||||
in mkDerivation {
|
||||
name = "meshlab-20190129-beta";
|
||||
|
||||
srcs =
|
||||
[
|
||||
@ -15,38 +55,54 @@ in stdenv.mkDerivation {
|
||||
owner = "cnr-isti-vclab";
|
||||
repo = "meshlab";
|
||||
rev = meshlabRev;
|
||||
sha256 = "0xi7wiyy0yi545l5qvccbqahlcsf70mhx829gf7bq29640si4rax";
|
||||
sha256 = "16d2i91hrxvrr5p0k33g3fzis9zp4gsy3n5y2nhafvsgdmaidiij";
|
||||
name = "meshlab-${meshlabRev}";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "cnr-isti-vclab";
|
||||
repo = "vcglib";
|
||||
rev = vcglibRev;
|
||||
sha256 = "0jfgjvf21y9ncmyr7caipy3ardhig7hh9z8miy885c99b925hhwd";
|
||||
sha256 = "0xpnjpwpj57hgai184rzyk9lbq6d9vbjzr477dvl5nplpwa420m1";
|
||||
name = "vcglib-${vcglibRev}";
|
||||
})
|
||||
];
|
||||
|
||||
sourceRoot = "meshlab-${meshlabRev}";
|
||||
|
||||
# Meshlab is not format-security clean; without disabling hardening, we get:
|
||||
# ../../external/qhull-2003.1/src/io.c:2169:3: error: format not a string literal and no format arguments [-Werror=format-security]
|
||||
# fprintf(fp, endfmt);
|
||||
# ^~~~~~~
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patches = [ ./fix-20180627-beta.patch ];
|
||||
prePatch =
|
||||
''
|
||||
# MeshLab has ../vcglib hardcoded everywhere, so move the source dir
|
||||
mv ../vcglib-${vcglibRev} ../vcglib
|
||||
|
||||
# Make all source files writable so that patches can be applied.
|
||||
chmod -R u+w ..
|
||||
|
||||
patch -Np1 --directory=../vcglib -i ${import_bundle_out_patch}
|
||||
|
||||
patch -Np1 -i ${external_patch}
|
||||
# Individual libraries
|
||||
patch -Np1 -i ${_3ds_patch}
|
||||
patch -Np1 -i ${muparser_patch}
|
||||
''
|
||||
;
|
||||
|
||||
buildPhase = ''
|
||||
# MeshLab has ../vcglib hardcoded everywhere, so move the source dir
|
||||
mv ../vcglib-${vcglibRev} ../vcglib
|
||||
|
||||
cd src
|
||||
export NIX_LDFLAGS="-rpath $out/opt/meshlab $NIX_LDFLAGS"
|
||||
export QMAKESPEC="linux-clang"
|
||||
|
||||
pushd external
|
||||
qmake -recursive external.pro
|
||||
qmake -recursive $QMAKE_FLAGS external.pro
|
||||
buildPhase
|
||||
popd
|
||||
qmake -recursive meshlab_full.pro
|
||||
qmake -recursive $QMAKE_FLAGS meshlab_full.pro
|
||||
buildPhase
|
||||
'';
|
||||
|
||||
@ -57,13 +113,22 @@ in stdenv.mkDerivation {
|
||||
ln -s $out/opt/meshlab/meshlabserver $out/bin/meshlabserver
|
||||
'';
|
||||
|
||||
buildInputs = [ libGLU llvmPackages.openmp qtbase qtscript qtxmlpatterns ];
|
||||
buildInputs = [
|
||||
libGLU
|
||||
qtbase
|
||||
qtscript
|
||||
qtxmlpatterns
|
||||
lib3ds
|
||||
bzip2
|
||||
muparser
|
||||
levmar
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "A system for processing and editing 3D triangular meshes.";
|
||||
homepage = http://www.meshlab.net/;
|
||||
license = stdenv.lib.licenses.gpl3;
|
||||
maintainers = with stdenv.lib.maintainers; [viric];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [viric];
|
||||
platforms = with lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
|
@ -1,25 +0,0 @@
|
||||
diff --git a/src/meshlabplugins/edit_paint/paintbox.cpp b/src/meshlabplugins/edit_paint/paintbox.cpp
|
||||
index 2097a5b..6bcd1a4 100644
|
||||
--- a/src/meshlabplugins/edit_paint/paintbox.cpp
|
||||
+++ b/src/meshlabplugins/edit_paint/paintbox.cpp
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "paintbox.h"
|
||||
#include <QFileDialog>
|
||||
+#include <QAction>
|
||||
|
||||
Paintbox::Paintbox(QWidget * parent, Qt::WindowFlags flags) : QWidget(parent, flags)
|
||||
{
|
||||
diff --git a/src/meshlabplugins/render_gdp/shaderDialog.h b/src/meshlabplugins/render_gdp/shaderDialog.h
|
||||
index a62d3b5..7eb1594 100644
|
||||
--- a/src/meshlabplugins/render_gdp/shaderDialog.h
|
||||
+++ b/src/meshlabplugins/render_gdp/shaderDialog.h
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "shaderStructs.h"
|
||||
#include "ui_shaderDialog.h"
|
||||
#include <QMap>
|
||||
+#include <QSlider>
|
||||
+#include <QLineEdit>
|
||||
|
||||
class QGLWidget;
|
||||
|
@ -1,36 +1,24 @@
|
||||
{ stdenv, python3, fetchFromGitHub }:
|
||||
{ stdenv, fetchFromGitHub, buildGoModule }:
|
||||
|
||||
with python3.pkgs;
|
||||
buildPythonApplication rec {
|
||||
buildGoModule rec {
|
||||
pname = "cheat";
|
||||
version = "2.5.1";
|
||||
|
||||
propagatedBuildInputs = [ docopt pygments termcolor ];
|
||||
version = "3.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "chrisallenlane";
|
||||
repo = "cheat";
|
||||
rev = version;
|
||||
sha256 = "1i543hvg1yizamfd83bawflfcb500hvc72i59ikck8j1hjk50hsl";
|
||||
sha256 = "19w1admdcgld9vlc4fsyc5d9bi6rmwhr2x2ji43za2vjlk34hnnx";
|
||||
};
|
||||
# no tests available
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
install -D man1/cheat.1.gz $out/share/man/man1/cheat.1.gz
|
||||
mv $out/${python3.sitePackages}/etc $out/
|
||||
mv $out/${python3.sitePackages}/usr/share/* $out/share/
|
||||
rm -r $out/${python3.sitePackages}/usr
|
||||
'';
|
||||
subPackages = [ "cmd/cheat" ];
|
||||
|
||||
makeWrapperArgs = [
|
||||
"--suffix" "CHEAT_PATH" ":" "$out/share/cheat"
|
||||
];
|
||||
modSha256 = "189cqnfl403f4lk7g9v68mwk93ciglqli639dk4x9091lvn5gq5q";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "cheat allows you to create and view interactive cheatsheets on the command-line";
|
||||
description = "Create and view interactive cheatsheets on the command-line";
|
||||
maintainers = with maintainers; [ mic92 ];
|
||||
license = with licenses; [ gpl3 mit ];
|
||||
homepage = https://github.com/chrisallenlane/cheat;
|
||||
homepage = "https://github.com/chrisallenlane/cheat";
|
||||
};
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{ stdenv, fetchurl, pythonPackages, gettext }:
|
||||
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
{ lib, fetchurl, pythonPackages, gettext }:
|
||||
|
||||
pythonPackages.buildPythonApplication rec {
|
||||
pname = "cherrytree";
|
||||
version = "0.38.9";
|
||||
|
||||
@ -11,26 +9,15 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0xal09ijgxbzvp003s40xbrfnpq3ald1fw8nnpqq3yg7h6g6c5pw";
|
||||
};
|
||||
|
||||
buildInputs = with pythonPackages;
|
||||
[ python gettext wrapPython pygtk dbus-python pygtksourceview ];
|
||||
nativeBuildInputs = [ gettext ];
|
||||
|
||||
pythonPath = with pythonPackages;
|
||||
[ pygtk dbus-python pygtksourceview ];
|
||||
propagatedBuildInputs = with pythonPackages; [ pygtk dbus-python pygtksourceview ];
|
||||
|
||||
patches = [ ./subprocess.patch ];
|
||||
|
||||
installPhase = ''
|
||||
python setup.py install --prefix="$out"
|
||||
|
||||
for file in "$out"/bin/*; do
|
||||
wrapProgram "$file" \
|
||||
--prefix PYTHONPATH : "$(toPythonPath $out):$PYTHONPATH"
|
||||
done
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = "An hierarchical note taking application";
|
||||
longDescription = ''
|
||||
Cherrytree is an hierarchical note taking application,
|
||||
@ -42,9 +29,8 @@ stdenv.mkDerivation rec {
|
||||
around your hard drive can be conveniently placed into a
|
||||
Cherrytree document where you can easily find it.
|
||||
'';
|
||||
homepage = http://www.giuspen.com/cherrytree;
|
||||
homepage = "http://www.giuspen.com/cherrytree";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.AndersonTorres ];
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
};
|
||||
}
|
||||
|
82
pkgs/applications/misc/elogind/default.nix
Normal file
82
pkgs/applications/misc/elogind/default.nix
Normal file
@ -0,0 +1,82 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, meson
|
||||
, ninja
|
||||
, m4
|
||||
, gperf
|
||||
, getent
|
||||
, libcap
|
||||
, gettext
|
||||
, pkgconfig
|
||||
, udev
|
||||
, eudev
|
||||
, libxslt
|
||||
, python3
|
||||
, docbook5
|
||||
, docbook_xsl
|
||||
, docbook_xsl_ns
|
||||
, docbook_xml_dtd_42
|
||||
, docbook_xml_dtd_45
|
||||
|
||||
# Defaulting to false because usually the rationale for using elogind is to
|
||||
# use it in situation where a systemd dependency does not work (especially
|
||||
# when building with musl, which elogind explicitly supports).
|
||||
, enableSystemd ? false
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "elogind";
|
||||
version = "239.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "elogind";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1gdiy4vbx4gs2hnb79x14zi530mlq26glxpzp3c95w8l058wj4ba";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
m4
|
||||
pkgconfig
|
||||
gperf
|
||||
getent
|
||||
libcap
|
||||
gettext
|
||||
libxslt.bin # xsltproc
|
||||
docbook5 docbook_xsl docbook_xsl_ns docbook_xml_dtd_42 docbook_xml_dtd_45 # needed for docbook without Internet
|
||||
(python3.withPackages (p: with p; [ lxml ])) # fixes: man/meson.build:111:0: ERROR: Could not execute command "/build/source/tools/xml_helper.py".
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
if enableSystemd then [ udev ] else [ eudev ];
|
||||
|
||||
# Inspired by the systemd `preConfigure`.
|
||||
# Conceptually we should patch all files required during the build, but not scripts
|
||||
# supposed to run at run-time of the software (important for cross-compilation).
|
||||
# This package seems to have mostly scripts that run at build time.
|
||||
preConfigure = ''
|
||||
for dir in tools src/test; do
|
||||
patchShebangs $dir
|
||||
done
|
||||
|
||||
patchShebangs src/basic/generate-*.{sh,py}
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
"-Drootprefix=${placeholder "out"}"
|
||||
"-Dsysconfdir=${placeholder "out"}/etc"
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = https://github.com/elogind/elogind;
|
||||
description = ''The systemd project's "logind", extracted to a standalone package'';
|
||||
platforms = platforms.linux; # probably more
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ nh2 ];
|
||||
};
|
||||
}
|
@ -1,21 +1,21 @@
|
||||
{ stdenv, fetchFromGitHub, python3, cudatoolkit,
|
||||
{ stdenv, fetchFromGitHub, glibc, python3, cudatoolkit,
|
||||
withCuda ? true
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "firestarter";
|
||||
version = "1.7.3";
|
||||
version = "1.7.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tud-zih-energy";
|
||||
repo = "FIRESTARTER";
|
||||
rev = "v${version}";
|
||||
sha256 = "1gc7kmzx9nw22lyfmpyz72p974jf1hvw5nvszcaq7x6h8cz9ip15";
|
||||
sha256 = "161mg0h1hvp6bxfjdhyfqrljvphys896mfd36254rbgzxm38ibi7";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ python3 ];
|
||||
buildInputs = optionals withCuda [ cudatoolkit ];
|
||||
buildInputs = [ glibc.static ] ++ optionals withCuda [ cudatoolkit ];
|
||||
preBuild = ''
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "gpxsee";
|
||||
version = "7.15";
|
||||
version = "7.16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tumic0";
|
||||
repo = "GPXSee";
|
||||
rev = version;
|
||||
sha256 = "036g17479nqy3kvy3dy3cn7yi7r57rsp28gkcay0qhf9h0az76p3";
|
||||
sha256 = "1mkfhb2c9qafjpva600nyn6yik49l4q1k6id1xvrci37wsn6ijav";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qmake ];
|
||||
|
@ -29,7 +29,7 @@ in buildFHSUserEnv {
|
||||
|
||||
# Dolphin
|
||||
bluez ffmpeg gettext portaudio wxGTK30 miniupnpc mbedtls lzo sfml gsm
|
||||
wavpack gnutls-kdh orc nettle gmp pcre vulkan-loader
|
||||
wavpack orc nettle gmp pcre vulkan-loader
|
||||
|
||||
# DOSBox
|
||||
SDL_net SDL_sound
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pdfsam-basic";
|
||||
version = "4.0.4";
|
||||
version = "4.0.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/torakiki/pdfsam/releases/download/v${version}/pdfsam_${version}-1_amd64.deb";
|
||||
sha256 = "17lhzxlgr4l4dljy0b0avfrgbj9rsfzk1dzg0abqvld4w4igkqbq";
|
||||
sha256 = "1znadsg65312h8yyxvj8k0c4pl3g9daif50vk50acwpblq49wm1v";
|
||||
};
|
||||
|
||||
unpackPhase = ''
|
||||
|
30
pkgs/applications/misc/wofi/default.nix
Normal file
30
pkgs/applications/misc/wofi/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ stdenv, lib, fetchhg, pkg-config, wayland, gtk3 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wofi";
|
||||
version = "2019-10-28";
|
||||
|
||||
src = fetchhg {
|
||||
url = "https://hg.sr.ht/~scoopta/wofi";
|
||||
rev = "3fac708b2b541bb9927ec1b2389c4eb294e1b35b";
|
||||
sha256 = "0sp9hqm1lv9wyxj8z7vazs25nvl6yznd5vfhmwb51axwkr79s2ym";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ wayland gtk3 ];
|
||||
|
||||
sourceRoot = "hg-archive/Release";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp wofi $out/bin/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A launcher/menu program for wlroots based wayland compositors such as sway";
|
||||
homepage = "https://hg.sr.ht/~scoopta/wofi";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ erictapen ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
@ -93,19 +93,19 @@ let
|
||||
fteLibPath = makeLibraryPath [ stdenv.cc.cc gmp ];
|
||||
|
||||
# Upstream source
|
||||
version = "8.5.5";
|
||||
version = "9.0";
|
||||
|
||||
lang = "en-US";
|
||||
|
||||
srcs = {
|
||||
x86_64-linux = fetchurl {
|
||||
url = "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux64-${version}_${lang}.tar.xz";
|
||||
sha256 = "00r5k9bbfpv3s6shxqypl13psr1zz51xiyz3vmm4flhr2qa4ycsz";
|
||||
sha256 = "0aajbk65lpcazn8mdk7ngaqp0sykql8zjlkhznphxxw9v59mq3b7";
|
||||
};
|
||||
|
||||
i686-linux = fetchurl {
|
||||
url = "https://github.com/TheTorProject/gettorbrowser/releases/download/v${version}/tor-browser-linux32-${version}_${lang}.tar.xz";
|
||||
sha256 = "1nxvw5kiggfr4n5an436ass84cvwjviaa894kfm72yf2ls149f29";
|
||||
url = "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux32-${version}_${lang}.tar.xz";
|
||||
sha256 = "08ahs9985ndcq1ywz06q4znai6a3ivibjk473kymzl6k40q1c9y2";
|
||||
};
|
||||
};
|
||||
in
|
||||
@ -165,15 +165,12 @@ stdenv.mkDerivation rec {
|
||||
# interpreter for pre-compiled Go binaries by invoking the interpreter
|
||||
# directly.
|
||||
sed -i TorBrowser/Data/Tor/torrc-defaults \
|
||||
-e "s|\(ClientTransportPlugin obfs2,obfs3,obfs4,scramblesuit\) exec|\1 exec $interp|" \
|
||||
-e "s|\(ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit\) exec|\1 exec $interp|"
|
||||
|
||||
# Fixup fte transport
|
||||
#
|
||||
# Note: the script adds its dirname to search path automatically
|
||||
sed -i TorBrowser/Tor/PluggableTransports/fteproxy.bin \
|
||||
-e "s,/usr/bin/env python,${python27.interpreter},"
|
||||
# Similarly fixup snowflake
|
||||
sed -i TorBrowser/Data/Tor/torrc-defaults \
|
||||
-e "s|\(ClientTransportPlugin snowflake\) exec|\1 exec $interp|"
|
||||
|
||||
patchelf --set-rpath "${fteLibPath}" TorBrowser/Tor/PluggableTransports/fte/cDFA.so
|
||||
|
||||
# Prepare for autoconfig.
|
||||
#
|
||||
@ -237,6 +234,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Preload extensions by moving into the runtime instead of storing under the
|
||||
# user's profile directory.
|
||||
mkdir -p "$TBB_IN_STORE/browser/extensions"
|
||||
mv "$TBB_IN_STORE/TorBrowser/Data/Browser/profile.default/extensions/"* \
|
||||
"$TBB_IN_STORE/browser/extensions"
|
||||
|
||||
|
@ -17,11 +17,11 @@ let
|
||||
vivaldiName = if isSnapshot then "vivaldi-snapshot" else "vivaldi";
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "vivaldi";
|
||||
version = "2.8.1664.44-1";
|
||||
version = "2.9.1705.31-1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}_amd64.deb";
|
||||
sha256 = "0z1d03zw0jhvi14n06qfdr1n63idq56ly7mgiv27s21zvdma887k";
|
||||
sha256 = "113bycfygyx09bc5bgsmdniffp3282004yrl7gr16dssxrw52al2";
|
||||
};
|
||||
|
||||
unpackPhase = ''
|
||||
|
@ -1,16 +1,16 @@
|
||||
{ stdenv, fetchFromGitHub, glib, gtk3, json-glib, sqlite, libsoup, gettext, vala
|
||||
, meson, ninja, pkgconfig, gnome3, gst_all_1, wrapGAppsHook, gobject-introspection
|
||||
, glib-networking, python3, fetchpatch }:
|
||||
, glib-networking, python3 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.0.2";
|
||||
version = "1.0.3.1";
|
||||
pname = "cawbird";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "IBBoard";
|
||||
repo = "cawbird";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256:0b79ngwilicqkgacva93cir4rmk15yzgsih56yb3a4n6bqjispay";
|
||||
sha256 = "sha256:1v1y4bx0mm518b9vlpsry12fw1qz2j28jfhjqq73blvzd89lgb0y";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -7,7 +7,7 @@ assert lib.elem stdenv.hostPlatform.system platforms;
|
||||
# Dropbox client to bootstrap installation.
|
||||
# The client is self-updating, so the actual version may be newer.
|
||||
let
|
||||
version = "81.4.195";
|
||||
version = "83.4.152";
|
||||
|
||||
arch = {
|
||||
x86_64-linux = "x86_64";
|
||||
|
@ -2,7 +2,7 @@
|
||||
, gnome2, gtk3, atk, at-spi2-atk, cairo, pango, gdk-pixbuf, glib, freetype, fontconfig
|
||||
, dbus, libX11, xorg, libXi, libXcursor, libXdamage, libXrandr, libXcomposite
|
||||
, libXext, libXfixes, libXrender, libXtst, libXScrnSaver, nss, nspr, alsaLib
|
||||
, cups, expat, udev, libnotify, libuuid, at-spi2-core
|
||||
, cups, expat, udev, libnotify, libuuid, at-spi2-core, libappindicator-gtk3
|
||||
# Unfortunately this also overwrites the UI language (not just the spell
|
||||
# checking language!):
|
||||
, hunspellDicts, spellcheckerLanguage ? null # E.g. "de_DE"
|
||||
@ -37,6 +37,7 @@ let
|
||||
gnome2.GConf
|
||||
gtk3
|
||||
pango
|
||||
libappindicator-gtk3
|
||||
libnotify
|
||||
libuuid
|
||||
libX11
|
||||
|
@ -1,22 +1,44 @@
|
||||
{ stdenv, fetchurl, pkgconfig, gnome3, telepathy-glib, libxslt, makeWrapper }:
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, pkgconfig
|
||||
, gnome3
|
||||
, telepathy-glib
|
||||
, python3
|
||||
, libxslt
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-5.16.4";
|
||||
pname = "telepathy-mission-control";
|
||||
version = "5.16.5";
|
||||
|
||||
outputs = [ "out" "lib" "dev" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://telepathy.freedesktop.org/releases/${pname}/${name}.tar.gz";
|
||||
sha256 = "1jz6wwgsfxixha6ys2hbzbk5faqnj9kh2m5qdlgx5anqgandsscp";
|
||||
url = "https://telepathy.freedesktop.org/releases/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc";
|
||||
};
|
||||
|
||||
buildInputs = [ telepathy-glib telepathy-glib.python ]; # ToDo: optional stuff missing
|
||||
buildInputs = [
|
||||
python3
|
||||
]; # ToDo: optional stuff missing
|
||||
|
||||
nativeBuildInputs = [ pkgconfig libxslt makeWrapper ];
|
||||
nativeBuildInputs = [
|
||||
pkgconfig
|
||||
libxslt
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
telepathy-glib
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preFixup = ''
|
||||
wrapProgram "$out/libexec/mission-control-5" \
|
||||
wrapProgram "$lib/libexec/mission-control-5" \
|
||||
--prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib gnome3.dconf}/lib/gio/modules" \
|
||||
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
|
||||
'';
|
||||
|
@ -3,13 +3,13 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "maestral${lib.optionalString withGui "-gui"}";
|
||||
version = "0.4.0";
|
||||
version = "0.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "SamSchott";
|
||||
repo = "maestral-dropbox";
|
||||
rev = "v${version}";
|
||||
sha256 = "1jjn9cz43850xvs52gvx16qc5z4l91y4kpn6fpl05iwgaisbi1ws";
|
||||
sha256 = "0xis0cqfp3wgajwk44dmi2gbfirmz0a0zi25qxdzpdn0z19hp88m";
|
||||
};
|
||||
|
||||
disabled = python3Packages.pythonOlder "3.6";
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user