Merge staging-next into staging
This commit is contained in:
commit
a456fbfeed
@ -1,8 +1,8 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xml:id="sec-pkgs-fetchers">
|
||||
<title>Fetcher functions</title>
|
||||
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.
|
||||
@ -145,4 +145,4 @@ stdenv.mkDerivation {
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</section>
|
||||
</chapter>
|
12
doc/builders/images.xml
Normal file
12
doc/builders/images.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xml:id="chap-images">
|
||||
<title>Images</title>
|
||||
<para>
|
||||
This chapter describes tools for creating various types of images.
|
||||
</para>
|
||||
<xi:include href="images/appimagetools.xml" />
|
||||
<xi:include href="images/dockertools.xml" />
|
||||
<xi:include href="images/ocitools.xml" />
|
||||
<xi:include href="images/snaptools.xml" />
|
||||
</chapter>
|
12
doc/builders/special.xml
Normal file
12
doc/builders/special.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xml:id="chap-special">
|
||||
<title>Special builders</title>
|
||||
<para>
|
||||
This chapter describes several special builders.
|
||||
</para>
|
||||
<xi:include href="special/fhs-environments.xml" />
|
||||
<xi:include href="special/mkshell.xml" />
|
||||
</chapter>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xml:id="sec-trivial-builders">
|
||||
xml:id="chap-trivial-builders">
|
||||
<title>Trivial builders</title>
|
||||
|
||||
<para>
|
||||
@ -76,4 +76,4 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</section>
|
||||
</chapter>
|
@ -8,7 +8,7 @@
|
||||
<xsl:param name="html.script" select="'./highlightjs/highlight.pack.js ./highlightjs/loader.js'" />
|
||||
<xsl:param name="xref.with.number.and.title" select="1" />
|
||||
<xsl:param name="use.id.as.filename" select="1" />
|
||||
<xsl:param name="toc.section.depth" select="3" />
|
||||
<xsl:param name="toc.section.depth" select="0" />
|
||||
<xsl:param name="admon.style" select="''" />
|
||||
<xsl:param name="callout.graphics.extension" select="'.svg'" />
|
||||
</xsl:stylesheet>
|
||||
|
@ -7,17 +7,8 @@
|
||||
The nixpkgs repository has several utility functions to manipulate Nix expressions.
|
||||
</para>
|
||||
<xi:include href="functions/library.xml" />
|
||||
<xi:include href="functions/overrides.xml" />
|
||||
<xi:include href="functions/generators.xml" />
|
||||
<xi:include href="functions/debug.xml" />
|
||||
<xi:include href="functions/fetchers.xml" />
|
||||
<xi:include href="functions/trivial-builders.xml" />
|
||||
<xi:include href="functions/fhs-environments.xml" />
|
||||
<xi:include href="functions/shell.xml" />
|
||||
<xi:include href="functions/dockertools.xml" />
|
||||
<xi:include href="functions/snaptools.xml" />
|
||||
<xi:include href="functions/appimagetools.xml" />
|
||||
<xi:include href="functions/prefer-remote-fetch.xml" />
|
||||
<xi:include href="functions/nix-gitignore.xml" />
|
||||
<xi:include href="functions/ocitools.xml" />
|
||||
</chapter>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# User's Guide to Emscripten in Nixpkgs
|
||||
# Emscripten
|
||||
|
||||
[Emscripten](https://github.com/kripken/emscripten): An LLVM-to-JavaScript Compiler
|
||||
|
||||
|
@ -3,7 +3,7 @@ title: User's Guide for Haskell in Nixpkgs
|
||||
author: Peter Simons
|
||||
date: 2015-06-01
|
||||
---
|
||||
# User's Guide to the Haskell Infrastructure
|
||||
# Haskell
|
||||
|
||||
|
||||
## How to install Haskell packages
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Idris packages
|
||||
# Idris
|
||||
|
||||
## Installing Idris
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xml:id="chap-language-support">
|
||||
<title>Support for specific programming languages and frameworks</title>
|
||||
<title>Languages and frameworks</title>
|
||||
<para>
|
||||
The <link linkend="chap-stdenv">standard build environment</link> makes it easy to build typical Autotools-based packages with very little code. Any other kind of package can be accomodated by overriding the appropriate phases of <literal>stdenv</literal>. However, there are specialised functions in Nixpkgs to easily build packages for other programming languages, such as Perl or Haskell. These are described in this chapter.
|
||||
</para>
|
||||
@ -9,6 +9,8 @@
|
||||
<xi:include href="beam.xml" />
|
||||
<xi:include href="bower.xml" />
|
||||
<xi:include href="coq.xml" />
|
||||
<xi:include href="crystal.section.xml" />
|
||||
<xi:include href="emscripten.section.xml" />
|
||||
<xi:include href="gnome.xml" />
|
||||
<xi:include href="go.xml" />
|
||||
<xi:include href="haskell.section.xml" />
|
||||
@ -27,6 +29,4 @@
|
||||
<xi:include href="texlive.xml" />
|
||||
<xi:include href="titanium.section.xml" />
|
||||
<xi:include href="vim.section.xml" />
|
||||
<xi:include href="emscripten.section.xml" />
|
||||
<xi:include href="crystal.section.xml" />
|
||||
</chapter>
|
||||
|
@ -1,5 +1,5 @@
|
||||
Node.js packages
|
||||
================
|
||||
Node.js
|
||||
=======
|
||||
The `pkgs/development/node-packages` folder contains a generated collection of
|
||||
[NPM packages](https://npmjs.com/) that can be installed with the Nix package
|
||||
manager.
|
||||
|
@ -1,5 +1,5 @@
|
||||
R packages
|
||||
==========
|
||||
R
|
||||
=
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -4,7 +4,7 @@ author: Matthias Beyer
|
||||
date: 2017-03-05
|
||||
---
|
||||
|
||||
# User's Guide to the Rust Infrastructure
|
||||
# Rust
|
||||
|
||||
To install the rust compiler and cargo put
|
||||
|
||||
|
@ -3,7 +3,7 @@ title: User's Guide for Vim in Nixpkgs
|
||||
author: Marc Weber
|
||||
date: 2016-06-25
|
||||
---
|
||||
# User's Guide to Vim Plugins/Addons/Bundles/Scripts in Nixpkgs
|
||||
# Vim
|
||||
|
||||
Both Neovim and Vim can be configured to include your favorite plugins
|
||||
and additional libraries.
|
||||
|
@ -6,20 +6,36 @@
|
||||
</subtitle>
|
||||
</info>
|
||||
<xi:include href="introduction.chapter.xml" />
|
||||
<xi:include href="quick-start.xml" />
|
||||
<xi:include href="package-specific-user-notes.xml" />
|
||||
<xi:include href="stdenv.xml" />
|
||||
<xi:include href="multiple-output.xml" />
|
||||
<xi:include href="cross-compilation.xml" />
|
||||
<xi:include href="configuration.xml" />
|
||||
<xi:include href="functions.xml" />
|
||||
<xi:include href="meta.xml" />
|
||||
<xi:include href="languages-frameworks/index.xml" />
|
||||
<xi:include href="platform-notes.xml" />
|
||||
<xi:include href="package-notes.xml" />
|
||||
<xi:include href="overlays.xml" />
|
||||
<xi:include href="coding-conventions.xml" />
|
||||
<xi:include href="submitting-changes.xml" />
|
||||
<xi:include href="reviewing-contributions.xml" />
|
||||
<xi:include href="contributing.xml" />
|
||||
<part>
|
||||
<title>Using Nixpkgs</title>
|
||||
<xi:include href="configuration.xml" />
|
||||
<xi:include href="overlays.xml" />
|
||||
<xi:include href="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" />
|
||||
</part>
|
||||
<part>
|
||||
<title>Builders</title>
|
||||
<xi:include href="builders/fetchers.xml" />
|
||||
<xi:include href="builders/trivial-builders.xml" />
|
||||
<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" />
|
||||
</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" />
|
||||
</part>
|
||||
</book>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xml:id="sec-overrides">
|
||||
xml:id="chap-overrides">
|
||||
<title>Overriding</title>
|
||||
|
||||
<para>
|
||||
@ -148,4 +148,4 @@ c = lib.makeOverridable f { a = 1; b = 2; };
|
||||
The variable <varname>c</varname> however also has some additional functions, like <link linkend="sec-pkg-override">c.override</link> which can be used to override the default arguments. In this example the value of <varname>(c.override { a = 4; }).result</varname> is 6.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
</chapter>
|
@ -1,422 +0,0 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-package-notes">
|
||||
<title>Package Notes</title>
|
||||
<para>
|
||||
This chapter contains information about how to use and maintain the Nix expressions for a number of specific packages, such as the Linux kernel or X.org.
|
||||
</para>
|
||||
<!--============================================================-->
|
||||
<section 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>
|
||||
<!--============================================================-->
|
||||
<section 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>
|
||||
<!--============================================================-->
|
||||
<!--
|
||||
<section xml:id="sec-package-notes-gnome">
|
||||
<title>Gnome</title>
|
||||
<para>* Expression is auto-generated</para>
|
||||
<para>* How to update</para>
|
||||
</section>
|
||||
-->
|
||||
<!--============================================================-->
|
||||
<!--
|
||||
<section xml:id="sec-package-notes-gcc">
|
||||
<title>GCC</title>
|
||||
<para>…</para>
|
||||
</section>
|
||||
-->
|
||||
<!--============================================================-->
|
||||
<section 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>
|
||||
<section 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>
|
||||
<section xml:id="sec-kakoune">
|
||||
<title>Kakoune</title>
|
||||
|
||||
<para>
|
||||
Kakoune can be built to autoload plugins:
|
||||
<programlisting>(kakoune.override {
|
||||
configure = {
|
||||
plugins = with pkgs.kakounePlugins; [ parinfer-rust ];
|
||||
};
|
||||
})</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
<section 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>
|
||||
<section 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>
|
||||
<section 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>
|
||||
<section 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>
|
||||
</chapter>
|
@ -1,357 +0,0 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="package-specific-user-notes">
|
||||
<title>Package-specific usage notes</title>
|
||||
<para>
|
||||
These chapters includes some notes that apply to specific packages and should answer some of the frequently asked questions related to Nixpkgs use. Some useful information related to package use can be found in <link linkend="chap-package-notes">package-specific development notes</link>.
|
||||
</para>
|
||||
<section xml:id="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>
|
||||
<section xml:id="locales">
|
||||
<title>Locales</title>
|
||||
|
||||
<para>
|
||||
To allow simultaneous use of packages linked against different versions of <literal>glibc</literal> with different locale archive formats Nixpkgs patches <literal>glibc</literal> to rely on <literal>LOCALE_ARCHIVE</literal> environment variable.
|
||||
</para>
|
||||
|
||||
<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 xml:id="sec-emacs">
|
||||
<title>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>
|
||||
|
||||
<screen>
|
||||
{
|
||||
packageOverrides = pkgs: with pkgs; {
|
||||
myEmacs = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [
|
||||
company
|
||||
counsel
|
||||
flycheck
|
||||
ivy
|
||||
magit
|
||||
projectile
|
||||
use-package
|
||||
]));
|
||||
}
|
||||
}
|
||||
</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>
|
||||
|
||||
<screen>
|
||||
{
|
||||
packageOverrides = pkgs: with pkgs; rec {
|
||||
myEmacsConfig = writeText "default.el" ''
|
||||
;; initialize package
|
||||
|
||||
(require 'package)
|
||||
(package-initialize 'noactivate)
|
||||
(eval-when-compile
|
||||
(require 'use-package))
|
||||
|
||||
;; load some packages
|
||||
|
||||
(use-package company
|
||||
:bind ("<C-tab>" . company-complete)
|
||||
:diminish company-mode
|
||||
:commands (company-mode global-company-mode)
|
||||
:defer 1
|
||||
:config
|
||||
(global-company-mode))
|
||||
|
||||
(use-package counsel
|
||||
:commands (counsel-descbinds)
|
||||
:bind (([remap execute-extended-command] . counsel-M-x)
|
||||
("C-x C-f" . counsel-find-file)
|
||||
("C-c g" . counsel-git)
|
||||
("C-c j" . counsel-git-grep)
|
||||
("C-c k" . counsel-ag)
|
||||
("C-x l" . counsel-locate)
|
||||
("M-y" . counsel-yank-pop)))
|
||||
|
||||
(use-package flycheck
|
||||
:defer 2
|
||||
:config (global-flycheck-mode))
|
||||
|
||||
(use-package ivy
|
||||
:defer 1
|
||||
:bind (("C-c C-r" . ivy-resume)
|
||||
("C-x C-b" . ivy-switch-buffer)
|
||||
:map ivy-minibuffer-map
|
||||
("C-j" . ivy-call))
|
||||
:diminish ivy-mode
|
||||
:commands ivy-mode
|
||||
:config
|
||||
(ivy-mode 1))
|
||||
|
||||
(use-package magit
|
||||
:defer
|
||||
:if (executable-find "git")
|
||||
:bind (("C-x g" . magit-status)
|
||||
("C-x G" . magit-dispatch-popup))
|
||||
:init
|
||||
(setq magit-completing-read-function 'ivy-completing-read))
|
||||
|
||||
(use-package projectile
|
||||
:commands projectile-mode
|
||||
:bind-keymap ("C-c p" . projectile-command-map)
|
||||
:defer 5
|
||||
:config
|
||||
(projectile-global-mode))
|
||||
'';
|
||||
myEmacs = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [
|
||||
(runCommand "default.el" {} ''
|
||||
mkdir -p $out/share/emacs/site-lisp
|
||||
cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el
|
||||
'')
|
||||
company
|
||||
counsel
|
||||
flycheck
|
||||
ivy
|
||||
magit
|
||||
projectile
|
||||
use-package
|
||||
]));
|
||||
};
|
||||
}
|
||||
</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>
|
||||
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 {
|
||||
haskell-mode = self.melpaPackages.haskell-mode;
|
||||
...
|
||||
};
|
||||
((emacsPackagesGen emacs).overrideScope' overrides).emacsWithPackages (p: with p; [
|
||||
# here both these package will use haskell-mode of our own choice
|
||||
ghc-mod
|
||||
dante
|
||||
])
|
||||
</screen>
|
||||
</section>
|
||||
</section>
|
||||
<section xml:id="dlib">
|
||||
<title>DLib</title>
|
||||
|
||||
<para>
|
||||
<link xlink:href="http://dlib.net/">DLib</link> is a modern, C++-based toolkit which provides several machine learning algorithms.
|
||||
</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>
|
||||
<section xml:id="unfree-software">
|
||||
<title>Unfree software</title>
|
||||
|
||||
<para>
|
||||
All users of Nixpkgs are free software users, and many users (and developers) of Nixpkgs want to limit and tightly control their exposure to unfree software. At the same time, many users need (or want) to run some specific pieces of proprietary software. Nixpkgs includes some expressions for unfree software packages. By default unfree software cannot be installed and doesn’t show up in searches. To allow installing unfree software in a single Nix invocation one can export <literal>NIXPKGS_ALLOW_UNFREE=1</literal>. For a persistent solution, users can set <literal>allowUnfree</literal> in the Nixpkgs configuration.
|
||||
</para>
|
||||
|
||||
<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 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>
|
||||
<section xml:id="sec-citrix">
|
||||
<title>Citrix Receiver & Citrix Workspace App</title>
|
||||
|
||||
<para>
|
||||
<note>
|
||||
<para>
|
||||
Please note that the <literal>citrix_receiver</literal> package has been deprecated since its development was <link xlink:href="https://docs.citrix.com/en-us/citrix-workspace-app.html">discontinued by upstream</link> and has been replaced by <link xlink:href="https://www.citrix.com/products/workspace-app/">the citrix workspace app</link>.
|
||||
</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>
|
||||
</chapter>
|
44
doc/packages/citrix.xml
Normal file
44
doc/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/packages/dlib.xml
Normal file
24
doc/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/packages/eclipse.xml
Normal file
72
doc/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/packages/elm.xml
Normal file
17
doc/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>
|
131
doc/packages/emacs.xml
Normal file
131
doc/packages/emacs.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-emacs">
|
||||
<title>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>
|
||||
|
||||
<screen>
|
||||
{
|
||||
packageOverrides = pkgs: with pkgs; {
|
||||
myEmacs = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [
|
||||
company
|
||||
counsel
|
||||
flycheck
|
||||
ivy
|
||||
magit
|
||||
projectile
|
||||
use-package
|
||||
]));
|
||||
}
|
||||
}
|
||||
</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>
|
||||
|
||||
<screen>
|
||||
{
|
||||
packageOverrides = pkgs: with pkgs; rec {
|
||||
myEmacsConfig = writeText "default.el" ''
|
||||
;; initialize package
|
||||
|
||||
(require 'package)
|
||||
(package-initialize 'noactivate)
|
||||
(eval-when-compile
|
||||
(require 'use-package))
|
||||
|
||||
;; load some packages
|
||||
|
||||
(use-package company
|
||||
:bind ("<C-tab>" . company-complete)
|
||||
:diminish company-mode
|
||||
:commands (company-mode global-company-mode)
|
||||
:defer 1
|
||||
:config
|
||||
(global-company-mode))
|
||||
|
||||
(use-package counsel
|
||||
:commands (counsel-descbinds)
|
||||
:bind (([remap execute-extended-command] . counsel-M-x)
|
||||
("C-x C-f" . counsel-find-file)
|
||||
("C-c g" . counsel-git)
|
||||
("C-c j" . counsel-git-grep)
|
||||
("C-c k" . counsel-ag)
|
||||
("C-x l" . counsel-locate)
|
||||
("M-y" . counsel-yank-pop)))
|
||||
|
||||
(use-package flycheck
|
||||
:defer 2
|
||||
:config (global-flycheck-mode))
|
||||
|
||||
(use-package ivy
|
||||
:defer 1
|
||||
:bind (("C-c C-r" . ivy-resume)
|
||||
("C-x C-b" . ivy-switch-buffer)
|
||||
:map ivy-minibuffer-map
|
||||
("C-j" . ivy-call))
|
||||
:diminish ivy-mode
|
||||
:commands ivy-mode
|
||||
:config
|
||||
(ivy-mode 1))
|
||||
|
||||
(use-package magit
|
||||
:defer
|
||||
:if (executable-find "git")
|
||||
:bind (("C-x g" . magit-status)
|
||||
("C-x G" . magit-dispatch-popup))
|
||||
:init
|
||||
(setq magit-completing-read-function 'ivy-completing-read))
|
||||
|
||||
(use-package projectile
|
||||
:commands projectile-mode
|
||||
:bind-keymap ("C-c p" . projectile-command-map)
|
||||
:defer 5
|
||||
:config
|
||||
(projectile-global-mode))
|
||||
'';
|
||||
myEmacs = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [
|
||||
(runCommand "default.el" {} ''
|
||||
mkdir -p $out/share/emacs/site-lisp
|
||||
cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el
|
||||
'')
|
||||
company
|
||||
counsel
|
||||
flycheck
|
||||
ivy
|
||||
magit
|
||||
projectile
|
||||
use-package
|
||||
]));
|
||||
};
|
||||
}
|
||||
</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>
|
||||
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 {
|
||||
haskell-mode = self.melpaPackages.haskell-mode;
|
||||
...
|
||||
};
|
||||
((emacsPackagesGen emacs).overrideScope' overrides).emacsWithPackages (p: with p; [
|
||||
# here both these package will use haskell-mode of our own choice
|
||||
ghc-mod
|
||||
dante
|
||||
])
|
||||
</screen>
|
||||
</section>
|
||||
</section>
|
57
doc/packages/ibus.xml
Normal file
57
doc/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>
|
23
doc/packages/index.xml
Normal file
23
doc/packages/index.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xml:id="chap-packages">
|
||||
<title>Packages</title>
|
||||
<para>
|
||||
This chapter contains information about how to use and maintain the Nix expressions for a number of specific packages, such as the Linux kernel or X.org.
|
||||
</para>
|
||||
<xi:include href="citrix.xml" />
|
||||
<xi:include href="dlib.xml" />
|
||||
<xi:include href="eclipse.xml" />
|
||||
<xi:include href="elm.xml" />
|
||||
<xi:include href="emacs.xml" />
|
||||
<xi:include href="ibus.xml" />
|
||||
<xi:include href="kakoune.xml" />
|
||||
<xi:include href="linux.xml" />
|
||||
<xi:include href="locales.xml" />
|
||||
<xi:include href="nginx.xml" />
|
||||
<xi:include href="opengl.xml" />
|
||||
<xi:include href="shell-helpers.xml" />
|
||||
<xi:include href="steam.xml" />
|
||||
<xi:include href="weechat.xml" />
|
||||
<xi:include href="xorg.xml" />
|
||||
</chapter>
|
14
doc/packages/kakoune.xml
Normal file
14
doc/packages/kakoune.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="sec-kakoune">
|
||||
<title>Kakoune</title>
|
||||
|
||||
<para>
|
||||
Kakoune can be built to autoload plugins:
|
||||
<programlisting>(kakoune.override {
|
||||
configure = {
|
||||
plugins = with pkgs.kakounePlugins; [ parinfer-rust ];
|
||||
};
|
||||
})</programlisting>
|
||||
</para>
|
||||
</section>
|
85
doc/packages/linux.xml
Normal file
85
doc/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>
|
13
doc/packages/locales.xml
Normal file
13
doc/packages/locales.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="locales">
|
||||
<title>Locales</title>
|
||||
|
||||
<para>
|
||||
To allow simultaneous use of packages linked against different versions of <literal>glibc</literal> with different locale archive formats Nixpkgs patches <literal>glibc</literal> to rely on <literal>LOCALE_ARCHIVE</literal> environment variable.
|
||||
</para>
|
||||
|
||||
<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>
|
25
doc/packages/nginx.xml
Normal file
25
doc/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/packages/opengl.xml
Normal file
9
doc/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/packages/shell-helpers.xml
Normal file
25
doc/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/packages/steam.xml
Normal file
131
doc/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>
|
13
doc/packages/unfree.xml
Normal file
13
doc/packages/unfree.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="unfree-software">
|
||||
<title>Unfree software</title>
|
||||
|
||||
<para>
|
||||
All users of Nixpkgs are free software users, and many users (and developers) of Nixpkgs want to limit and tightly control their exposure to unfree software. At the same time, many users need (or want) to run some specific pieces of proprietary software. Nixpkgs includes some expressions for unfree software packages. By default unfree software cannot be installed and doesn’t show up in searches. To allow installing unfree software in a single Nix invocation one can export <literal>NIXPKGS_ALLOW_UNFREE=1</literal>. For a persistent solution, users can set <literal>allowUnfree</literal> in the Nixpkgs configuration.
|
||||
</para>
|
||||
|
||||
<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>
|
85
doc/packages/weechat.xml
Normal file
85
doc/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/packages/xorg.xml
Normal file
34
doc/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>
|
@ -1,6 +1,6 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-platform-nodes">
|
||||
xml:id="chap-platform-notes">
|
||||
<title>Platform Notes</title>
|
||||
<section xml:id="sec-darwin">
|
||||
<title>Darwin (macOS)</title>
|
||||
|
@ -2,7 +2,7 @@
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="sec-reviewing-contributions">
|
||||
xml:id="chap-reviewing-contributions">
|
||||
<title>Reviewing contributions</title>
|
||||
<warning>
|
||||
<para>
|
||||
|
@ -57,8 +57,8 @@ let
|
||||
hasAttr head isAttrs isBool isInt isList isString length
|
||||
lessThan listToAttrs pathExists readFile replaceStrings seq
|
||||
stringLength sub substring tail;
|
||||
inherit (trivial) id const concat or and bitAnd bitOr bitXor bitNot
|
||||
boolToString mergeAttrs flip mapNullable inNixShell min max
|
||||
inherit (trivial) id const pipe concat or and bitAnd bitOr bitXor
|
||||
bitNot boolToString mergeAttrs flip mapNullable inNixShell min max
|
||||
importJSON warn info showWarnings nixpkgsVersion version mod compare
|
||||
splitByAndCompare functionArgs setFunctionArgs isFunction;
|
||||
inherit (fixedPoints) fix fix' converge extends composeExtensions
|
||||
|
@ -18,6 +18,31 @@ runTests {
|
||||
expected = 2;
|
||||
};
|
||||
|
||||
testPipe = {
|
||||
expr = pipe 2 [
|
||||
(x: x + 2) # 2 + 2 = 4
|
||||
(x: x * 2) # 4 * 2 = 8
|
||||
];
|
||||
expected = 8;
|
||||
};
|
||||
|
||||
testPipeEmpty = {
|
||||
expr = pipe 2 [];
|
||||
expected = 2;
|
||||
};
|
||||
|
||||
testPipeStrings = {
|
||||
expr = pipe [ 3 4 ] [
|
||||
(map toString)
|
||||
(map (s: s + "\n"))
|
||||
concatStrings
|
||||
];
|
||||
expected = ''
|
||||
3
|
||||
4
|
||||
'';
|
||||
};
|
||||
|
||||
/*
|
||||
testOr = {
|
||||
expr = or true false;
|
||||
|
@ -29,6 +29,43 @@ rec {
|
||||
# Value to ignore
|
||||
y: x;
|
||||
|
||||
/* Pipes a value through a list of functions, left to right.
|
||||
|
||||
Type: pipe :: a -> [<functions>] -> <return type of last function>
|
||||
Example:
|
||||
pipe 2 [
|
||||
(x: x + 2) # 2 + 2 = 4
|
||||
(x: x * 2) # 4 * 2 = 8
|
||||
]
|
||||
=> 8
|
||||
|
||||
# ideal to do text transformations
|
||||
pipe [ "a/b" "a/c" ] [
|
||||
|
||||
# create the cp command
|
||||
(map (file: ''cp "${src}/${file}" $out\n''))
|
||||
|
||||
# concatenate all commands into one string
|
||||
lib.concatStrings
|
||||
|
||||
# make that string into a nix derivation
|
||||
(pkgs.runCommand "copy-to-out" {})
|
||||
|
||||
]
|
||||
=> <drv which copies all files to $out>
|
||||
|
||||
The output type of each function has to be the input type
|
||||
of the next function, and the last function returns the
|
||||
final value.
|
||||
*/
|
||||
pipe = val: functions:
|
||||
let reverseApply = x: f: f x;
|
||||
in builtins.foldl' reverseApply val functions;
|
||||
/* note please don’t add a function like `compose = flip pipe`.
|
||||
This would confuse users, because the order of the functions
|
||||
in the list is not clear. With pipe, it’s obvious that it
|
||||
goes first-to-last. With `compose`, not so much.
|
||||
*/
|
||||
|
||||
## Named versions corresponding to some builtin operators.
|
||||
|
||||
|
@ -1432,6 +1432,16 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
dadada = {
|
||||
name = "dadada";
|
||||
email = "dadada@dadada.li";
|
||||
github = "dadada";
|
||||
githubId = 7216772;
|
||||
keys = [{
|
||||
longkeyid = "ed25519/0xEEB8D1CE62C4DFEA";
|
||||
fingerprint = "D68C 8469 5C08 7E0F 733A 28D0 EEB8 D1CE 62C4 DFEA";
|
||||
}];
|
||||
};
|
||||
dalance = {
|
||||
email = "dalance@gmail.com";
|
||||
github = "dalance";
|
||||
|
@ -190,6 +190,13 @@
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<xref linkend="opt-services.blueman.enable"/> has been added.
|
||||
If you previously had blueman installed via <option>environment.systemPackages</option> please
|
||||
migrate to using the NixOS module, as this would result in an insufficiently configured blueman.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</section>
|
||||
@ -563,6 +570,27 @@
|
||||
earlier version of NixOS.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Due to the short lifetime of non-LTS kernel releases package attributes like <literal>linux_5_1</literal>,
|
||||
<literal>linux_5_2</literal> and <literal>linux_5_3</literal> have been removed to discourage dependence
|
||||
on specific non-LTS kernel versions in stable NixOS releases.
|
||||
|
||||
Going forward, versioned attributes like <literal>linux_4_9</literal> will exist for LTS versions only.
|
||||
Please use <literal>linux_latest</literal> or <literal>linux_testing</literal> if you depend on non-LTS
|
||||
releases. Keep in mind that <literal>linux_latest</literal> and <literal>linux_testing</literal> will
|
||||
change versions under the hood during the lifetime of a stable release and might include breaking changes.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Because of the systemd upgrade,
|
||||
some network interfaces might change their name. For details see
|
||||
<link xlink:href="https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.html#History">
|
||||
upstream docs</link> or <link xlink:href="https://github.com/NixOS/nixpkgs/issues/71086">
|
||||
our ticket</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
|
@ -94,6 +94,21 @@
|
||||
GnuPG anyway.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <literal>dynamicHosts</literal> option has been removed from the
|
||||
<link linkend="opt-networking.networkmanager.enable">networkd</link>
|
||||
module. Allowing (multiple) regular users to override host entries
|
||||
affecting the whole system opens up a huge attack vector.
|
||||
There seem to be very rare cases where this might be useful.
|
||||
Consider setting system-wide host entries using
|
||||
<link linkend="opt-networking.hosts">networking.hosts</link>, provide
|
||||
them via the DNS server in your network, or use
|
||||
<link linkend="opt-environment.etc">environment.etc</link>
|
||||
to add a file into <literal>/etc/NetworkManager/dnsmasq.d</literal>
|
||||
reconfiguring <literal>hostsdir</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
|
@ -31,6 +31,8 @@ with lib;
|
||||
|
||||
config = mkIf config.programs.seahorse.enable {
|
||||
|
||||
programs.ssh.askPassword = mkDefault "${pkgs.gnome3.seahorse}/libexec/seahorse/ssh-askpass";
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.gnome3.seahorse
|
||||
];
|
||||
|
@ -242,8 +242,8 @@ in
|
||||
environment.variables = hydraEnv;
|
||||
|
||||
nix.extraOptions = ''
|
||||
gc-keep-outputs = true
|
||||
gc-keep-derivations = true
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
|
||||
# The default (`true') slows Nix down a lot since the build farm
|
||||
# has so many GC roots.
|
||||
|
@ -186,9 +186,9 @@ in
|
||||
|
||||
config = mkIf config.services.redis.enable {
|
||||
|
||||
boot.kernel.sysctl = mkIf cfg.vmOverCommit {
|
||||
"vm.overcommit_memory" = "1";
|
||||
};
|
||||
boot.kernel.sysctl = {
|
||||
"vm.nr_hugepages" = "0";
|
||||
} // mkIf cfg.vmOverCommit { "vm.overcommit_memory" = "1"; };
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [ cfg.port ];
|
||||
@ -198,14 +198,6 @@ in
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
systemd.services.disable-transparent-huge-pages = {
|
||||
description = "Disable Transparent Huge Pages (required by Redis)";
|
||||
before = [ "redis.service" ];
|
||||
wantedBy = [ "redis.service" ];
|
||||
script = "echo never > /sys/kernel/mm/transparent_hugepage/enabled";
|
||||
serviceConfig.Type = "oneshot";
|
||||
};
|
||||
|
||||
systemd.services.redis =
|
||||
{ description = "Redis Server";
|
||||
|
||||
|
@ -33,6 +33,9 @@ with lib;
|
||||
pkgs.system-config-printer
|
||||
];
|
||||
|
||||
# for $out/bin/install-printer-driver
|
||||
services.packagekit.enable = true;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -666,7 +666,6 @@ in {
|
||||
"d ${gitlabConfig.production.shared.path}/artifacts 0750 ${cfg.user} ${cfg.group} -"
|
||||
"d ${gitlabConfig.production.shared.path}/lfs-objects 0750 ${cfg.user} ${cfg.group} -"
|
||||
"d ${gitlabConfig.production.shared.path}/pages 0750 ${cfg.user} ${cfg.group} -"
|
||||
"L+ ${cfg.statePath}/lib - - - - ${cfg.packages.gitlab}/share/gitlab/lib"
|
||||
"L+ /run/gitlab/config - - - - ${cfg.statePath}/config"
|
||||
"L+ /run/gitlab/log - - - - ${cfg.statePath}/log"
|
||||
"L+ /run/gitlab/tmp - - - - ${cfg.statePath}/tmp"
|
||||
|
@ -152,8 +152,8 @@ in
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
gc-keep-outputs = true
|
||||
gc-keep-derivations = true
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
'';
|
||||
description = "Additional text appended to <filename>nix.conf</filename>.";
|
||||
};
|
||||
|
@ -16,13 +16,29 @@ let
|
||||
NotifyLevel "OKAY"
|
||||
</Plugin>
|
||||
|
||||
${concatStrings (mapAttrsToList (plugin: pluginConfig: ''
|
||||
LoadPlugin ${plugin}
|
||||
<Plugin "${plugin}">
|
||||
${pluginConfig}
|
||||
</Plugin>
|
||||
'') cfg.plugins)}
|
||||
|
||||
${concatMapStrings (f: ''
|
||||
Include "${f}"
|
||||
Include "${f}"
|
||||
'') cfg.include}
|
||||
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
|
||||
package =
|
||||
if cfg.buildMinimalPackage
|
||||
then minimalPackage
|
||||
else cfg.package;
|
||||
|
||||
minimalPackage = cfg.package.override {
|
||||
enabledPlugins = [ "syslog" ] ++ builtins.attrNames cfg.plugins;
|
||||
};
|
||||
|
||||
in {
|
||||
options.services.collectd = with types; {
|
||||
enable = mkEnableOption "collectd agent";
|
||||
@ -33,7 +49,15 @@ in {
|
||||
description = ''
|
||||
Which collectd package to use.
|
||||
'';
|
||||
type = package;
|
||||
type = types.package;
|
||||
};
|
||||
|
||||
buildMinimalPackage = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
Build a minimal collectd package with only the configured `services.collectd.plugins`
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
@ -68,6 +92,15 @@ in {
|
||||
type = listOf str;
|
||||
};
|
||||
|
||||
plugins = mkOption {
|
||||
default = {};
|
||||
example = { cpu = ""; memory = ""; network = "Server 192.168.1.1 25826"; };
|
||||
description = ''
|
||||
Attribute set of plugin names to plugin config segments
|
||||
'';
|
||||
type = types.attrsOf types.str;
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
description = ''
|
||||
@ -89,7 +122,7 @@ in {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.package}/sbin/collectd -C ${conf} -f";
|
||||
ExecStart = "${package}/sbin/collectd -C ${conf} -f";
|
||||
User = cfg.user;
|
||||
Restart = "on-failure";
|
||||
RestartSec = 3;
|
||||
|
@ -17,9 +17,6 @@ let
|
||||
networkmanager-vpnc
|
||||
] ++ optional (!delegateWireless && !enableIwd) wpa_supplicant;
|
||||
|
||||
dynamicHostsEnabled =
|
||||
cfg.dynamicHosts.enable && cfg.dynamicHosts.hostsDirs != {};
|
||||
|
||||
delegateWireless = config.networking.wireless.enable == true && cfg.unmanaged != [];
|
||||
|
||||
enableIwd = cfg.wifi.backend == "iwd";
|
||||
@ -335,55 +332,20 @@ in {
|
||||
so you don't need to to that yourself.
|
||||
'';
|
||||
};
|
||||
|
||||
dynamicHosts = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enabling this option requires the
|
||||
<option>networking.networkmanager.dns</option> option to be
|
||||
set to <literal>dnsmasq</literal>. If enabled, the directories
|
||||
defined by the
|
||||
<option>networking.networkmanager.dynamicHosts.hostsDirs</option>
|
||||
option will be set up when the service starts. The dnsmasq instance
|
||||
managed by NetworkManager will then watch those directories for
|
||||
hosts files (see the <literal>--hostsdir</literal> option of
|
||||
dnsmasq). This way a non-privileged user can add or override DNS
|
||||
entries on the local system (depending on what hosts directories
|
||||
that are configured)..
|
||||
'';
|
||||
};
|
||||
hostsDirs = mkOption {
|
||||
type = with types; attrsOf (submodule {
|
||||
options = {
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "root";
|
||||
description = ''
|
||||
The user that will own the hosts directory.
|
||||
'';
|
||||
};
|
||||
group = mkOption {
|
||||
type = types.str;
|
||||
default = "root";
|
||||
description = ''
|
||||
The group that will own the hosts directory.
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
default = {};
|
||||
description = ''
|
||||
Defines a set of directories (relative to
|
||||
<literal>/run/NetworkManager/hostdirs</literal>) that dnsmasq will
|
||||
watch for hosts files.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
(mkRemovedOptionModule ["networking" "networkmanager" "dynamicHosts"] ''
|
||||
This option was removed because allowing (multiple) regular users to
|
||||
override host entries affecting the whole system opens up a huge attack
|
||||
vector. There seem to be very rare cases where this might be useful.
|
||||
Consider setting system-wide host entries using networking.hosts, provide
|
||||
them via the DNS server in your network, or use environment.etc
|
||||
to add a file into /etc/NetworkManager/dnsmasq.d reconfiguring hostsdir.
|
||||
'')
|
||||
];
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
@ -396,12 +358,6 @@ in {
|
||||
Except if you mark some interfaces as <literal>unmanaged</literal> by NetworkManager.
|
||||
'';
|
||||
}
|
||||
{ assertion = !dynamicHostsEnabled || (dynamicHostsEnabled && cfg.dns == "dnsmasq");
|
||||
message = ''
|
||||
To use networking.networkmanager.dynamicHosts you also need to set
|
||||
`networking.networkmanager.dns = "dnsmasq"`
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
environment.etc = with pkgs; [
|
||||
@ -435,12 +391,6 @@ in {
|
||||
target = "NetworkManager/dispatcher.d/${dispatcherTypesSubdirMap.${s.type}}03userscript${lib.fixedWidthNumber 4 i}";
|
||||
mode = "0544";
|
||||
}) cfg.dispatcherScripts
|
||||
++ optional dynamicHostsEnabled
|
||||
{ target = "NetworkManager/dnsmasq.d/dyndns.conf";
|
||||
text = concatMapStrings (n: ''
|
||||
hostsdir=/run/NetworkManager/hostsdirs/${n}
|
||||
'') (attrNames cfg.dynamicHosts.hostsDirs);
|
||||
}
|
||||
++ optional cfg.enableStrongSwan
|
||||
{ source = "${pkgs.networkmanager_strongswan}/lib/NetworkManager/VPN/nm-strongswan-service.name";
|
||||
target = "NetworkManager/VPN/nm-strongswan-service.name";
|
||||
@ -496,21 +446,6 @@ in {
|
||||
|
||||
systemd.services.ModemManager.aliases = [ "dbus-org.freedesktop.ModemManager1.service" ];
|
||||
|
||||
systemd.services.nm-setup-hostsdirs = mkIf dynamicHostsEnabled {
|
||||
wantedBy = [ "NetworkManager.service" ];
|
||||
before = [ "NetworkManager.service" ];
|
||||
partOf = [ "NetworkManager.service" ];
|
||||
script = concatStrings (mapAttrsToList (n: d: ''
|
||||
mkdir -p "/run/NetworkManager/hostsdirs/${n}"
|
||||
chown "${d.user}:${d.group}" "/run/NetworkManager/hostsdirs/${n}"
|
||||
chmod 0775 "/run/NetworkManager/hostsdirs/${n}"
|
||||
'') cfg.dynamicHosts.hostsDirs);
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.NetworkManager-dispatcher = {
|
||||
wantedBy = [ "network.target" ];
|
||||
restartTriggers = [ configFile ];
|
||||
|
@ -31,70 +31,8 @@ let
|
||||
extraForeignModules = filter isAttrs extraModules;
|
||||
extraApacheModules = filter isString extraModules;
|
||||
|
||||
|
||||
makeServerInfo = cfg: {
|
||||
# Canonical name must not include a trailing slash.
|
||||
canonicalNames =
|
||||
let defaultPort = (head (defaultListen cfg)).port; in
|
||||
map (port:
|
||||
(if cfg.enableSSL then "https" else "http") + "://" +
|
||||
cfg.hostName +
|
||||
(if port != defaultPort then ":${toString port}" else "")
|
||||
) (map (x: x.port) (getListen cfg));
|
||||
|
||||
# Admin address: inherit from the main server if not specified for
|
||||
# a virtual host.
|
||||
adminAddr = if cfg.adminAddr != null then cfg.adminAddr else mainCfg.adminAddr;
|
||||
|
||||
vhostConfig = cfg;
|
||||
serverConfig = mainCfg;
|
||||
fullConfig = config; # machine config
|
||||
};
|
||||
|
||||
|
||||
allHosts = [mainCfg] ++ mainCfg.virtualHosts;
|
||||
|
||||
|
||||
callSubservices = serverInfo: defs:
|
||||
let f = svc:
|
||||
let
|
||||
svcFunction =
|
||||
if svc ? function then svc.function
|
||||
# instead of using serviceType="mediawiki"; you can copy mediawiki.nix to any location outside nixpkgs, modify it at will, and use serviceExpression=./mediawiki.nix;
|
||||
else if svc ? serviceExpression then import (toString svc.serviceExpression)
|
||||
else import (toString "${toString ./.}/${if svc ? serviceType then svc.serviceType else svc.serviceName}.nix");
|
||||
config = (evalModules
|
||||
{ modules = [ { options = res.options; config = svc.config or svc; } ];
|
||||
check = false;
|
||||
}).config;
|
||||
defaults = {
|
||||
extraConfig = "";
|
||||
extraModules = [];
|
||||
extraModulesPre = [];
|
||||
extraPath = [];
|
||||
extraServerPath = [];
|
||||
globalEnvVars = [];
|
||||
robotsEntries = "";
|
||||
startupScript = "";
|
||||
enablePHP = false;
|
||||
enablePerl = false;
|
||||
phpOptions = "";
|
||||
options = {};
|
||||
documentRoot = null;
|
||||
};
|
||||
res = defaults // svcFunction { inherit config lib pkgs serverInfo php; };
|
||||
in res;
|
||||
in map f defs;
|
||||
|
||||
|
||||
# !!! callSubservices is expensive
|
||||
subservicesFor = cfg: callSubservices (makeServerInfo cfg) cfg.extraSubservices;
|
||||
|
||||
mainSubservices = subservicesFor mainCfg;
|
||||
|
||||
allSubservices = mainSubservices ++ concatMap subservicesFor mainCfg.virtualHosts;
|
||||
|
||||
|
||||
enableSSL = any (vhost: vhost.enableSSL) allHosts;
|
||||
|
||||
|
||||
@ -188,13 +126,18 @@ let
|
||||
|
||||
perServerConf = isMainServer: cfg: let
|
||||
|
||||
serverInfo = makeServerInfo cfg;
|
||||
|
||||
subservices = callSubservices serverInfo cfg.extraSubservices;
|
||||
# Canonical name must not include a trailing slash.
|
||||
canonicalNames =
|
||||
let defaultPort = (head (defaultListen cfg)).port; in
|
||||
map (port:
|
||||
(if cfg.enableSSL then "https" else "http") + "://" +
|
||||
cfg.hostName +
|
||||
(if port != defaultPort then ":${toString port}" else "")
|
||||
) (map (x: x.port) (getListen cfg));
|
||||
|
||||
maybeDocumentRoot = fold (svc: acc:
|
||||
if acc == null then svc.documentRoot else assert svc.documentRoot == null; acc
|
||||
) null ([ cfg ] ++ subservices);
|
||||
) null ([ cfg ]);
|
||||
|
||||
documentRoot = if maybeDocumentRoot != null then maybeDocumentRoot else
|
||||
pkgs.runCommand "empty" { preferLocalBuild = true; } "mkdir -p $out";
|
||||
@ -209,15 +152,11 @@ let
|
||||
</Directory>
|
||||
'';
|
||||
|
||||
robotsTxt =
|
||||
concatStringsSep "\n" (filter (x: x != "") (
|
||||
# If this is a vhost, the include the entries for the main server as well.
|
||||
(if isMainServer then [] else [mainCfg.robotsEntries] ++ map (svc: svc.robotsEntries) mainSubservices)
|
||||
++ [cfg.robotsEntries]
|
||||
++ (map (svc: svc.robotsEntries) subservices)));
|
||||
# If this is a vhost, the include the entries for the main server as well.
|
||||
robotsTxt = concatStringsSep "\n" (filter (x: x != "") ([ cfg.robotsEntries ] ++ lib.optional (!isMainServer) mainCfg.robotsEntries));
|
||||
|
||||
in ''
|
||||
${concatStringsSep "\n" (map (n: "ServerName ${n}") serverInfo.canonicalNames)}
|
||||
${concatStringsSep "\n" (map (n: "ServerName ${n}") canonicalNames)}
|
||||
|
||||
${concatMapStrings (alias: "ServerAlias ${alias}\n") cfg.serverAliases}
|
||||
|
||||
@ -292,8 +231,6 @@ let
|
||||
in concatMapStrings makeDirConf cfg.servedDirs
|
||||
}
|
||||
|
||||
${concatMapStrings (svc: svc.extraConfig) subservices}
|
||||
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
|
||||
@ -328,13 +265,10 @@ let
|
||||
|
||||
${let
|
||||
load = {name, path}: "LoadModule ${name}_module ${path}\n";
|
||||
allModules =
|
||||
concatMap (svc: svc.extraModulesPre) allSubservices
|
||||
++ map (name: {inherit name; path = "${httpd}/modules/mod_${name}.so";}) apacheModules
|
||||
allModules = map (name: {inherit name; path = "${httpd}/modules/mod_${name}.so";}) apacheModules
|
||||
++ optional mainCfg.enableMellon { name = "auth_mellon"; path = "${pkgs.apacheHttpdPackages.mod_auth_mellon}/modules/mod_auth_mellon.so"; }
|
||||
++ optional enablePHP { name = "php${phpMajorVersion}"; path = "${php}/modules/libphp${phpMajorVersion}.so"; }
|
||||
++ optional enablePerl { name = "perl"; path = "${mod_perl}/modules/mod_perl.so"; }
|
||||
++ concatMap (svc: svc.extraModules) allSubservices
|
||||
++ optional mainCfg.enablePHP { name = "php${phpMajorVersion}"; path = "${php}/modules/libphp${phpMajorVersion}.so"; }
|
||||
++ optional mainCfg.enablePerl { name = "perl"; path = "${mod_perl}/modules/mod_perl.so"; }
|
||||
++ extraForeignModules;
|
||||
in concatMapStrings load (unique allModules)
|
||||
}
|
||||
@ -385,17 +319,10 @@ let
|
||||
}
|
||||
'';
|
||||
|
||||
|
||||
enablePHP = mainCfg.enablePHP || any (svc: svc.enablePHP) allSubservices;
|
||||
|
||||
enablePerl = mainCfg.enablePerl || any (svc: svc.enablePerl) allSubservices;
|
||||
|
||||
|
||||
# Generate the PHP configuration file. Should probably be factored
|
||||
# out into a separate module.
|
||||
phpIni = pkgs.runCommand "php.ini"
|
||||
{ options = concatStringsSep "\n"
|
||||
([ mainCfg.phpOptions ] ++ (map (svc: svc.phpOptions) allSubservices));
|
||||
{ options = mainCfg.phpOptions;
|
||||
preferLocalBuild = true;
|
||||
}
|
||||
''
|
||||
@ -408,6 +335,10 @@ in
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
(mkRemovedOptionModule [ "services" "httpd" "extraSubservices" ] "Most existing subservices have been ported to the NixOS module system. Please update your configuration accordingly.")
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
@ -637,8 +568,6 @@ in
|
||||
message = "SSL is enabled for httpd, but sslServerCert and/or sslServerKey haven't been specified."; }
|
||||
];
|
||||
|
||||
warnings = map (cfg: "apache-httpd's extraSubservices option is deprecated. Most existing subservices have been ported to the NixOS module system. Please update your configuration accordingly.") (lib.filter (cfg: cfg.extraSubservices != []) allHosts);
|
||||
|
||||
users.users = optionalAttrs (mainCfg.user == "wwwrun") (singleton
|
||||
{ name = "wwwrun";
|
||||
group = mainCfg.group;
|
||||
@ -651,7 +580,7 @@ in
|
||||
gid = config.ids.gids.wwwrun;
|
||||
});
|
||||
|
||||
environment.systemPackages = [httpd] ++ concatMap (svc: svc.extraPath) allSubservices;
|
||||
environment.systemPackages = [httpd];
|
||||
|
||||
services.httpd.phpOptions =
|
||||
''
|
||||
@ -674,13 +603,11 @@ in
|
||||
|
||||
path =
|
||||
[ httpd pkgs.coreutils pkgs.gnugrep ]
|
||||
++ optional enablePHP pkgs.system-sendmail # Needed for PHP's mail() function.
|
||||
++ concatMap (svc: svc.extraServerPath) allSubservices;
|
||||
++ optional mainCfg.enablePHP pkgs.system-sendmail; # Needed for PHP's mail() function.
|
||||
|
||||
environment =
|
||||
optionalAttrs enablePHP { PHPRC = phpIni; }
|
||||
// optionalAttrs mainCfg.enableMellon { LD_LIBRARY_PATH = "${pkgs.xmlsec}/lib"; }
|
||||
// (listToAttrs (concatMap (svc: svc.globalEnvVars) allSubservices));
|
||||
optionalAttrs mainCfg.enablePHP { PHPRC = phpIni; }
|
||||
// optionalAttrs mainCfg.enableMellon { LD_LIBRARY_PATH = "${pkgs.xmlsec}/lib"; };
|
||||
|
||||
preStart =
|
||||
''
|
||||
@ -698,12 +625,6 @@ in
|
||||
for i in $(${pkgs.utillinux}/bin/ipcs -s | grep ' ${mainCfg.user} ' | cut -f2 -d ' '); do
|
||||
${pkgs.utillinux}/bin/ipcrm -s $i
|
||||
done
|
||||
|
||||
# Run the startup hooks for the subservices.
|
||||
for i in ${toString (map (svn: svn.startupScript) allSubservices)}; do
|
||||
echo Running Apache startup hook $i...
|
||||
$i
|
||||
done
|
||||
'';
|
||||
|
||||
serviceConfig.ExecStart = "@${httpd}/bin/httpd httpd -f ${httpdConf}";
|
||||
|
@ -133,12 +133,6 @@ with lib;
|
||||
'';
|
||||
};
|
||||
|
||||
extraSubservices = mkOption {
|
||||
type = types.listOf types.unspecified;
|
||||
default = [];
|
||||
description = "Extra subservices to enable in the webserver.";
|
||||
};
|
||||
|
||||
enableUserDir = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
@ -3,12 +3,12 @@
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.9.17";
|
||||
version = "0.9.18";
|
||||
pname = "drumgizmo";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.drumgizmo.org/releases/${pname}-${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "177c27kz9srds7a659zz9yhp58z0zsk0ydwww7l3jkjlylm1p8x1";
|
||||
sha256 = "1vig9pm0dakpk8wa62m9ajj3bz536h0170r8vb98hxbm4wyys8yj";
|
||||
};
|
||||
|
||||
configureFlags = [ "--enable-lv2" ];
|
||||
|
@ -4,13 +4,13 @@ let
|
||||
pythonPackages = python3Packages;
|
||||
in pythonPackages.buildPythonApplication rec {
|
||||
pname = "picard";
|
||||
version = "2.2.1";
|
||||
version = "2.2.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "metabrainz";
|
||||
repo = pname;
|
||||
rev = "release-${version}";
|
||||
sha256 = "1g7pbicf65hswbqmhrwlba9jm4r2vnggy7vy75z4256y7qcpwdfd";
|
||||
sha256 = "1iibkvwpj862wcrl0fmyi6qhcgx4q5ay63yr0zyg0bkqgcka0gpr";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gettext qt5.wrapQtAppsHook qt5.qtbase ];
|
||||
|
@ -7,13 +7,13 @@ with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-abc-" + version;
|
||||
version = "0.20.2";
|
||||
version = "0.20.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bitcoin-ABC";
|
||||
repo = "bitcoin-abc";
|
||||
rev = "v${version}";
|
||||
sha256 = "1hii6wjz6095jpy5kw7z6i3fn2jf1dvsppf162xx2c08n9vmz3s3";
|
||||
sha256 = "1m0k685czpywmkzhzfa09jc0hvmh7rk5rywwlq2chxz50pzm2m3a";
|
||||
};
|
||||
|
||||
patches = [ ./fix-bitcoin-qt-build.patch ];
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bvi";
|
||||
version = "1.4.0";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/bvi/${pname}-${version}.src.tar.gz";
|
||||
sha256 = "00pq9rv7s8inqxq2m3xshxi58691i3pxw9smibcrgh6768l3qnh1";
|
||||
sha256 = "0a0yl0dcyff31k3dr4dpgqmlwygp8iaslnr5gmb6814ylxf2ad9h";
|
||||
};
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
|
@ -85,6 +85,15 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
|
||||
stripDebugList = [ "share" ];
|
||||
});
|
||||
|
||||
# https://github.com/syl20bnr/evil-escape/pull/86
|
||||
evil-escape = super.evil-escape.overrideAttrs (attrs: {
|
||||
postPatch = ''
|
||||
substituteInPlace evil-escape.el \
|
||||
--replace ' ;;; evil' ';;; evil'
|
||||
'';
|
||||
packageRequires = with self; [ evil ];
|
||||
});
|
||||
|
||||
evil-magit = super.evil-magit.overrideAttrs (attrs: {
|
||||
# searches for Git at build time
|
||||
nativeBuildInputs =
|
||||
|
@ -3,12 +3,12 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "11.0";
|
||||
version = "11.1";
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "netbeans";
|
||||
exec = "netbeans";
|
||||
comment = "Integrated Development Environment";
|
||||
desktopName = "Netbeans IDE";
|
||||
desktopName = "Apache NetBeans IDE";
|
||||
genericName = "Integrated Development Environment";
|
||||
categories = "Application;Development;";
|
||||
icon = "netbeans";
|
||||
@ -18,8 +18,8 @@ stdenv.mkDerivation {
|
||||
pname = "netbeans";
|
||||
inherit version;
|
||||
src = fetchurl {
|
||||
url = "mirror://apache/incubator/netbeans/incubating-netbeans/incubating-${version}/incubating-netbeans-${version}-bin.zip";
|
||||
sha512 = "15mv59njrnq3sjfzb0n7xcc79kpixygf37cxvbswnvm651cw6lb1i9w8wbjivh0z4zcf3f62vbmshxh5pkaxqpqsg0iyy6gddfbwzwx";
|
||||
url = "mirror://apache/netbeans/netbeans/${version}/netbeans-${version}-bin.zip";
|
||||
sha512 = "bb061b9258d524b7b53b3b5ee9aa95111f7a391a5e2c5c0bc949164166af9a03d0cebbde2b47a8853fb765307b4c93ce8389a9c87bef26c92c08cdf446314e4d";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
@ -48,7 +48,7 @@ stdenv.mkDerivation {
|
||||
convert -resize "$size"x"$size" netbeans_1024x1024x32.png $out/share/icons/hicolor/"$size"x"$size"/apps/netbeans.png
|
||||
fi
|
||||
done;
|
||||
|
||||
|
||||
# Create desktop item, so we can pick it from the KDE/GNOME menu
|
||||
mkdir -pv $out/share/applications
|
||||
ln -s ${desktopItem}/share/applications/* $out/share/applications
|
||||
@ -58,7 +58,7 @@ stdenv.mkDerivation {
|
||||
|
||||
meta = {
|
||||
description = "An integrated development environment for Java, C, C++ and PHP";
|
||||
homepage = "https://netbeans.org/";
|
||||
homepage = "https://netbeans.apache.org/";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
maintainers = with stdenv.lib.maintainers; [ sander rszibele ];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
|
@ -11,11 +11,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "drawio";
|
||||
version = "11.3.0";
|
||||
version = "12.1.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/draw.io-x86_64-${version}.rpm";
|
||||
sha256 = "00xq2pi84nbdnlbsaj4k9i93skz1nknxvhd2f2cgdm0b3sp86qbk";
|
||||
sha256 = "02gwhnbl9fzgf1z8c9bkm3rxzyncp7v57yqc322r85vg0wxir3f8";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "calcurse";
|
||||
version = "4.5.0";
|
||||
version = "4.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://calcurse.org/files/${pname}-${version}.tar.gz";
|
||||
sha256 = "1vjwcmp51h7dsvwn0qx93w9chp3wp970v7d9mjhk7jyamcbfywn3";
|
||||
sha256 = "0cgkd285x5pk62lmdx9fjxl46c5lj8wj2cqbxq7d99yb4il5fdjk";
|
||||
};
|
||||
|
||||
buildInputs = [ ncurses gettext python3 python3Packages.wrapPython ];
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dbeaver-ce";
|
||||
version = "6.2.2";
|
||||
version = "6.2.3";
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "dbeaver";
|
||||
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz";
|
||||
sha256 = "0qpa0wh5lr5lxk9cdv5p1cmbdk1kw1lfqmsfgqxvgfysc1mgjgp1";
|
||||
sha256 = "1v4sllzvaz4fj8s14ddzw11wczlghbdppv8fl5jg6xglg687sgaj";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "gallery_dl";
|
||||
version = "1.10.3";
|
||||
version = "1.10.6";
|
||||
|
||||
src = python3Packages.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1ippn0zbjy69n178vh4wgyzy6723ynvj2w23mzqw7v2mzcvkhmdz";
|
||||
sha256 = "0jbfp072rnb3pkqp10xds57bnlcn87vqjaz68nhpzkwvwhs3hr4w";
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
@ -1,4 +1,5 @@
|
||||
{ stdenv, fetchurl, python27Packages, python36Packages, wmctrl }:
|
||||
{ stdenv, fetchurl, python27Packages, python36Packages, wmctrl,
|
||||
qtbase, mkDerivationWith }:
|
||||
|
||||
{
|
||||
stable = with python27Packages; buildPythonPackage rec {
|
||||
@ -19,11 +20,11 @@
|
||||
nativeBuildInputs = [ setuptools_scm ];
|
||||
buildInputs = [ pytest mock ];
|
||||
propagatedBuildInputs = [
|
||||
six setuptools pyserial appdirs hidapi wxPython xlib wmctrl
|
||||
six setuptools pyserial appdirs hidapi wxPython xlib wmctrl dbus-python
|
||||
];
|
||||
};
|
||||
|
||||
dev = with python36Packages; buildPythonPackage rec {
|
||||
dev = with python36Packages; mkDerivationWith buildPythonPackage rec {
|
||||
pname = "plover";
|
||||
version = "4.0.0.dev8";
|
||||
|
||||
@ -43,6 +44,11 @@
|
||||
postPatch = "sed -i /PyQt5/d setup.cfg";
|
||||
|
||||
checkInputs = [ pytest mock ];
|
||||
propagatedBuildInputs = [ Babel pyqt5 xlib pyserial appdirs wcwidth ];
|
||||
propagatedBuildInputs = [ Babel pyqt5 xlib pyserial appdirs wcwidth setuptools ];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
makeWrapperArgs = [
|
||||
"\${qtWrapperArgs[@]}"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ let
|
||||
description = "Tool for building, changing, and versioning infrastructure";
|
||||
homepage = https://www.terraform.io/;
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ zimbatm peterhoeg kalbasit ];
|
||||
maintainers = with maintainers; [ zimbatm peterhoeg kalbasit marsam ];
|
||||
};
|
||||
} // attrs');
|
||||
|
||||
@ -97,8 +97,8 @@ in rec {
|
||||
terraform_0_11-full = terraform_0_11.full;
|
||||
|
||||
terraform_0_12 = pluggable (generic {
|
||||
version = "0.12.10";
|
||||
sha256 = "0bmqcmzjsrpvvnd9pn40f774c8jy6j810qz0njxqh60yh27f5rhx";
|
||||
version = "0.12.12";
|
||||
sha256 = "04qvzbm33ngkbkh45jbcv06c9s1lkgjk39sxvfxw7y6ygxzsrqq5";
|
||||
patches = [ ./provider-path.patch ];
|
||||
passthru = { inherit plugins; };
|
||||
});
|
||||
|
@ -24,11 +24,11 @@ with python'.pkgs;
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "FlexGet";
|
||||
version = "2.21.19";
|
||||
version = "2.21.25";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1xkxd5p4ps0dnwns64zzlvs252wx0f9fy5b6000gyql7y5cma3kj";
|
||||
sha256 = "0l77fgg0w5dca1bwk4fcc1yz1g7njb0x07yx4bazyg821gl15rc9";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -0,0 +1,19 @@
|
||||
*** suricata-5.0.0/ebpf/Makefile.in 2019-10-16 22:39:13.174649416 +0200
|
||||
--- suricata-5.0.0/ebpf/Makefile.in.fixed 2019-10-16 22:38:41.822201802 +0200
|
||||
***************
|
||||
*** 527,533 ****
|
||||
@BUILD_EBPF_TRUE@$(BPF_TARGETS): %.bpf: %.c
|
||||
# From C-code to LLVM-IR format suffix .ll (clang -S -emit-llvm)
|
||||
@BUILD_EBPF_TRUE@ ${CLANG} -Wall $(BPF_CFLAGS) -O2 \
|
||||
! @BUILD_EBPF_TRUE@ -I/usr/include/$(build_cpu)-$(build_os)/ \
|
||||
@BUILD_EBPF_TRUE@ -D__KERNEL__ -D__ASM_SYSREG_H \
|
||||
@BUILD_EBPF_TRUE@ -target bpf -S -emit-llvm $< -o ${@:.bpf=.ll}
|
||||
# From LLVM-IR to BPF-bytecode in ELF-obj file
|
||||
--- 527,533 ----
|
||||
@BUILD_EBPF_TRUE@$(BPF_TARGETS): %.bpf: %.c
|
||||
# From C-code to LLVM-IR format suffix .ll (clang -S -emit-llvm)
|
||||
@BUILD_EBPF_TRUE@ ${CLANG} -Wall $(BPF_CFLAGS) -O2 \
|
||||
! @BUILD_EBPF_TRUE@ -idirafter ../bpf_stubs_workaround \
|
||||
@BUILD_EBPF_TRUE@ -D__KERNEL__ -D__ASM_SYSREG_H \
|
||||
@BUILD_EBPF_TRUE@ -target bpf -S -emit-llvm $< -o ${@:.bpf=.ll}
|
||||
# From LLVM-IR to BPF-bytecode in ELF-obj file
|
@ -1,14 +1,18 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, clang
|
||||
, llvm
|
||||
, pkgconfig
|
||||
, makeWrapper
|
||||
, file
|
||||
, geoip
|
||||
, hyperscan
|
||||
, jansson
|
||||
, libbpf
|
||||
, libcap_ng
|
||||
, libelf
|
||||
, libevent
|
||||
, libmaxminddb
|
||||
, libnet
|
||||
, libnetfilter_log
|
||||
, libnetfilter_queue
|
||||
@ -30,24 +34,30 @@
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "suricata";
|
||||
version = "4.1.5";
|
||||
version = "5.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.openinfosecfoundation.org/download/${pname}-${version}.tar.gz";
|
||||
sha256 = "0jy738rs3ds1gbn8hv26ck23z9k6pjrjxdpavkyn7znpbi9zdrff";
|
||||
sha256 = "0qwav4qpvx3i5khkyvdvx42n8b9mza8c4cpxvrf7m4lnf51cqgba";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
clang
|
||||
llvm
|
||||
makeWrapper
|
||||
pkgconfig
|
||||
];
|
||||
]
|
||||
++ lib.optionals rustSupport [ rustc cargo ]
|
||||
;
|
||||
|
||||
buildInputs = [
|
||||
geoip
|
||||
jansson
|
||||
libbpf
|
||||
libcap_ng
|
||||
libelf
|
||||
libevent
|
||||
libmagic
|
||||
libmaxminddb
|
||||
libnet
|
||||
libnetfilter_log
|
||||
libnetfilter_queue
|
||||
@ -62,17 +72,29 @@ stdenv.mkDerivation rec {
|
||||
python
|
||||
zlib
|
||||
]
|
||||
++ lib.optional hyperscanSupport [ hyperscan ]
|
||||
++ lib.optional redisSupport [ redis hiredis ]
|
||||
++ lib.optional rustSupport [ rustc cargo ]
|
||||
++ lib.optional hyperscanSupport hyperscan
|
||||
++ lib.optionals redisSupport [ redis hiredis ]
|
||||
;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patches = lib.optional stdenv.is64bit ./bpf_stubs_workaround.patch;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ./configure \
|
||||
--replace "/usr/bin/file" "${file}/bin/file"
|
||||
substituteInPlace ./libhtp/configure \
|
||||
--replace "/usr/bin/file" "${file}/bin/file"
|
||||
|
||||
mkdir -p bpf_stubs_workaround/gnu
|
||||
touch bpf_stubs_workaround/gnu/stubs-32.h
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--disable-gccmarch-native"
|
||||
"--enable-afl"
|
||||
"--enable-af-packet"
|
||||
"--enable-ebpf"
|
||||
"--enable-ebpf-build"
|
||||
"--enable-gccprotect"
|
||||
"--enable-geoip"
|
||||
"--enable-luajit"
|
||||
@ -97,6 +119,13 @@ stdenv.mkDerivation rec {
|
||||
"--enable-rust-experimental"
|
||||
];
|
||||
|
||||
postConfigure = ''
|
||||
# Avoid unintended clousure growth.
|
||||
sed -i 's|/nix/store/\(.\{8\}\)[^-]*-|/nix/store/\1...-|g' ./src/build-info.h
|
||||
'';
|
||||
|
||||
hardeningDisable = [ "stackprotector" ];
|
||||
|
||||
installFlags = [
|
||||
"e_localstatedir=\${TMPDIR}"
|
||||
"e_logdir=\${TMPDIR}"
|
||||
@ -115,6 +144,8 @@ stdenv.mkDerivation rec {
|
||||
postInstall = ''
|
||||
wrapProgram "$out/bin/suricatasc" \
|
||||
--prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath "$out")
|
||||
substituteInPlace "$out/etc/suricata/suricata.yaml" \
|
||||
--replace "/etc/suricata" "$out/etc/suricata"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -14,11 +14,11 @@ assert pulseaudioSupport -> libpulseaudio != null;
|
||||
let
|
||||
inherit (stdenv.lib) concatStringsSep makeBinPath optional;
|
||||
|
||||
version = "3.0.303290.1010";
|
||||
version = "3.0.306796.1020";
|
||||
srcs = {
|
||||
x86_64-linux = fetchurl {
|
||||
url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
|
||||
sha256 = "0rs18csmwb8r5n0fc1ka1zjz3f0rydm6fxiy1pa1c2k5bmya56f9";
|
||||
sha256 = "0nh93pyincwfmx3z5x4s0ym3n0ff492nwd9wh3xkcl518pslxpxy";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "mlarchive2maildir";
|
||||
version = "0.0.6";
|
||||
version = "0.0.8";
|
||||
|
||||
src = python3.pkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "025mv890zsk25cral9cas3qgqdsszh5025khz473zs36innjd0mw";
|
||||
sha256 = "1din3yay2sas85178v0xr0hbm2396y4dalkcqql1ny9vdm94h6sp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with python3.pkgs; [ setuptools_scm ];
|
||||
|
@ -1,6 +1,7 @@
|
||||
{ stdenv, fetchurl, makeWrapper, makeDesktopItem
|
||||
, atk, cairo, gdk-pixbuf, glib, gnome2, gtk2, libGLU_combined, pango, xorg
|
||||
, lsb-release, freetype, fontconfig, pangox_compat, polkit, polkit_gnome }:
|
||||
, lsb-release, freetype, fontconfig, pangox_compat, polkit, polkit_gnome
|
||||
, pulseaudio }:
|
||||
|
||||
let
|
||||
sha256 = {
|
||||
@ -37,7 +38,7 @@ in stdenv.mkDerivation rec {
|
||||
buildInputs = [
|
||||
atk cairo gdk-pixbuf glib gtk2 stdenv.cc.cc pango
|
||||
gnome2.gtkglext libGLU_combined freetype fontconfig
|
||||
pangox_compat polkit polkit_gnome
|
||||
pangox_compat polkit polkit_gnome pulseaudio
|
||||
] ++ (with xorg; [
|
||||
libxcb libX11 libXdamage libXext libXfixes libXi libXmu
|
||||
libXrandr libXtst libXt libICE libSM libXrender
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
buildGoPackage rec {
|
||||
pname = "rclone";
|
||||
version = "1.49.4";
|
||||
version = "1.49.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "04fa85ch85dxm2nq7vqria34zn6fbgvky7p1i59j1wib753jpxyp";
|
||||
sha256 = "0firfb2300grfp5fnqaifhp346m4d0x8r1xshs9d8r6jxb160n03";
|
||||
};
|
||||
|
||||
goPackagePath = "github.com/rclone/rclone";
|
||||
|
@ -3,6 +3,10 @@
|
||||
# Dynamic Libraries
|
||||
, curl, libGL, libX11, libXext, libXmu, libXrandr, libXrender
|
||||
|
||||
# For fixing up execution of /bin/ls, which is necessary for
|
||||
# product unlocking.
|
||||
, coreutils, libredirect
|
||||
|
||||
, pname, version, edition, suiteName, src, archive
|
||||
|
||||
, ...
|
||||
@ -45,7 +49,22 @@ in stdenv.mkDerivation rec {
|
||||
runHook postUnpack
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
installPhase = let
|
||||
# SoftMaker/FreeOffice collects some system information upon
|
||||
# unlocking the product. But in doing so, it attempts to execute
|
||||
# /bin/ls. If the execve syscall fails, the whole unlock
|
||||
# procedure fails. This works around that by rewriting /bin/ls
|
||||
# to the proper path.
|
||||
#
|
||||
# SoftMaker Office restarts itself upon some operations, such
|
||||
# changing the theme and unlocking. Unfortunately, we do not
|
||||
# have control over its environment then and it will fail
|
||||
# with an error.
|
||||
lsIntercept = ''
|
||||
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
|
||||
--set NIX_REDIRECTS "/bin/ls=${coreutils}/bin/ls"
|
||||
'';
|
||||
in ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share
|
||||
@ -54,9 +73,12 @@ in stdenv.mkDerivation rec {
|
||||
# Wrap rather than symlinking, so that the programs can determine
|
||||
# their resource path.
|
||||
mkdir -p $out/bin
|
||||
makeWrapper $out/share/${pname}${edition}/planmaker $out/bin/${pname}-planmaker
|
||||
makeWrapper $out/share/${pname}${edition}/presentations $out/bin/${pname}-presentations
|
||||
makeWrapper $out/share/${pname}${edition}/textmaker $out/bin/${pname}-textmaker
|
||||
makeWrapper $out/share/${pname}${edition}/planmaker $out/bin/${pname}-planmaker \
|
||||
${lsIntercept}
|
||||
makeWrapper $out/share/${pname}${edition}/presentations $out/bin/${pname}-presentations \
|
||||
${lsIntercept}
|
||||
makeWrapper $out/share/${pname}${edition}/textmaker $out/bin/${pname}-textmaker \
|
||||
${lsIntercept}
|
||||
|
||||
for size in 16 32 48 64 96 128 256 512 1024; do
|
||||
mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "chirp-daily";
|
||||
version = "20190905";
|
||||
version = "20190925";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://trac.chirp.danplanet.com/chirp_daily/daily-${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "01xglzzl94wzkd2d8zmyv6s1xqsfc7biph15k0ap8rlf98874rlf";
|
||||
sha256 = "0immgss7nj7395r3csiypksnbn1r2f3j45c5v8qpybz65lpbplps";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
@ -1,11 +1,11 @@
|
||||
{ stdenv, fetchurl, cln, pkgconfig, readline, gmp, python }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ginac-1.7.7";
|
||||
name = "ginac-1.7.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "${meta.homepage}/${name}.tar.bz2";
|
||||
sha256 = "1jsf74cym5v6nq70aij3l7axq8vf7rrc1lnb9siyb9lsfbnnxzqf";
|
||||
sha256 = "0rvhdagmrs8ynnylwnxnmmfz1j9zk1g2rr7w6xczsbn7lqd511hc";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ cln ];
|
||||
|
@ -1,10 +1,10 @@
|
||||
{stdenv, fetchurl, wxGTK, perl, python2, zlib, libGLU_combined, libX11}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "golly";
|
||||
version = "3.2";
|
||||
version = "3.3";
|
||||
|
||||
src = fetchurl {
|
||||
sha256 = "0cg9mbwmf4q6qxhqlnzrxh9y047banxdb8pd3hgj3smmja2zf0jd";
|
||||
sha256 = "1j3ksnar4rdam4xiyspgyrs1pifbvxfxkrn65brkwxpx39mpgzc8";
|
||||
url="mirror://sourceforge/project/golly/golly/golly-${version}/golly-${version}-src.tar.gz";
|
||||
};
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
{stdenv, fetchurl, unzip, makeDesktopItem, nwjs, wrapGAppsHook, gsettings-desktop-schemas, gtk3 }:
|
||||
|
||||
let
|
||||
strippedName = "betaflight-configurator";
|
||||
pname = "betaflight-configurator";
|
||||
desktopItem = makeDesktopItem {
|
||||
name = strippedName;
|
||||
exec = strippedName;
|
||||
icon = "${strippedName}-icon.png";
|
||||
name = pname;
|
||||
exec = pname;
|
||||
icon = pname;
|
||||
comment = "Betaflight configuration tool";
|
||||
desktopName = "Betaflight Configurator";
|
||||
genericName = "Flight controller configuration tool";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${strippedName}-${version}";
|
||||
version = "10.5.1";
|
||||
inherit pname;
|
||||
version = "10.6.0";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/betaflight/betaflight-configurator/releases/download/${version}/${strippedName}_${version}_linux64.zip";
|
||||
sha256 = "1l4blqgaqfrnydk05q6pwdqdhcly2f8nwzrv0749cqmfiinh8ygc";
|
||||
url = "https://github.com/betaflight/${pname}/releases/download/${version}/${pname}_${version}_linux64.zip";
|
||||
sha256 = "09hayzhwangh8b81r038p320vbg0xxlyzrdp9pcmfyxp6s00xslw";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ wrapGAppsHook ];
|
||||
@ -25,14 +25,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin \
|
||||
$out/opt/${strippedName} \
|
||||
$out/share/icons
|
||||
$out/opt/${pname}
|
||||
|
||||
cp -r . $out/opt/${strippedName}/
|
||||
cp icon/*_icon_128.png $out/share/icons/${strippedName}-icon.png
|
||||
cp -r . $out/opt/${pname}/
|
||||
install -m 444 -D icon/bf_icon_128.png $out/share/icons/hicolor/128x128/apps/${pname}.png
|
||||
cp -r ${desktopItem}/share/applications $out/share/
|
||||
|
||||
makeWrapper ${nwjs}/bin/nw $out/bin/${strippedName} --add-flags $out/opt/${strippedName}
|
||||
makeWrapper ${nwjs}/bin/nw $out/bin/${pname} --add-flags $out/opt/${pname}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -1,17 +1,17 @@
|
||||
{ stdenv, fetchgit, git, SDL2, udev, doxygen
|
||||
, qtbase, qtlocation, qtserialport, qtdeclarative, qtconnectivity, qtxmlpatterns
|
||||
, qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects, qmake, qtspeech
|
||||
{ lib, mkDerivation, fetchgit, SDL2
|
||||
, qtbase, qtcharts, qtlocation, qtserialport, qtsvg, qtquickcontrols2
|
||||
, qtgraphicaleffects, qtspeech, qmake
|
||||
, makeWrapper
|
||||
, gst_all_1, pkgconfig
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
mkDerivation rec {
|
||||
pname = "qgroundcontrol";
|
||||
version = "3.3.0";
|
||||
version = "3.5.5";
|
||||
|
||||
qtInputs = [
|
||||
qtbase qtlocation qtserialport qtdeclarative qtconnectivity qtxmlpatterns qtsvg
|
||||
qtquick1 qtquickcontrols qtgraphicaleffects qtspeech
|
||||
qtbase qtcharts qtlocation qtserialport qtsvg qtquickcontrols2
|
||||
qtgraphicaleffects qtspeech
|
||||
];
|
||||
|
||||
gstInputs = with gst_all_1; [
|
||||
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
buildInputs = [ SDL2 udev doxygen git ] ++ gstInputs ++ qtInputs;
|
||||
buildInputs = [ SDL2 ] ++ gstInputs ++ qtInputs;
|
||||
nativeBuildInputs = [ pkgconfig makeWrapper qmake ];
|
||||
|
||||
preConfigure = ''
|
||||
@ -58,17 +58,16 @@ stdenv.mkDerivation rec {
|
||||
# TODO: package mavlink so we can build from a normal source tarball
|
||||
src = fetchgit {
|
||||
url = "https://github.com/mavlink/qgroundcontrol.git";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "0abjm0wywp24qlgg9w8g35ijprjg5csq4fgba9caaiwvmpfbhmpw";
|
||||
rev = "v${version}";
|
||||
sha256 = "05zy6w9lwwh254wa8c6wysa67kk0flywcvipii9b1rmy47slflhs";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Provides full ground station support and configuration for the PX4 and APM Flight Stacks";
|
||||
homepage = http://qgroundcontrol.org/;
|
||||
homepage = "http://qgroundcontrol.org/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ pxc ];
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, lib, fetchFromGitHub, makeWrapper, git, gnupg, gawk }:
|
||||
|
||||
let
|
||||
version = "0.3.1";
|
||||
version = "0.3.2";
|
||||
repo = "git-secret";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
@ -11,7 +11,7 @@ in stdenv.mkDerivation {
|
||||
inherit repo;
|
||||
owner = "sobolevn";
|
||||
rev = "v${version}";
|
||||
sha256 = "0234a2507as242wlybg32f7nd27ffjs50r4p1p95j6vs5s8g413l";
|
||||
sha256 = "0n268xlsd9p5f083sqwzpvsqg99fdk876mf8gihkydakrismc45b";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, lib, fetchurl, fetchFromGitLab, bundlerEnv
|
||||
, ruby, tzdata, git, nettools, nixosTests, nodejs
|
||||
, gitlabEnterprise ? false, callPackage, yarn
|
||||
, yarn2nix-moretea
|
||||
, yarn2nix-moretea, replace
|
||||
}:
|
||||
|
||||
let
|
||||
@ -118,6 +118,13 @@ stdenv.mkDerivation {
|
||||
|
||||
sed -i '/ask_to_continue/d' lib/tasks/gitlab/two_factor.rake
|
||||
sed -ri -e '/log_level/a config.logger = Logger.new(STDERR)' config/environments/production.rb
|
||||
|
||||
# Always require lib-files and application.rb through their store
|
||||
# path, not their relative state directory path. This gets rid of
|
||||
# warnings and means we don't have to link back to lib from the
|
||||
# state directory.
|
||||
${replace}/bin/replace-literal -f -r -e '../lib' "$out/share/gitlab/lib" config
|
||||
${replace}/bin/replace-literal -f -r -e "require_relative 'application'" "require_relative '$out/share/gitlab/config/application'" config
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
|
@ -19,7 +19,7 @@ rec {
|
||||
name = "docker-runc-${version}";
|
||||
inherit version;
|
||||
src = fetchFromGitHub {
|
||||
owner = "docker";
|
||||
owner = "opencontainers";
|
||||
repo = "runc";
|
||||
rev = runcRev;
|
||||
sha256 = runcSha256;
|
||||
@ -198,14 +198,14 @@ rec {
|
||||
});
|
||||
|
||||
# Get revisions from
|
||||
# https://github.com/docker/docker-ce/tree/v${version}/components/engine/hack/dockerfile/install/*
|
||||
# https://github.com/docker/docker-ce/tree/${version}/components/engine/hack/dockerfile/install/*
|
||||
|
||||
docker_18_09 = makeOverridable dockerGen {
|
||||
version = "18.09.9";
|
||||
rev = "039a7df9ba8097dd987370782fcdd6ea79b26016";
|
||||
sha256 = "0wqhjx9qs96q2jd091wffn3cyv2aslqn2cvpdpgljk8yr9s0yg7h";
|
||||
runcRev = "425e105d5a03fabd737a126ad93d62a9eeede87f";
|
||||
runcSha256 = "05s4p12mgmdcy7gjralh41wlgds6m69zdgwbpdn1xjj2487dmhxf";
|
||||
runcRev = "3e425f80a8c931f88e6d94a8c831b9d5aa481657";
|
||||
runcSha256 = "18psc830b2rkwml1x6vxngam5b5wi3pj14mw817rshpzy87prspj";
|
||||
containerdRev = "894b81a4b802e4eb2a91d1ce216b8817763c29fb";
|
||||
containerdSha256 = "0sp5mn5wd3xma4svm6hf67hyhiixzkzz6ijhyjkwdrc4alk81357";
|
||||
tiniRev = "fec3683b971d9c3ef73f284f176672c44b448662";
|
||||
@ -216,8 +216,8 @@ rec {
|
||||
version = "19.03.2";
|
||||
rev = "6a30dfca03664a0b6bf0646a7d389ee7d0318e6e";
|
||||
sha256 = "0bghqwxlx4v06bwcv3c2wizbihhf983gvypx5sjcbgmiyd3bgb47";
|
||||
runcRev = "425e105d5a03fabd737a126ad93d62a9eeede87f";
|
||||
runcSha256 = "05s4p12mgmdcy7gjralh41wlgds6m69zdgwbpdn1xjj2487dmhxf";
|
||||
runcRev = "3e425f80a8c931f88e6d94a8c831b9d5aa481657";
|
||||
runcSha256 = "18psc830b2rkwml1x6vxngam5b5wi3pj14mw817rshpzy87prspj";
|
||||
containerdRev = "894b81a4b802e4eb2a91d1ce216b8817763c29fb";
|
||||
containerdSha256 = "0sp5mn5wd3xma4svm6hf67hyhiixzkzz6ijhyjkwdrc4alk81357";
|
||||
tiniRev = "fec3683b971d9c3ef73f284f176672c44b448662";
|
||||
|
@ -5,13 +5,13 @@
|
||||
|
||||
buildGoPackage rec {
|
||||
pname = "podman";
|
||||
version = "1.6.1";
|
||||
version = "1.6.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "containers";
|
||||
repo = "libpod";
|
||||
rev = "v${version}";
|
||||
sha256 = "0s9jxcjx9bkml606rn29358pfavd85m6zshra4qkpbc1iwa6hgr9";
|
||||
sha256 = "0cwyrzjjgxclnzc1yx6vm2bvq73mldwxfwalkprzlg8vpqbxji8y";
|
||||
};
|
||||
|
||||
goPackagePath = "github.com/containers/libpod";
|
||||
|
@ -12,7 +12,10 @@
|
||||
# needed for beautiful.gtk to work
|
||||
assert gtk3Support -> gtk3 != null;
|
||||
|
||||
with luaPackages; stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation rec {
|
||||
lgi = luaPackages.lgi;
|
||||
lua = luaPackages.lua;
|
||||
ldoc = luaPackages.ldoc;
|
||||
pname = "awesome";
|
||||
version = "4.3";
|
||||
|
||||
@ -49,8 +52,11 @@ with luaPackages; stdenv.mkDerivation rec {
|
||||
xcbutilxrm ]
|
||||
++ stdenv.lib.optional gtk3Support gtk3;
|
||||
|
||||
#cmakeFlags = "-DGENERATE_MANPAGES=ON";
|
||||
cmakeFlags = "-DOVERRIDE_VERSION=${version}";
|
||||
cmakeFlags = [
|
||||
#"-DGENERATE_MANPAGES=ON"
|
||||
"-DOVERRIDE_VERSION=${version}"
|
||||
] ++ stdenv.lib.optional luaPackages.isLuaJIT "-DLUA_LIBRARY=${lua}/lib/libluajit-5.1.so"
|
||||
;
|
||||
|
||||
GI_TYPELIB_PATH = "${pango.out}/lib/girepository-1.0";
|
||||
# LUA_CPATH and LUA_PATH are used only for *building*, see the --search flags
|
||||
|
@ -149,8 +149,8 @@ stdenv.mkDerivation (args // {
|
||||
|
||||
checkPhase = args.checkPhase or ''
|
||||
runHook preCheck
|
||||
echo "Running cargo test"
|
||||
cargo test
|
||||
echo "Running cargo cargo test -- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}"
|
||||
cargo test -- ''${checkFlags} ''${checkFlagsArray+"''${checkFlagsArray[@]}"}
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, fetchzip }:
|
||||
|
||||
let
|
||||
version = "2.3.0";
|
||||
version = "2.3.2";
|
||||
in fetchzip {
|
||||
name = "iosevka-bin-${version}";
|
||||
|
||||
@ -12,7 +12,7 @@ in fetchzip {
|
||||
unzip -j $downloadedFile \*.ttc -d $out/share/fonts/iosevka
|
||||
'';
|
||||
|
||||
sha256 = "0nry6zsmvcj44rijhbvrry84rh5hrixzb4n1mx9c27vvpy33a56w";
|
||||
sha256 = "1dkfh354scjgzq7kgy4cn70z030wmfgxixqp8p9m6i0ps8gccjgs";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://be5invis.github.io/Iosevka/;
|
||||
|
@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
|
||||
version = "4.1.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.rs.tus.ac.jp/yyusa/ricty/ricty_generator-${version}.sh";
|
||||
url = "http://www.yusa.lab.uec.ac.jp/~yusa/ricty/ricty_generator-${version}.sh";
|
||||
sha256 = "03fngb8f5hl7ifigdm5yljhs4z2x80cq8y8kna86d07ghknhzgw6";
|
||||
};
|
||||
|
||||
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A high-quality Japanese font based on Inconsolata and Migu 1M";
|
||||
homepage = https://www.rs.tus.ac.jp/yyusa/ricty.html;
|
||||
homepage = http://www.yusa.lab.uec.ac.jp/~yusa/ricty.html;
|
||||
license = licenses.unfree;
|
||||
maintainers = [ maintainers.mikoim ];
|
||||
};
|
||||
|
@ -3,14 +3,19 @@
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "qt5dxcb-plugin";
|
||||
version = "1.2.2";
|
||||
version = "5.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linuxdeepin";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1zvab6qxdr49pmk6mbk7s0md7bx585p32lca0xbg8mrkajz7g8rq";
|
||||
};
|
||||
srcs = [
|
||||
(fetchFromGitHub {
|
||||
owner = "linuxdeepin";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1pkhbx4hzjv7n4mscv7dng9ymjcc1csdc82iy62yxshhq32bcfja";
|
||||
})
|
||||
qtbase.src
|
||||
];
|
||||
|
||||
sourceRoot = "source";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgconfig
|
||||
@ -22,8 +27,16 @@ mkDerivation rec {
|
||||
libSM
|
||||
mtdev
|
||||
cairo
|
||||
qtbase
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# The Qt5 platforms plugin is vendored in the package, however what's there is not always up-to-date with what's in nixpkgs.
|
||||
# We simply copy the headers from qtbase's source tarball.
|
||||
mkdir -p platformplugin/libqt5xcbqpa-dev/${qtbase.version}
|
||||
cp -r ../qtbase-everywhere-src-5.12.4/src/plugins/platforms/xcb/*.h platformplugin/libqt5xcbqpa-dev/${qtbase.version}/
|
||||
'';
|
||||
|
||||
qmakeFlags = [
|
||||
"INSTALL_PATH=${placeholder "out"}/${qtbase.qtPluginPrefix}/platforms"
|
||||
];
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "lxqt-globalkeys";
|
||||
version = "0.14.1";
|
||||
version = "0.14.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lxqt";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0q7hfbs4dhsgyzch2msq2hsfzzfgbc611ki9x1x132n7zqk76pmp";
|
||||
sha256 = "1ij9abjnqbnkcb7qqk3x7y4amr6l7kkmwhdpc0x2qk4yikn5ijdg";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -27,7 +27,7 @@ mkDerivation rec {
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Daemon used to register global keyboard shortcuts";
|
||||
description = "LXQt service for global keyboard shortcuts registration";
|
||||
homepage = https://github.com/lxqt/lxqt-globalkeys;
|
||||
license = licenses.lgpl21;
|
||||
platforms = with platforms; unix;
|
||||
|
@ -3,13 +3,13 @@
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "qps";
|
||||
version = "1.10.20";
|
||||
version = "2.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lxqt";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1g8j4cjy5x33jzjkx6vwyl5qbf9i2z2w01ipgk7nrik5drf9crbf";
|
||||
sha256 = "03rl59yk3b24j0y0k8dpdpb3yi4f1l642zn5pp5br3s2vwx1vzkg";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake lxqt-build-tools ];
|
||||
@ -17,10 +17,10 @@ mkDerivation rec {
|
||||
buildInputs = [ qtbase qtx11extras qttools ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "The Qt process manager";
|
||||
description = "Qt based process manager";
|
||||
homepage = https://github.com/lxqt/qps;
|
||||
license = licenses.gpl2;
|
||||
platforms = with platforms; linux; # does not build on darwin
|
||||
maintainers = with maintainers; [ romildo ];
|
||||
platforms = with platforms; unix;
|
||||
};
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "elementary-wallpapers";
|
||||
version = "5.3";
|
||||
version = "5.4";
|
||||
|
||||
repoName = "wallpapers";
|
||||
|
||||
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
owner = "elementary";
|
||||
repo = repoName;
|
||||
rev = version;
|
||||
sha256 = "1i0zf9gzhwm8hgq5cp1xnxipqjvgzd9wfiicz612hgp6ivc0z0ag";
|
||||
sha256 = "1ihvv9v8m5f2n2v3bgg769l52wbg241zgp3d45q6phk7p8s1gz3s";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
|
@ -4,7 +4,7 @@
|
||||
let
|
||||
fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; };
|
||||
|
||||
hsPkgs = haskell.packages.ghc865.override {
|
||||
hsPkgs = haskell.packages.ghc881.override {
|
||||
overrides = self: super: with haskell.lib;
|
||||
let elmPkgs = rec {
|
||||
elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: {
|
||||
@ -12,14 +12,9 @@ let
|
||||
enableParallelBuilding = false;
|
||||
preConfigure = self.fetchElmDeps {
|
||||
elmPackages = (import ./packages/elm-srcs.nix);
|
||||
versionsDat = ./versions.dat;
|
||||
elmVersion = drv.version;
|
||||
registryDat = ./registry.dat;
|
||||
};
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/elm/compiler/pull/1886/commits/39d86a735e28da514be185d4c3256142c37c2a8a.patch";
|
||||
sha256 = "0nni5qx1523rjz1ja42z6z9pijxvi3fgbw1dhq5qi11mh1nb9ay7";
|
||||
})
|
||||
];
|
||||
buildTools = drv.buildTools or [] ++ [ makeWrapper ];
|
||||
jailbreak = true;
|
||||
postInstall = ''
|
||||
@ -32,8 +27,14 @@ let
|
||||
The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo:
|
||||
`package/nix/build.sh`
|
||||
*/
|
||||
elm-format = justStaticExecutables (doJailbreak (self.callPackage ./packages/elm-format.nix {}));
|
||||
elmi-to-json = justStaticExecutables (self.callPackage ./packages/elmi-to-json.nix {});
|
||||
#elm-format = justStaticExecutables (doJailbreak (self.callPackage ./packages/elm-format.nix {}));
|
||||
elmi-to-json = justStaticExecutables (overrideCabal (self.callPackage ./packages/elmi-to-json.nix {}) (drv: {
|
||||
prePatch = ''
|
||||
substituteInPlace package.yaml --replace "- -Werror" ""
|
||||
hpack
|
||||
'';
|
||||
jailbreak = true;
|
||||
}));
|
||||
|
||||
inherit fetchElmDeps;
|
||||
elmVersion = elmPkgs.elm.version;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user