Merge branch 'master' into add/flootty
This commit is contained in:
commit
38deb53542
92
.github/CODEOWNERS
vendored
92
.github/CODEOWNERS
vendored
@ -7,17 +7,87 @@
|
|||||||
# For documentation on this file, see https://help.github.com/articles/about-codeowners/
|
# For documentation on this file, see https://help.github.com/articles/about-codeowners/
|
||||||
# Mentioned users will get code review requests.
|
# Mentioned users will get code review requests.
|
||||||
|
|
||||||
# Python-related code and docs
|
# This file
|
||||||
pkgs/top-level/python-packages.nix @FRidh
|
/.github/CODEOWNERS @edolstra
|
||||||
pkgs/development/interpreters/python/* @FRidh
|
|
||||||
pkgs/development/python-modules/* @FRidh
|
|
||||||
doc/languages-frameworks/python.md @FRidh
|
|
||||||
|
|
||||||
# Boostraping and core infra
|
# Libraries
|
||||||
pkgs/stdenv/ @Ericson2314
|
/lib @edolstra @nbp
|
||||||
pkgs/build-support/cc-wrapper/ @Ericson2314
|
/lib/systems @edolstra @nbp @ericson2314
|
||||||
|
|
||||||
|
# Nixpkgs Internals
|
||||||
|
/default.nix @nbp
|
||||||
|
/pkgs/top-level/default.nix @nbp @Ericson2314
|
||||||
|
/pkgs/top-level/impure.nix @nbp @Ericson2314
|
||||||
|
/pkgs/top-level/stage.nix @nbp @Ericson2314
|
||||||
|
/pkgs/stdenv @edolstra
|
||||||
|
/pkgs/build-support/cc-wrapper @edolstra @Ericson2314
|
||||||
|
/pkgs/build-support/bintools-wrapper @edolstra @Ericson2314
|
||||||
|
/pkgs/build-support/setup-hooks @edolstra @Ericson2314
|
||||||
|
|
||||||
|
# NixOS Internals
|
||||||
|
/nixos/default.nix @nbp
|
||||||
|
/nixos/lib/from-env.nix @nbp
|
||||||
|
/nixos/lib/eval-config.nix @nbp
|
||||||
|
/nixos/doc/manual/configuration/abstractions.xml @nbp
|
||||||
|
/nixos/doc/manual/configuration/config-file.xml @nbp
|
||||||
|
/nixos/doc/manual/configuration/config-syntax.xml @nbp
|
||||||
|
/nixos/doc/manual/configuration/modularity.xml @nbp
|
||||||
|
/nixos/doc/manual/development/assertions.xml @nbp
|
||||||
|
/nixos/doc/manual/development/meta-attributes.xml @nbp
|
||||||
|
/nixos/doc/manual/development/option-declarations.xml @nbp
|
||||||
|
/nixos/doc/manual/development/option-def.xml @nbp
|
||||||
|
/nixos/doc/manual/development/option-types.xml @nbp
|
||||||
|
/nixos/doc/manual/development/replace-modules.xml @nbp
|
||||||
|
/nixos/doc/manual/development/writing-modules.xml @nbp
|
||||||
|
/nixos/doc/manual/man-nixos-option.xml @nbp
|
||||||
|
/nixos/modules/installer/tools/nixos-option.sh @nbp
|
||||||
|
|
||||||
|
# Python-related code and docs
|
||||||
|
/pkgs/top-level/python-packages.nix @FRidh
|
||||||
|
/pkgs/development/interpreters/python @FRidh
|
||||||
|
/pkgs/development/python-modules @FRidh
|
||||||
|
/doc/languages-frameworks/python.md @FRidh
|
||||||
|
|
||||||
|
# Haskell
|
||||||
|
/pkgs/development/compilers/ghc @peti
|
||||||
|
/pkgs/development/haskell-modules @peti
|
||||||
|
/pkgs/development/haskell-modules/default.nix @peti
|
||||||
|
/pkgs/development/haskell-modules/generic-builder.nix @peti
|
||||||
|
/pkgs/development/haskell-modules/hoogle.nix @peti
|
||||||
|
|
||||||
|
# R
|
||||||
|
/pkgs/applications/science/math/R @peti
|
||||||
|
/pkgs/development/r-modules @peti
|
||||||
|
|
||||||
|
# Ruby
|
||||||
|
/pkgs/development/interpreters/ruby @zimbatm
|
||||||
|
/pkgs/development/ruby-modules @zimbatm
|
||||||
|
|
||||||
# Darwin-related
|
# Darwin-related
|
||||||
pkgs/stdenv/darwin/* @copumpkin @LnL7
|
/pkgs/stdenv/darwin @NixOS/darwin-maintainers
|
||||||
pkgs/os-specific/darwin/* @LnL7
|
/pkgs/os-specific/darwin @NixOS/darwin-maintainers
|
||||||
pkgs/os-specific/darwin/apple-source-releases/* @copumpkin
|
|
||||||
|
# Beam-related (Erlang, Elixir, LFE, etc)
|
||||||
|
/pkgs/development/beam-modules @gleber
|
||||||
|
/pkgs/development/interpreters/erlang @gleber
|
||||||
|
/pkgs/development/interpreters/lfe @gleber
|
||||||
|
/pkgs/development/interpreters/elixir @gleber
|
||||||
|
/pkgs/development/tools/build-managers/rebar @gleber
|
||||||
|
/pkgs/development/tools/build-managers/rebar3 @gleber
|
||||||
|
/pkgs/development/tools/erlang @gleber
|
||||||
|
|
||||||
|
# Jetbrains
|
||||||
|
/pkgs/applications/editors/jetbrains @edwtjo
|
||||||
|
|
||||||
|
# Eclipse
|
||||||
|
/pkgs/applications/editors/eclipse @rycee
|
||||||
|
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/31401
|
||||||
|
/lib/maintainers.nix @ghost
|
||||||
|
/lib/licenses.nix @ghost
|
||||||
|
|
||||||
|
# Qt / KDE
|
||||||
|
/pkgs/applications/kde @ttuegel
|
||||||
|
/pkgs/desktops/plasma-5 @ttuegel
|
||||||
|
/pkgs/development/libraries/kde-frameworks @ttuegel
|
||||||
|
/pkgs/development/libraries/qt-5 @ttuegel
|
||||||
|
13
.github/CONTRIBUTING.md
vendored
13
.github/CONTRIBUTING.md
vendored
@ -12,7 +12,7 @@ under the terms of [COPYING](../COPYING), which is an MIT-like license.
|
|||||||
|
|
||||||
## Submitting changes
|
## Submitting changes
|
||||||
|
|
||||||
* Format the commits in the following way:
|
* Format the commit messages in the following way:
|
||||||
|
|
||||||
```
|
```
|
||||||
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
|
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
|
||||||
@ -32,11 +32,14 @@ under the terms of [COPYING](../COPYING), which is an MIT-like license.
|
|||||||
The old config generation system used impure shell scripts and could break in specific circumstances (see #1234).
|
The old config generation system used impure shell scripts and could break in specific circumstances (see #1234).
|
||||||
|
|
||||||
* `meta.description` should:
|
* `meta.description` should:
|
||||||
* Be capitalized
|
* Be capitalized.
|
||||||
* Not start with the package name
|
* Not start with the package name.
|
||||||
* Not have a dot at the end
|
* Not have a period at the end.
|
||||||
|
* `meta.license` must be set and fit the upstream license.
|
||||||
|
* If there is no upstream license, `meta.license` should default to `stdenv.lib.licenses.unfree`.
|
||||||
|
* `meta.maintainers` must be set.
|
||||||
|
|
||||||
See the nixpkgs manual for more details on how to [Submit changes to nixpkgs](https://nixos.org/nixpkgs/manual/#chap-submitting-changes).
|
See the nixpkgs manual for more details on [standard meta-attributes](https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes) and on how to [submit changes to nixpkgs](https://nixos.org/nixpkgs/manual/#chap-submitting-changes).
|
||||||
|
|
||||||
## Writing good commit messages
|
## Writing good commit messages
|
||||||
|
|
||||||
|
6
.github/ISSUE_TEMPLATE.md
vendored
6
.github/ISSUE_TEMPLATE.md
vendored
@ -8,7 +8,5 @@
|
|||||||
|
|
||||||
## Technical details
|
## Technical details
|
||||||
|
|
||||||
* System: (NixOS: `nixos-version`, Ubuntu/Fedora: `lsb_release -a`, ...)
|
Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the
|
||||||
* Nix version: (run `nix-env --version`)
|
results.
|
||||||
* Nixpkgs version: (run `nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion`)
|
|
||||||
* Sandboxing enabled: (run `grep build-use-sandbox /etc/nix/nix.conf`)
|
|
||||||
|
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -9,7 +9,7 @@
|
|||||||
- Built on platform(s)
|
- Built on platform(s)
|
||||||
- [ ] NixOS
|
- [ ] NixOS
|
||||||
- [ ] macOS
|
- [ ] macOS
|
||||||
- [ ] Linux
|
- [ ] other Linux distributions
|
||||||
- [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
|
- [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
|
||||||
- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nox --run "nox-review wip"`
|
- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nox --run "nox-review wip"`
|
||||||
- [ ] Tested execution of all binary files (usually in `./result/bin/`)
|
- [ ] Tested execution of all binary files (usually in `./result/bin/`)
|
||||||
|
35
.travis.yml
35
.travis.yml
@ -1,35 +0,0 @@
|
|||||||
language: nix
|
|
||||||
sudo: true
|
|
||||||
# 'sudo: false' == containers that start fast, but only get 4G ram;
|
|
||||||
# 'sudo: true' == VMs that start slow, but with 8G
|
|
||||||
# ..as per: https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
|
|
||||||
# Nixpkgs PR tests OOM with 4G: https://github.com/NixOS/nixpkgs/issues/24200
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: linux
|
|
||||||
sudo: required
|
|
||||||
script:
|
|
||||||
- ./maintainers/scripts/travis-nox-review-pr.sh nixpkgs-verify nixpkgs-manual nixpkgs-tarball nixpkgs-unstable
|
|
||||||
- ./maintainers/scripts/travis-nox-review-pr.sh nixos-options nixos-manual
|
|
||||||
env:
|
|
||||||
- BUILD_TYPE="Test Nixpkgs evaluation & NixOS manual build"
|
|
||||||
- os: linux
|
|
||||||
sudo: required
|
|
||||||
dist: trusty
|
|
||||||
before_script:
|
|
||||||
- sudo mount -o remount,exec,size=2G,mode=755 /run/user
|
|
||||||
script: ./maintainers/scripts/travis-nox-review-pr.sh nox pr
|
|
||||||
env:
|
|
||||||
- BUILD_TYPE="Build affected packages (Linux)"
|
|
||||||
- os: osx
|
|
||||||
osx_image: xcode7.3
|
|
||||||
script: ./maintainers/scripts/travis-nox-review-pr.sh nox pr
|
|
||||||
env:
|
|
||||||
- BUILD_TYPE="Build affected packages (macOS)"
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- GITHUB_TOKEN=5edaaf1017f691ed34e7f80878f8f5fbd071603f
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email: false
|
|
6
COPYING
6
COPYING
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2003-2017 Eelco Dolstra and the Nixpkgs/NixOS contributors
|
Copyright (c) 2003-2018 Eelco Dolstra and the Nixpkgs/NixOS contributors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
@ -23,9 +23,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
Note: the license above does not apply to the packages built by the
|
Note: the license above does not apply to the packages built by the
|
||||||
Nix Packages collection, merely to the package descriptions (i.e., Nix
|
Nix Packages collection, merely to the package descriptions (i.e., Nix
|
||||||
expressions, build scripts, etc.). Also, the license does not apply
|
expressions, build scripts, etc.). It also might not apply to patches
|
||||||
to some of the binaries used for bootstrapping Nixpkgs (e.g.,
|
|
||||||
pkgs/stdenv/linux/tools/bash). It also might not apply to patches
|
|
||||||
included in Nixpkgs, which may be derivative works of the packages to
|
included in Nixpkgs, which may be derivative works of the packages to
|
||||||
which they apply. The aforementioned artifacts are all covered by the
|
which they apply. The aforementioned artifacts are all covered by the
|
||||||
licenses of the respective packages.
|
licenses of the respective packages.
|
||||||
|
17
README.md
17
README.md
@ -1,10 +1,9 @@
|
|||||||
[<img src="http://nixos.org/logo/nixos-hires.png" width="500px" alt="logo" />](https://nixos.org/nixos)
|
[<img src="https://nixos.org/logo/nixos-hires.png" width="500px" alt="logo" />](https://nixos.org/nixos)
|
||||||
|
|
||||||
[](https://travis-ci.org/NixOS/nixpkgs)
|
|
||||||
[](https://www.codetriage.com/nixos/nixpkgs)
|
[](https://www.codetriage.com/nixos/nixpkgs)
|
||||||
|
|
||||||
Nixpkgs is a collection of packages for the [Nix](https://nixos.org/nix/) package
|
Nixpkgs is a collection of packages for the [Nix](https://nixos.org/nix/) package
|
||||||
manager. It is periodically built and tested by the [hydra](http://hydra.nixos.org/)
|
manager. It is periodically built and tested by the [Hydra](https://hydra.nixos.org/)
|
||||||
build daemon as so-called channels. To get channel information via git, add
|
build daemon as so-called channels. To get channel information via git, add
|
||||||
[nixpkgs-channels](https://github.com/NixOS/nixpkgs-channels.git) as a remote:
|
[nixpkgs-channels](https://github.com/NixOS/nixpkgs-channels.git) as a remote:
|
||||||
|
|
||||||
@ -13,28 +12,28 @@ build daemon as so-called channels. To get channel information via git, add
|
|||||||
```
|
```
|
||||||
|
|
||||||
For stability and maximum binary package support, it is recommended to maintain
|
For stability and maximum binary package support, it is recommended to maintain
|
||||||
custom changes on top of one of the channels, e.g. `nixos-17.03` for the latest
|
custom changes on top of one of the channels, e.g. `nixos-17.09` for the latest
|
||||||
release and `nixos-unstable` for the latest successful build of master:
|
release and `nixos-unstable` for the latest successful build of master:
|
||||||
|
|
||||||
```
|
```
|
||||||
% git remote update channels
|
% git remote update channels
|
||||||
% git rebase channels/nixos-17.03
|
% git rebase channels/nixos-17.09
|
||||||
```
|
```
|
||||||
|
|
||||||
For pull-requests, please rebase onto nixpkgs `master`.
|
For pull-requests, please rebase onto nixpkgs `master`.
|
||||||
|
|
||||||
[NixOS](https://nixos.org/nixos/) linux distribution source code is located inside
|
[NixOS](https://nixos.org/nixos/) Linux distribution source code is located inside
|
||||||
`nixos/` folder.
|
`nixos/` folder.
|
||||||
|
|
||||||
* [NixOS installation instructions](https://nixos.org/nixos/manual/#ch-installation)
|
* [NixOS installation instructions](https://nixos.org/nixos/manual/#ch-installation)
|
||||||
* [Documentation (Nix Expression Language chapter)](https://nixos.org/nix/manual/#ch-expression-language)
|
* [Documentation (Nix Expression Language chapter)](https://nixos.org/nix/manual/#ch-expression-language)
|
||||||
* [Manual (How to write packages for Nix)](https://nixos.org/nixpkgs/manual/)
|
* [Manual (How to write packages for Nix)](https://nixos.org/nixpkgs/manual/)
|
||||||
* [Manual (NixOS)](https://nixos.org/nixos/manual/)
|
* [Manual (NixOS)](https://nixos.org/nixos/manual/)
|
||||||
* [Nix Wiki](https://nixos.org/wiki/) (deprecated, see milestone ["Move the Wiki!"](https://github.com/NixOS/nixpkgs/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22Move+the+wiki%21%22))
|
* [Community maintained wiki](https://nixos.wiki/)
|
||||||
* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
|
* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
|
||||||
* [Continuous package builds for 17.03 release](https://hydra.nixos.org/jobset/nixos/release-17.03)
|
* [Continuous package builds for 17.09 release](https://hydra.nixos.org/jobset/nixos/release-17.09)
|
||||||
* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
|
* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
|
||||||
* [Tests for 17.03 release](https://hydra.nixos.org/job/nixos/release-17.03/tested#tabs-constituents)
|
* [Tests for 17.09 release](https://hydra.nixos.org/job/nixos/release-17.09/tested#tabs-constituents)
|
||||||
|
|
||||||
Communication:
|
Communication:
|
||||||
|
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
tab settings so it’s asking for trouble.</para></listitem>
|
tab settings so it’s asking for trouble.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Use <literal>lowerCamelCase</literal> for variable
|
<listitem><para>Use <literal>lowerCamelCase</literal> for variable
|
||||||
names, not <literal>UpperCamelCase</literal>. TODO: naming of
|
names, not <literal>UpperCamelCase</literal>. Note, this rule does
|
||||||
attributes in
|
not apply to package attribute names, which instead follow the rules
|
||||||
<filename>all-packages.nix</filename>?</para></listitem>
|
in <xref linkend="sec-package-naming"/>.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Function calls with attribute set arguments are
|
<listitem><para>Function calls with attribute set arguments are
|
||||||
written as
|
written as
|
||||||
@ -220,9 +220,10 @@ args.stdenv.mkDerivation (args // {
|
|||||||
|
|
||||||
<listitem><para>The variable name used for the instantiated package
|
<listitem><para>The variable name used for the instantiated package
|
||||||
in <filename>all-packages.nix</filename>, and when passing it as a
|
in <filename>all-packages.nix</filename>, and when passing it as a
|
||||||
dependency to other functions. This is what Nix expression authors
|
dependency to other functions. Typically this is called the
|
||||||
see. It can also be used when installing using <command>nix-env
|
<emphasis>package attribute name</emphasis>. This is what Nix
|
||||||
-iA</command>.</para></listitem>
|
expression authors see. It can also be used when installing using
|
||||||
|
<command>nix-env -iA</command>.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>The filename for (the directory containing) the Nix
|
<listitem><para>The filename for (the directory containing) the Nix
|
||||||
expression.</para></listitem>
|
expression.</para></listitem>
|
||||||
@ -259,12 +260,12 @@ bound to the variable name <varname>e2fsprogs</varname> in
|
|||||||
Also append <literal>"unstable"</literal> to the name - e.g.,
|
Also append <literal>"unstable"</literal> to the name - e.g.,
|
||||||
<literal>"pkgname-unstable-2014-09-23"</literal>.</para></listitem>
|
<literal>"pkgname-unstable-2014-09-23"</literal>.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Dashes in the package name should be preserved
|
<listitem><para>Dashes in the package name should be preserved in
|
||||||
in new variable names, rather than converted to underscores
|
new variable names, rather than converted to underscores or camel
|
||||||
(which was convention up to around 2013 and most names
|
cased — e.g., <varname>http-parser</varname> instead of
|
||||||
still have underscores instead of dashes) — e.g.,
|
<varname>http_parser</varname> or <varname>httpParser</varname>. The
|
||||||
<varname>http-parser</varname> instead of
|
hyphenated style is preferred in all three package
|
||||||
<varname>http_parser</varname>.</para></listitem>
|
names.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>If there are multiple versions of a package, this
|
<listitem><para>If there are multiple versions of a package, this
|
||||||
should be reflected in the variable names in
|
should be reflected in the variable names in
|
||||||
@ -661,8 +662,6 @@ src = fetchFromGitHub {
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-patches"><title>Patches</title>
|
<section xml:id="sec-patches"><title>Patches</title>
|
||||||
<para>Only patches that are unique to <literal>nixpkgs</literal> should be
|
|
||||||
included in <literal>nixpkgs</literal> source.</para>
|
|
||||||
<para>Patches available online should be retrieved using
|
<para>Patches available online should be retrieved using
|
||||||
<literal>fetchpatch</literal>.</para>
|
<literal>fetchpatch</literal>.</para>
|
||||||
<para>
|
<para>
|
||||||
@ -676,5 +675,30 @@ patches = [
|
|||||||
];
|
];
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
<para>Otherwise, you can add a <literal>.patch</literal> file to the
|
||||||
|
<literal>nixpkgs</literal> repository. In the interest of keeping our
|
||||||
|
maintenance burden to a minimum, only patches that are unique
|
||||||
|
to <literal>nixpkgs</literal> should be added in this way.</para>
|
||||||
|
<para><programlisting>
|
||||||
|
patches = [ ./0001-changes.patch ];
|
||||||
|
</programlisting></para>
|
||||||
|
<para>If you do need to do create this sort of patch file,
|
||||||
|
one way to do so is with git:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>Move to the root directory of the source code
|
||||||
|
you're patching.<screen>
|
||||||
|
$ cd the/program/source</screen></para></listitem>
|
||||||
|
<listitem><para>If a git repository is not already present,
|
||||||
|
create one and stage all of the source files.<screen>
|
||||||
|
$ git init
|
||||||
|
$ git add .</screen></para></listitem>
|
||||||
|
<listitem><para>Edit some files to make whatever changes need
|
||||||
|
to be included in the patch.</para></listitem>
|
||||||
|
<listitem><para>Use git to create a diff, and pipe the output
|
||||||
|
to a patch file:<screen>
|
||||||
|
$ git diff > nixpkgs/pkgs/the/package/0001-changes.patch</screen>
|
||||||
|
</para></listitem>
|
||||||
|
</orderedlist></para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
@ -55,6 +55,10 @@ configuration file located at
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>Note that we are not able to test or build unfree software on Hydra
|
||||||
|
due to policy. Most unfree licenses prohibit us from either executing or
|
||||||
|
distributing the software.</para>
|
||||||
|
|
||||||
<section xml:id="sec-allow-broken">
|
<section xml:id="sec-allow-broken">
|
||||||
<title>Installing broken packages</title>
|
<title>Installing broken packages</title>
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
For example, a typical use of cross compilation is to compile programs for embedded devices.
|
For example, a typical use of cross compilation is to compile programs for embedded devices.
|
||||||
These devices often don't have the computing power and memory to compile their own programs.
|
These devices often don't have the computing power and memory to compile their own programs.
|
||||||
One might think that cross-compilation is a fairly niche concern, but there are advantages to being rigorous about distinguishing build-time vs run-time environments even when one is developing and deploying on the same machine.
|
One might think that cross-compilation is a fairly niche concern, but there are advantages to being rigorous about distinguishing build-time vs run-time environments even when one is developing and deploying on the same machine.
|
||||||
Nixpkgs is increasingly adopting this opinion in that packages should be written with cross-compilation in mind, and nixpkgs should evaluate in a similar way (by minimizing cross-compilation-specific special cases) whether or not one is cross-compiling.
|
Nixpkgs is increasingly adopting the opinion that packages should be written with cross-compilation in mind, and nixpkgs should evaluate in a similar way (by minimizing cross-compilation-specific special cases) whether or not one is cross-compiling.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -30,11 +30,11 @@
|
|||||||
<section>
|
<section>
|
||||||
<title>Platform parameters</title>
|
<title>Platform parameters</title>
|
||||||
<para>
|
<para>
|
||||||
The three GNU Autoconf platforms, <wordasword>build</wordasword>, <wordasword>host</wordasword>, and <wordasword>target</wordasword>, are historically the result of much confusion.
|
Nixpkgs follows the <link xlink:href="https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html">common historical convention of GNU autoconf</link> of distinguishing between 3 types of platform: <wordasword>build</wordasword>, <wordasword>host</wordasword>, and <wordasword>target</wordasword>.
|
||||||
<link xlink:href="https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html" /> clears this up somewhat but there is more to be said.
|
|
||||||
An important advice to get out the way is, unless you are packaging a compiler or other build tool, just worry about the build and host platforms.
|
In summary, <wordasword>build</wordasword> is the platform on which a package is being built, <wordasword>host</wordasword> is the platform on which it is to run. The third attribute, <wordasword>target</wordasword>, is relevant only for certain specific compilers and build tools.
|
||||||
Dealing with just two platforms usually better matches people's preconceptions, and in this case is completely correct.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In Nixpkgs, these three platforms are defined as attribute sets under the names <literal>buildPlatform</literal>, <literal>hostPlatform</literal>, and <literal>targetPlatform</literal>.
|
In Nixpkgs, these three platforms are defined as attribute sets under the names <literal>buildPlatform</literal>, <literal>hostPlatform</literal>, and <literal>targetPlatform</literal>.
|
||||||
All three are always defined as attributes in the standard environment, and at the top level. That means one can get at them just like a dependency in a function that is imported with <literal>callPackage</literal>:
|
All three are always defined as attributes in the standard environment, and at the top level. That means one can get at them just like a dependency in a function that is imported with <literal>callPackage</literal>:
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>hostPlatform</varname></term>
|
<term><varname>hostPlatform</varname></term>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
The "host platform" is the platform on which a package is run.
|
The "host platform" is the platform on which a package will be run.
|
||||||
This is the simplest platform to understand, but also the one with the worst name.
|
This is the simplest platform to understand, but also the one with the worst name.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -60,22 +60,24 @@
|
|||||||
<term><varname>targetPlatform</varname></term>
|
<term><varname>targetPlatform</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The "target platform" is black sheep.
|
The "target platform" attribute is, unlike the other two attributes, not actually fundamental to the process of building software.
|
||||||
The other two intrinsically apply to all compiled software—or any build process with a notion of "build-time" followed by "run-time".
|
Instead, it is only relevant for compatibility with building certain specific compilers and build tools.
|
||||||
The target platform only applies to programming tools, and even then only is a good for for some of them.
|
It can be safely ignored for all other packages.
|
||||||
Briefly, GCC, Binutils, GHC, and certain other tools are written in such a way such that a single build can only compile code for a single platform.
|
|
||||||
Thus, when building them, one must think ahead about which platforms they wish to use the tool to produce machine code for, and build binaries for each.
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
There is no fundamental need to think about the target ahead of time like this.
|
The build process of certain compilers is written in such a way that the compiler resulting from a single build can itself only produce binaries for a single platform.
|
||||||
LLVM, for example, was designed from the beginning with cross-compilation in mind, and so a normal LLVM binary will support every architecture that LLVM supports.
|
The task specifying this single "target platform" is thus pushed to build time of the compiler.
|
||||||
If the tool supports modular or pluggable backends, one might imagine specifying a <emphasis>set</emphasis> of target platforms / backends one wishes to support, rather than a single one.
|
The root cause of this mistake is often that the compiler (which will be run on the host) and the the standard library/runtime (which will be run on the target) are built by a single build process.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The biggest reason for mess, if there is one, is that many compilers have the bad habit a build process that builds the compiler and standard library/runtime together.
|
There is no fundamental need to think about a single target ahead of time like this.
|
||||||
Then the specifying target platform is essential, because it determines the host platform of the standard library/runtime.
|
If the tool supports modular or pluggable backends, both the need to specify the target at build time and the constraint of having only a single target disappear.
|
||||||
Nixpkgs tries to avoid this where possible too, but still, because the concept of a target platform is so ingrained now in Autoconf and other tools, it is best to support it as is.
|
An example of such a tool is LLVM.
|
||||||
Tools like LLVM that don't need up-front target platforms can safely ignore it like normal packages, and it will do no harm.
|
</para>
|
||||||
|
<para>
|
||||||
|
Although the existance of a "target platfom" is arguably a historical mistake, it is a common one: examples of tools that suffer from it are GCC, Binutils, GHC and Autoconf.
|
||||||
|
Nixpkgs tries to avoid sharing in the mistake where possible.
|
||||||
|
Still, because the concept of a target platform is so ingrained, it is best to support it as is.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -155,14 +157,22 @@
|
|||||||
<section>
|
<section>
|
||||||
<title>Specifying Dependencies</title>
|
<title>Specifying Dependencies</title>
|
||||||
<para>
|
<para>
|
||||||
As mentioned in the introduction to this chapter, one can think about a build time vs run time distinction whether cross-compiling or not.
|
In this section we explore the relationship between both runtime and buildtime dependencies and the 3 Autoconf platforms.
|
||||||
In the case of cross-compilation, this corresponds with whether a derivation running on the native or foreign platform is produced.
|
</para>
|
||||||
An interesting thing to think about is how this corresponds with the three Autoconf platforms.
|
<para>
|
||||||
In the run-time case, the depending and depended-on package simply have matching build, host, and target platforms.
|
A runtime dependency between 2 packages implies that between them both the host and target platforms match.
|
||||||
But in the build-time case, one can imagine "sliding" the platforms one over.
|
This is directly implied by the meaning of "host platform" and "runtime dependency":
|
||||||
The depended-on package's host and target platforms (respectively) become the depending package's build and host platforms.
|
The package dependency exists while both packages are running on a single host platform.
|
||||||
This is the most important guiding principle behind cross-compilation with Nixpkgs, and will be called the <wordasword>sliding window principle</wordasword>.
|
</para>
|
||||||
|
<para>
|
||||||
|
A build time dependency, however, implies a shift in platforms between the depending package and the depended-on package.
|
||||||
|
The meaning of a build time dependency is that to build the depending package we need to be able to run the depended-on's package.
|
||||||
|
The depending package's build platform is therefore equal to the depended-on package's host platform.
|
||||||
|
Analogously, the depending package's host platform is equal to the depended-on package's target platform.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
In this manner, given the 3 platforms for one package, we can determine the three platforms for all its transitive dependencies.
|
In this manner, given the 3 platforms for one package, we can determine the three platforms for all its transitive dependencies.
|
||||||
|
This is the most important guiding principle behind cross-compilation with Nixpkgs, and will be called the <wordasword>sliding window principle</wordasword>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Some examples will probably make this clearer.
|
Some examples will probably make this clearer.
|
||||||
@ -177,19 +187,58 @@
|
|||||||
How does this work in practice? Nixpkgs is now structured so that build-time dependencies are taken from <varname>buildPackages</varname>, whereas run-time dependencies are taken from the top level attribute set.
|
How does this work in practice? Nixpkgs is now structured so that build-time dependencies are taken from <varname>buildPackages</varname>, whereas run-time dependencies are taken from the top level attribute set.
|
||||||
For example, <varname>buildPackages.gcc</varname> should be used at build time, while <varname>gcc</varname> should be used at run time.
|
For example, <varname>buildPackages.gcc</varname> should be used at build time, while <varname>gcc</varname> should be used at run time.
|
||||||
Now, for most of Nixpkgs's history, there was no <varname>buildPackages</varname>, and most packages have not been refactored to use it explicitly.
|
Now, for most of Nixpkgs's history, there was no <varname>buildPackages</varname>, and most packages have not been refactored to use it explicitly.
|
||||||
Instead, one can use the four attributes used for specifying dependencies as documented in <xref linkend="ssec-stdenv-attributes"/>.
|
Instead, one can use the six (<emphasis>gasp</emphasis>) attributes used for specifying dependencies as documented in <xref linkend="ssec-stdenv-dependencies"/>.
|
||||||
We "splice" together the run-time and build-time package sets with <varname>callPackage</varname>, and then <varname>mkDerivation</varname> for each of four attributes pulls the right derivation out.
|
We "splice" together the run-time and build-time package sets with <varname>callPackage</varname>, and then <varname>mkDerivation</varname> for each of four attributes pulls the right derivation out.
|
||||||
This splicing can be skipped when not cross compiling as the package sets are the same, but is a bit slow for cross compiling.
|
This splicing can be skipped when not cross compiling as the package sets are the same, but is a bit slow for cross compiling.
|
||||||
Because of this, a best-of-both-worlds solution is in the works with no splicing or explicit access of <varname>buildPackages</varname> needed.
|
Because of this, a best-of-both-worlds solution is in the works with no splicing or explicit access of <varname>buildPackages</varname> needed.
|
||||||
For now, feel free to use either method.
|
For now, feel free to use either method.
|
||||||
</para>
|
</para>
|
||||||
<note><para>
|
<note><para>
|
||||||
There is also a "backlink" <varname>__targetPackages</varname>, yielding a package set whose <varname>buildPackages</varname> is the current package set.
|
There is also a "backlink" <varname>targetPackages</varname>, yielding a package set whose <varname>buildPackages</varname> is the current package set.
|
||||||
This is a hack, though, to accommodate compilers with lousy build systems.
|
This is a hack, though, to accommodate compilers with lousy build systems.
|
||||||
Please do not use this unless you are absolutely sure you are packaging such a compiler and there is no other way.
|
Please do not use this unless you are absolutely sure you are packaging such a compiler and there is no other way.
|
||||||
</para></note>
|
</para></note>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<title>Cross packagaing cookbook</title>
|
||||||
|
<para>
|
||||||
|
Some frequently problems when packaging for cross compilation are good to just spell and answer.
|
||||||
|
Ideally the information above is exhaustive, so this section cannot provide any new information,
|
||||||
|
but its ludicrous and cruel to expect everyone to spend effort working through the interaction of many features just to figure out the same answer to the same common problem.
|
||||||
|
Feel free to add to this list!
|
||||||
|
</para>
|
||||||
|
<qandaset>
|
||||||
|
<qandaentry>
|
||||||
|
<question><para>
|
||||||
|
What if my package's build system needs to build a C program to be run under the build environment?
|
||||||
|
</para></question>
|
||||||
|
<answer><para>
|
||||||
|
<programlisting>depsBuildBuild = [ buildPackages.stdenv.cc ];</programlisting>
|
||||||
|
Add it to your <function>mkDerivation</function> invocation.
|
||||||
|
</para></answer>
|
||||||
|
</qandaentry>
|
||||||
|
<qandaentry>
|
||||||
|
<question><para>
|
||||||
|
My package fails to find <command>ar</command>.
|
||||||
|
</para></question>
|
||||||
|
<answer><para>
|
||||||
|
Many packages assume that an unprefixed <command>ar</command> is available, but Nix doesn't provide one.
|
||||||
|
It only provides a prefixed one, just as it only does for all the other binutils programs.
|
||||||
|
It may be necessary to patch the package to fix the build system to use a prefixed `ar`.
|
||||||
|
</para></answer>
|
||||||
|
</qandaentry>
|
||||||
|
<qandaentry>
|
||||||
|
<question><para>
|
||||||
|
My package's testsuite needs to run host platform code.
|
||||||
|
</para></question>
|
||||||
|
<answer><para>
|
||||||
|
<programlisting>doCheck = stdenv.hostPlatform != stdenv.buildPlatfrom;</programlisting>
|
||||||
|
Add it to your <function>mkDerivation</function> invocation.
|
||||||
|
</para></answer>
|
||||||
|
</qandaentry>
|
||||||
|
</qandaset>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!--============================================================-->
|
<!--============================================================-->
|
||||||
|
@ -23,11 +23,12 @@ pkgs.stdenv.mkDerivation {
|
|||||||
|
|
||||||
buildCommand = let toDocbook = { useChapters ? false, inputFile, outputFile }:
|
buildCommand = let toDocbook = { useChapters ? false, inputFile, outputFile }:
|
||||||
let
|
let
|
||||||
extraHeader = ''xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" '';
|
extraHeader = lib.optionalString (!useChapters)
|
||||||
|
''xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" '';
|
||||||
in ''
|
in ''
|
||||||
{
|
{
|
||||||
pandoc '${inputFile}' -w docbook ${lib.optionalString useChapters "--top-level-division=chapter"} \
|
pandoc '${inputFile}' -w docbook+smart ${lib.optionalString useChapters "--top-level-division=chapter"} \
|
||||||
--smart \
|
-f markdown+smart \
|
||||||
| sed -e 's|<ulink url=|<link xlink:href=|' \
|
| sed -e 's|<ulink url=|<link xlink:href=|' \
|
||||||
-e 's|</ulink>|</link>|' \
|
-e 's|</ulink>|</link>|' \
|
||||||
-e 's|<sect. id=|<section xml:id=|' \
|
-e 's|<sect. id=|<section xml:id=|' \
|
||||||
@ -48,6 +49,10 @@ pkgs.stdenv.mkDerivation {
|
|||||||
outputFile = "introduction.xml";
|
outputFile = "introduction.xml";
|
||||||
useChapters = true;
|
useChapters = true;
|
||||||
}
|
}
|
||||||
|
+ toDocbook {
|
||||||
|
inputFile = ./shell.md;
|
||||||
|
outputFile = "shell.xml";
|
||||||
|
}
|
||||||
+ toDocbook {
|
+ toDocbook {
|
||||||
inputFile = ./languages-frameworks/python.md;
|
inputFile = ./languages-frameworks/python.md;
|
||||||
outputFile = "./languages-frameworks/python.xml";
|
outputFile = "./languages-frameworks/python.xml";
|
||||||
|
@ -48,6 +48,4 @@ The binaries are made available via a [binary cache](https://cache.nixos.org).
|
|||||||
|
|
||||||
The current Nix expressions of the channels are available in the
|
The current Nix expressions of the channels are available in the
|
||||||
[`nixpkgs-channels`](https://github.com/NixOS/nixpkgs-channels) repository,
|
[`nixpkgs-channels`](https://github.com/NixOS/nixpkgs-channels) repository,
|
||||||
which has branches corresponding to the available channels. There is also the
|
which has branches corresponding to the available channels.
|
||||||
[Nixpkgs Monitor](http://monitor.nixos.org) which keeps track of updates
|
|
||||||
and security vulnerabilities.
|
|
||||||
|
@ -11,31 +11,53 @@
|
|||||||
in the Coq derivation.
|
in the Coq derivation.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Some libraries require OCaml and sometimes also Camlp5. The exact
|
Some libraries require OCaml and sometimes also Camlp5 or findlib.
|
||||||
versions that were used to build Coq are saved in the
|
The exact versions that were used to build Coq are saved in the
|
||||||
<literal>coq.ocaml</literal> and <literal>coq.camlp5</literal>
|
<literal>coq.ocaml</literal> and <literal>coq.camlp5</literal>
|
||||||
attributes.
|
and <literal>coq.findlib</literal> attributes.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Coq libraries may be compatible with some specific versions of Coq only.
|
||||||
|
The <literal>compatibleCoqVersions</literal> attribute is used to
|
||||||
|
precisely select those versions of Coq that are compatible with this
|
||||||
|
derivation.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Here is a simple package example. It is a pure Coq library, thus it
|
Here is a simple package example. It is a pure Coq library, thus it
|
||||||
only depends on Coq. Its <literal>makefile</literal> has been
|
depends on Coq. It builds on the Mathematical Components library, thus it
|
||||||
generated using <literal>coq_makefile</literal> so we only have to
|
also takes <literal>mathcomp</literal> as <literal>buildInputs</literal>.
|
||||||
|
Its <literal>Makefile</literal> has been generated using
|
||||||
|
<literal>coq_makefile</literal> so we only have to
|
||||||
set the <literal>$COQLIB</literal> variable at install time.
|
set the <literal>$COQLIB</literal> variable at install time.
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{stdenv, fetchurl, coq}:
|
{ stdenv, fetchFromGitHub, coq, mathcomp }:
|
||||||
stdenv.mkDerivation {
|
|
||||||
src = fetchurl {
|
stdenv.mkDerivation rec {
|
||||||
url = http://coq.inria.fr/pylons/contribs/files/Karatsuba/v8.4/Karatsuba.tar.gz;
|
name = "coq${coq.coq-version}-multinomials-${version}";
|
||||||
sha256 = "0ymfpv4v49k4fm63nq6gcl1hbnnxrvjjp7yzc4973n49b853c5b1";
|
version = "1.0";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "math-comp";
|
||||||
|
repo = "multinomials";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1qmbxp1h81cy3imh627pznmng0kvv37k4hrwi2faa101s6bcx55m";
|
||||||
};
|
};
|
||||||
|
|
||||||
name = "coq-karatsuba";
|
|
||||||
|
|
||||||
buildInputs = [ coq ];
|
buildInputs = [ coq ];
|
||||||
|
propagatedBuildInputs = [ mathcomp ];
|
||||||
|
|
||||||
installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/";
|
installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "A Coq/SSReflect Library for Monoidal Rings and Multinomials";
|
||||||
|
inherit (src.meta) homepage;
|
||||||
|
license = stdenv.lib.licenses.cecill-b;
|
||||||
|
inherit (coq.meta) platforms;
|
||||||
|
};
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
compatibleCoqVersions = v: builtins.elem v [ "8.5" "8.6" "8.7" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ trouble with packages like `3dmodels` and `4Blocks`, because these names are
|
|||||||
invalid identifiers in the Nix language. The issue of how to deal with these
|
invalid identifiers in the Nix language. The issue of how to deal with these
|
||||||
rare corner cases is currently unresolved.)
|
rare corner cases is currently unresolved.)
|
||||||
|
|
||||||
Haskell packages who's Nix name (second column) begins with a `haskell-` prefix
|
Haskell packages whose Nix name (second column) begins with a `haskell-` prefix
|
||||||
are packages that provide a library whereas packages without that prefix
|
are packages that provide a library whereas packages without that prefix
|
||||||
provide just executables. Libraries may provide executables too, though: the
|
provide just executables. Libraries may provide executables too, though: the
|
||||||
package `haskell-pandoc`, for example, installs both a library and an
|
package `haskell-pandoc`, for example, installs both a library and an
|
||||||
@ -581,8 +581,8 @@ nix-shell "<nixpkgs>" -A haskellPackages.bar.env
|
|||||||
Every Haskell package set takes a function called `overrides` that you can use
|
Every Haskell package set takes a function called `overrides` that you can use
|
||||||
to manipulate the package as much as you please. One useful application of this
|
to manipulate the package as much as you please. One useful application of this
|
||||||
feature is to replace the default `mkDerivation` function with one that enables
|
feature is to replace the default `mkDerivation` function with one that enables
|
||||||
library profiling for all packages. To accomplish that, add configure the
|
library profiling for all packages. To accomplish that add the following
|
||||||
following snippet in your `~/.config/nixpkgs/config.nix` file:
|
snippet to your `~/.config/nixpkgs/config.nix` file:
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
packageOverrides = super: let self = super.pkgs; in
|
packageOverrides = super: let self = super.pkgs; in
|
||||||
@ -777,14 +777,14 @@ to find out the store path of the system's zlib library. Now, you can
|
|||||||
stack --extra-lib-dirs=/nix/store/alsvwzkiw4b7ip38l4nlfjijdvg3fvzn-zlib-1.2.8/lib build
|
stack --extra-lib-dirs=/nix/store/alsvwzkiw4b7ip38l4nlfjijdvg3fvzn-zlib-1.2.8/lib build
|
||||||
```
|
```
|
||||||
|
|
||||||
Typically, you'll need `--extra-include-dirs` as well. It's possible
|
Typically, you'll need `--extra-include-dirs` as well. It's possible
|
||||||
to add those flag to the project's `stack.yaml` or your user's
|
to add those flag to the project's `stack.yaml` or your user's
|
||||||
global `~/.stack/global/stack.yaml` file so that you don't have to
|
global `~/.stack/global/stack.yaml` file so that you don't have to
|
||||||
specify them manually every time. But again, you're likely better off
|
specify them manually every time. But again, you're likely better off
|
||||||
using Stack's Nix support instead.
|
using Stack's Nix support instead.
|
||||||
|
|
||||||
The same thing applies to `cabal configure`, of course, if you're
|
The same thing applies to `cabal configure`, of course, if you're
|
||||||
building with `cabal-install` instead of Stack.
|
building with `cabal-install` instead of Stack.
|
||||||
|
|
||||||
### Creating statically linked binaries
|
### Creating statically linked binaries
|
||||||
|
|
||||||
@ -875,12 +875,17 @@ to your own Haskell packages and integrate that in a Continuous Integration
|
|||||||
server like [hydra](https://nixos.org/hydra/) to assure your packages maintain a
|
server like [hydra](https://nixos.org/hydra/) to assure your packages maintain a
|
||||||
minimum level of quality. This section discusses some of these functions.
|
minimum level of quality. This section discusses some of these functions.
|
||||||
|
|
||||||
|
#### failOnAllWarnings
|
||||||
|
|
||||||
|
Applying `haskell.lib.failOnAllWarnings` to a Haskell package enables the
|
||||||
|
`-Wall` and `-Werror` GHC options to turn all warnings into build failures.
|
||||||
|
|
||||||
#### buildStrictly
|
#### buildStrictly
|
||||||
|
|
||||||
Applying `haskell.lib.buildStrictly` to a Haskell package enables the `-Wall`
|
Applying `haskell.lib.buildStrictly` to a Haskell package calls
|
||||||
and `-Werror` GHC options to turn all warnings into build failures. Additionally
|
`failOnAllWarnings` on the given package to turn all warnings into build
|
||||||
the source of your package is gotten from first invoking `cabal sdist` to ensure
|
failures. Additionally the source of your package is gotten from first invoking
|
||||||
all needed files are listed in the Cabal file.
|
`cabal sdist` to ensure all needed files are listed in the Cabal file.
|
||||||
|
|
||||||
#### checkUnusedPackages
|
#### checkUnusedPackages
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ with
|
|||||||
```nix
|
```nix
|
||||||
with import <nixpkgs> {};
|
with import <nixpkgs> {};
|
||||||
|
|
||||||
python35.withPackages (ps: [ps.numpy ps.toolz])
|
(python35.withPackages (ps: [ps.numpy ps.toolz])).env
|
||||||
```
|
```
|
||||||
Executing `nix-shell` gives you again a Nix shell from which you can run Python.
|
Executing `nix-shell` gives you again a Nix shell from which you can run Python.
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ run the script in the `python3` shell.
|
|||||||
|
|
||||||
```py
|
```py
|
||||||
#! /usr/bin/env nix-shell
|
#! /usr/bin/env nix-shell
|
||||||
#! nix-shell -i 'python3.withPackages(ps: [ps.numpy])'
|
#! nix-shell -i python3 -p "python3.withPackages(ps: [ps.numpy])"
|
||||||
|
|
||||||
import numpy
|
import numpy
|
||||||
|
|
||||||
@ -530,7 +530,6 @@ Based on the packages defined in `pkgs/top-level/python-packages.nix` an
|
|||||||
attribute set is created for each available Python interpreter. The available
|
attribute set is created for each available Python interpreter. The available
|
||||||
sets are
|
sets are
|
||||||
|
|
||||||
* `pkgs.python26Packages`
|
|
||||||
* `pkgs.python27Packages`
|
* `pkgs.python27Packages`
|
||||||
* `pkgs.python34Packages`
|
* `pkgs.python34Packages`
|
||||||
* `pkgs.python35Packages`
|
* `pkgs.python35Packages`
|
||||||
@ -540,7 +539,7 @@ sets are
|
|||||||
and the aliases
|
and the aliases
|
||||||
|
|
||||||
* `pkgs.python2Packages` pointing to `pkgs.python27Packages`
|
* `pkgs.python2Packages` pointing to `pkgs.python27Packages`
|
||||||
* `pkgs.python3Packages` pointing to `pkgs.python35Packages`
|
* `pkgs.python3Packages` pointing to `pkgs.python36Packages`
|
||||||
* `pkgs.pythonPackages` pointing to `pkgs.python2Packages`
|
* `pkgs.pythonPackages` pointing to `pkgs.python2Packages`
|
||||||
|
|
||||||
#### `buildPythonPackage` function
|
#### `buildPythonPackage` function
|
||||||
@ -785,7 +784,20 @@ example of such a situation is when `py.test` is used.
|
|||||||
|
|
||||||
#### Common issues
|
#### Common issues
|
||||||
|
|
||||||
- Non-working tests can often be deselected. In the case of `py.test`: `py.test -k 'not function_name and not other_function'`.
|
- Non-working tests can often be deselected. By default `buildPythonPackage` runs `python setup.py test`.
|
||||||
|
Most python modules follows the standard test protocol where the pytest runner can be used instead.
|
||||||
|
`py.test` supports a `-k` parameter to ignore test methods or classes:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
buildPythonPackage {
|
||||||
|
# ...
|
||||||
|
# assumes the tests are located in tests
|
||||||
|
checkInputs = [ pytest ];
|
||||||
|
checkPhase = ''
|
||||||
|
py.test -k 'not function_name and not other_function' tests
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
```
|
||||||
- Unicode issues can typically be fixed by including `glibcLocales` in `buildInputs` and exporting `LC_ALL=en_US.utf-8`.
|
- Unicode issues can typically be fixed by including `glibcLocales` in `buildInputs` and exporting `LC_ALL=en_US.utf-8`.
|
||||||
- Tests that attempt to access `$HOME` can be fixed by using the following work-around before running tests (e.g. `preCheck`): `export HOME=$(mktemp -d)`
|
- Tests that attempt to access `$HOME` can be fixed by using the following work-around before running tests (e.g. `preCheck`): `export HOME=$(mktemp -d)`
|
||||||
|
|
||||||
|
@ -9,25 +9,23 @@ date: 2017-03-05
|
|||||||
To install the rust compiler and cargo put
|
To install the rust compiler and cargo put
|
||||||
|
|
||||||
```
|
```
|
||||||
rustStable.rustc
|
rustc
|
||||||
rustStable.cargo
|
cargo
|
||||||
```
|
```
|
||||||
|
|
||||||
into the `environment.systemPackages` or bring them into scope with
|
into the `environment.systemPackages` or bring them into
|
||||||
`nix-shell -p rustStable.rustc -p rustStable.cargo`.
|
scope with `nix-shell -p rustc cargo`.
|
||||||
|
|
||||||
There are also `rustBeta` and `rustNightly` package sets available.
|
For daily builds (beta and nightly) use either rustup from
|
||||||
These are not updated very regularly. For daily builds use either rustup from
|
nixpkgs or use the [Rust nightlies
|
||||||
nixpkgs or use the [Rust nightlies overlay](#using-the-rust-nightlies-overlay).
|
overlay](#using-the-rust-nightlies-overlay).
|
||||||
|
|
||||||
## Packaging Rust applications
|
## Compiling Rust applications with Cargo
|
||||||
|
|
||||||
Rust applications are packaged by using the `buildRustPackage` helper from `rustPlatform`:
|
Rust applications are packaged by using the `buildRustPackage` helper from `rustPlatform`:
|
||||||
|
|
||||||
```
|
```
|
||||||
with rustPlatform;
|
rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
buildRustPackage rec {
|
|
||||||
name = "ripgrep-${version}";
|
name = "ripgrep-${version}";
|
||||||
version = "0.4.0";
|
version = "0.4.0";
|
||||||
|
|
||||||
@ -38,19 +36,19 @@ buildRustPackage rec {
|
|||||||
sha256 = "0y5d1n6hkw85jb3rblcxqas2fp82h3nghssa4xqrhqnz25l799pj";
|
sha256 = "0y5d1n6hkw85jb3rblcxqas2fp82h3nghssa4xqrhqnz25l799pj";
|
||||||
};
|
};
|
||||||
|
|
||||||
depsSha256 = "0q68qyl2h6i0qsz82z840myxlnjay8p1w5z7hfyr8fqp7wgwa9cx";
|
cargoSha256 = "0q68qyl2h6i0qsz82z840myxlnjay8p1w5z7hfyr8fqp7wgwa9cx";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A utility that combines the usability of The Silver Searcher with the raw speed of grep";
|
description = "A fast line-oriented regex search tool, similar to ag and ack";
|
||||||
homepage = https://github.com/BurntSushi/ripgrep;
|
homepage = https://github.com/BurntSushi/ripgrep;
|
||||||
license = with licenses; [ unlicense ];
|
license = licenses.unlicense;
|
||||||
maintainers = [ maintainers.tailhook ];
|
maintainers = [ maintainers.tailhook ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
`buildRustPackage` requires a `depsSha256` attribute which is computed over
|
`buildRustPackage` requires a `cargoSha256` attribute which is computed over
|
||||||
all crate sources of this package. Currently it is obtained by inserting a
|
all crate sources of this package. Currently it is obtained by inserting a
|
||||||
fake checksum into the expression and building the package once. The correct
|
fake checksum into the expression and building the package once. The correct
|
||||||
checksum can be then take from the failed build.
|
checksum can be then take from the failed build.
|
||||||
@ -58,6 +56,167 @@ checksum can be then take from the failed build.
|
|||||||
To install crates with nix there is also an experimental project called
|
To install crates with nix there is also an experimental project called
|
||||||
[nixcrates](https://github.com/fractalide/nixcrates).
|
[nixcrates](https://github.com/fractalide/nixcrates).
|
||||||
|
|
||||||
|
## Compiling Rust crates using Nix instead of Cargo
|
||||||
|
|
||||||
|
When run, `cargo build` produces a file called `Cargo.lock`,
|
||||||
|
containing pinned versions of all dependencies. Nixpkgs contains a
|
||||||
|
tool called `carnix` (`nix-env -iA nixos.carnix`), which can be used
|
||||||
|
to turn a `Cargo.lock` into a Nix expression.
|
||||||
|
|
||||||
|
That Nix expression calls `rustc` directly (hence bypassing Cargo),
|
||||||
|
and can be used to compile a crate and all its dependencies. Here is
|
||||||
|
an example for a minimal `hello` crate:
|
||||||
|
|
||||||
|
|
||||||
|
$ cargo new hello
|
||||||
|
$ cd hello
|
||||||
|
$ cargo build
|
||||||
|
Compiling hello v0.1.0 (file:///tmp/hello)
|
||||||
|
Finished dev [unoptimized + debuginfo] target(s) in 0.20 secs
|
||||||
|
$ carnix -o hello.nix --src ./. Cargo.lock --standalone
|
||||||
|
$ nix-build hello.nix
|
||||||
|
|
||||||
|
Now, the file produced by the call to `carnix`, called `hello.nix`, looks like:
|
||||||
|
|
||||||
|
```
|
||||||
|
with import <nixpkgs> {};
|
||||||
|
let kernel = buildPlatform.parsed.kernel.name;
|
||||||
|
# ... (content skipped)
|
||||||
|
hello_0_1_0_ = { dependencies?[], buildDependencies?[], features?[] }: buildRustCrate {
|
||||||
|
crateName = "hello";
|
||||||
|
version = "0.1.0";
|
||||||
|
authors = [ "Authorname <user@example.com>" ];
|
||||||
|
src = ./.;
|
||||||
|
inherit dependencies buildDependencies features;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
hello_0_1_0 = hello_0_1_0_ rec {};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
In particular, note that the argument given as `--src` is copied
|
||||||
|
verbatim to the source. If we look at a more complicated
|
||||||
|
dependencies, for instance by adding a single line `libc="*"` to our
|
||||||
|
`Cargo.toml`, we first need to run `cargo build` to update the
|
||||||
|
`Cargo.lock`. Then, `carnix` needs to be run again, and produces the
|
||||||
|
following nix file:
|
||||||
|
|
||||||
|
```
|
||||||
|
with import <nixpkgs> {};
|
||||||
|
let kernel = buildPlatform.parsed.kernel.name;
|
||||||
|
# ... (content skipped)
|
||||||
|
hello_0_1_0_ = { dependencies?[], buildDependencies?[], features?[] }: buildRustCrate {
|
||||||
|
crateName = "hello";
|
||||||
|
version = "0.1.0";
|
||||||
|
authors = [ "Jörg Thalheim <joerg@thalheim.io>" ];
|
||||||
|
src = ./.;
|
||||||
|
inherit dependencies buildDependencies features;
|
||||||
|
};
|
||||||
|
libc_0_2_34_ = { dependencies?[], buildDependencies?[], features?[] }: buildRustCrate {
|
||||||
|
crateName = "libc";
|
||||||
|
version = "0.2.34";
|
||||||
|
authors = [ "The Rust Project Developers" ];
|
||||||
|
sha256 = "11jmqdxmv0ka10ay0l8nzx0nl7s2lc3dbrnh1mgbr2grzwdyxi2s";
|
||||||
|
inherit dependencies buildDependencies features;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
hello_0_1_0 = hello_0_1_0_ rec {
|
||||||
|
dependencies = [ libc_0_2_34 ];
|
||||||
|
};
|
||||||
|
libc_0_2_34_features."default".from_hello_0_1_0__default = true;
|
||||||
|
libc_0_2_34 = libc_0_2_34_ rec {
|
||||||
|
features = mkFeatures libc_0_2_34_features;
|
||||||
|
};
|
||||||
|
libc_0_2_34_features."use_std".self_default = hasDefault libc_0_2_34_features;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Here, the `libc` crate has no `src` attribute, so `buildRustCrate`
|
||||||
|
will fetch it from [crates.io](https://crates.io). A `sha256`
|
||||||
|
attribute is still needed for Nix purity.
|
||||||
|
|
||||||
|
Some crates require external libraries. For crates from
|
||||||
|
[crates.io](https://crates.io), such libraries can be specified in
|
||||||
|
`defaultCrateOverrides` package in nixpkgs itself.
|
||||||
|
|
||||||
|
Starting from that file, one can add more overrides, to add features
|
||||||
|
or build inputs by overriding the hello crate in a seperate file.
|
||||||
|
|
||||||
|
```
|
||||||
|
with import <nixpkgs> {};
|
||||||
|
(import ./hello.nix).hello_0_1_0.override {
|
||||||
|
crateOverrides = defaultCrateOverrides // {
|
||||||
|
hello = attrs: { buildInputs = [ openssl ]; };
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Here, `crateOverrides` is expected to be a attribute set, where the
|
||||||
|
key is the crate name without version number and the value a function.
|
||||||
|
The function gets all attributes passed to `buildRustCrate` as first
|
||||||
|
argument and returns a set that contains all attribute that should be
|
||||||
|
overwritten.
|
||||||
|
|
||||||
|
For more complicated cases, such as when parts of the crate's
|
||||||
|
derivation depend on the the crate's version, the `attrs` argument of
|
||||||
|
the override above can be read, as in the following example, which
|
||||||
|
patches the derivation:
|
||||||
|
|
||||||
|
```
|
||||||
|
with import <nixpkgs> {};
|
||||||
|
(import ./hello.nix).hello_0_1_0.override {
|
||||||
|
crateOverrides = defaultCrateOverrides // {
|
||||||
|
hello = attrs: lib.optionalAttrs (lib.versionAtLeast attrs.version "1.0") {
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace lib/zoneinfo.rs \
|
||||||
|
--replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Another situation is when we want to override a nested
|
||||||
|
dependency. This actually works in the exact same way, since the
|
||||||
|
`crateOverrides` parameter is forwarded to the crate's
|
||||||
|
dependencies. For instance, to override the build inputs for crate
|
||||||
|
`libc` in the example above, where `libc` is a dependency of the main
|
||||||
|
crate, we could do:
|
||||||
|
|
||||||
|
```
|
||||||
|
with import <nixpkgs> {};
|
||||||
|
(import hello.nix).hello_0_1_0.override {
|
||||||
|
crateOverrides = defaultCrateOverrides // {
|
||||||
|
libc = attrs: { buildInputs = []; };
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Three more parameters can be overridden:
|
||||||
|
|
||||||
|
- The version of rustc used to compile the crate:
|
||||||
|
|
||||||
|
```
|
||||||
|
hello_0_1_0.override { rust = pkgs.rust; };
|
||||||
|
```
|
||||||
|
|
||||||
|
- Whether to build in release mode or debug mode (release mode by
|
||||||
|
default):
|
||||||
|
|
||||||
|
```
|
||||||
|
hello_0_1_0.override { release = false; };
|
||||||
|
```
|
||||||
|
|
||||||
|
- Whether to print the commands sent to rustc when building
|
||||||
|
(equivalent to `--verbose` in cargo:
|
||||||
|
|
||||||
|
```
|
||||||
|
hello_0_1_0.override { verbose = false; };
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Using the Rust nightlies overlay
|
## Using the Rust nightlies overlay
|
||||||
|
|
||||||
Mozilla provides an overlay for nixpkgs to bring a nightly version of Rust into scope.
|
Mozilla provides an overlay for nixpkgs to bring a nightly version of Rust into scope.
|
||||||
@ -76,11 +235,11 @@ in the `~/.config/nixpkgs/overlays` directory.
|
|||||||
|
|
||||||
The latest version can be installed with the following command:
|
The latest version can be installed with the following command:
|
||||||
|
|
||||||
$ nix-env -Ai nixos.rustChannels.stable.rust
|
$ nix-env -Ai nixos.latest.rustChannels.stable.rust
|
||||||
|
|
||||||
Or using the attribute with nix-shell:
|
Or using the attribute with nix-shell:
|
||||||
|
|
||||||
$ nix-shell -p nixos.rustChannels.stable.rust
|
$ nix-shell -p nixos.latest.rustChannels.stable.rust
|
||||||
|
|
||||||
To install the beta or nightly channel, "stable" should be substituted by
|
To install the beta or nightly channel, "stable" should be substituted by
|
||||||
"nightly" or "beta", or
|
"nightly" or "beta", or
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
<xi:include href="functions.xml" />
|
<xi:include href="functions.xml" />
|
||||||
<xi:include href="meta.xml" />
|
<xi:include href="meta.xml" />
|
||||||
<xi:include href="languages-frameworks/index.xml" />
|
<xi:include href="languages-frameworks/index.xml" />
|
||||||
|
<xi:include href="platform-notes.xml" />
|
||||||
<xi:include href="package-notes.xml" />
|
<xi:include href="package-notes.xml" />
|
||||||
<xi:include href="overlays.xml" />
|
<xi:include href="overlays.xml" />
|
||||||
<xi:include href="coding-conventions.xml" />
|
<xi:include href="coding-conventions.xml" />
|
||||||
|
@ -200,11 +200,9 @@ meta-attributes</title>
|
|||||||
meta.platforms = stdenv.lib.platforms.linux;
|
meta.platforms = stdenv.lib.platforms.linux;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
Attribute Set <varname>stdenv.lib.platforms</varname> in
|
Attribute Set <varname>stdenv.lib.platforms</varname> defines
|
||||||
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/platforms.nix">
|
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/systems/doubles.nix">
|
||||||
<filename>nixpkgs/lib/platforms.nix</filename></link> defines various common
|
various common lists</link> of platforms types.</para></listitem>
|
||||||
lists of platforms types.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
<varlistentry><term><varname>
|
<varlistentry><term><varname>
|
||||||
$outputDevdoc</varname></term><listitem><para>
|
$outputDevdoc</varname></term><listitem><para>
|
||||||
is for <emphasis>developer</emphasis> documentation. Currently we count gtk-doc in there. It goes to <varname>devdoc</varname> or is removed (!) by default. This is because e.g. gtk-doc tends to be rather large and completely unused by nixpkgs users.
|
is for <emphasis>developer</emphasis> documentation. Currently we count gtk-doc and devhelp books in there. It goes to <varname>devdoc</varname> or is removed (!) by default. This is because e.g. gtk-doc tends to be rather large and completely unused by nixpkgs users.
|
||||||
</para></listitem></varlistentry>
|
</para></listitem></varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><varname>
|
<varlistentry><term><varname>
|
||||||
|
@ -476,25 +476,19 @@ it. Place the resulting <filename>package.nix</filename> file into
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>Using the FOSS Radeon drivers</term>
|
<term>Using the FOSS Radeon or nouveau (nvidia) drivers</term>
|
||||||
<listitem><itemizedlist><listitem><para>
|
<listitem><itemizedlist>
|
||||||
The open source radeon drivers need a newer libc++ than is provided
|
<listitem><para>The <literal>newStdcpp</literal> parameter
|
||||||
by the default runtime, which leads to a crash on launch. Use
|
was removed since NixOS 17.09 and should not be needed anymore.
|
||||||
<programlisting>environment.systemPackages = [(pkgs.steam.override { newStdcpp = true; })];</programlisting>
|
</para></listitem>
|
||||||
in your config if you get an error like
|
|
||||||
<programlisting>
|
<listitem><para>
|
||||||
libGL error: unable to load driver: radeonsi_dri.so
|
Steam ships statically linked with a version of libcrypto that
|
||||||
libGL error: driver pointer missing
|
conflics with the one dynamically loaded by radeonsi_dri.so.
|
||||||
libGL error: failed to load driver: radeonsi
|
If you get the error
|
||||||
libGL error: unable to load driver: swrast_dri.so
|
<programlisting>steam.sh: line 713: 7842 Segmentation fault (core dumped)</programlisting>
|
||||||
libGL error: failed to load driver: swrast</programlisting></para></listitem>
|
have a look at <link xlink:href="https://github.com/NixOS/nixpkgs/pull/20269">this pull request</link>.
|
||||||
<listitem><para>
|
</para></listitem>
|
||||||
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>
|
</itemizedlist></listitem></varlistentry>
|
||||||
|
|
||||||
@ -670,4 +664,36 @@ cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el
|
|||||||
|
|
||||||
</section>
|
</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>
|
||||||
|
</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 plugin 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 <literal>python</literal>
|
||||||
|
plugin's <literal>withPackages</literal> attribute:
|
||||||
|
<programlisting>weechat.override {configure = {availablePlugins, ...}: {
|
||||||
|
plugins = with availablePlugins; [
|
||||||
|
(python.withPackages (ps: with ps; [ pycrypto python-dbus ]))
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
83
doc/platform-notes.xml
Normal file
83
doc/platform-notes.xml
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xml:id="chap-platform-nodes">
|
||||||
|
|
||||||
|
<title>Platform Notes</title>
|
||||||
|
|
||||||
|
<section xml:id="sec-darwin">
|
||||||
|
|
||||||
|
<title>Darwin (macOS)</title>
|
||||||
|
<para>Some common issues when packaging software for darwin:</para>
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The darwin <literal>stdenv</literal> uses clang instead of gcc.
|
||||||
|
When referring to the compiler <varname>$CC</varname> or <command>cc</command>
|
||||||
|
will work in both cases. Some builds hardcode gcc/g++ in their
|
||||||
|
build scripts, that can usually be fixed with using something
|
||||||
|
like <literal>makeFlags = [ "CC=cc" ];</literal> or by patching
|
||||||
|
the build scripts.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "libfoo-1.2.3";
|
||||||
|
# ...
|
||||||
|
buildPhase = ''
|
||||||
|
$CC -o hello hello.c
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
On darwin libraries are linked using absolute paths, libraries
|
||||||
|
are resolved by their <literal>install_name</literal> at link
|
||||||
|
time. Sometimes packages won't set this correctly causing the
|
||||||
|
library lookups to fail at runtime. This can be fixed by adding
|
||||||
|
extra linker flags or by running <command>install_name_tool -id</command>
|
||||||
|
during the <function>fixupPhase</function>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "libfoo-1.2.3";
|
||||||
|
# ...
|
||||||
|
makeFlags = stdenv.lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libfoo.dylib";
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Some packages assume xcode is available and use <command>xcrun</command>
|
||||||
|
to resolve build tools like <command>clang</command>, etc.
|
||||||
|
This causes errors like <code>xcode-select: error: no developer tools were found at '/Applications/Xcode.app'</code>
|
||||||
|
while the build doesn't actually depend on xcode.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "libfoo-1.2.3";
|
||||||
|
# ...
|
||||||
|
prePatch = ''
|
||||||
|
substituteInPlace Makefile \
|
||||||
|
--replace '/usr/bin/xcrun clang' clang
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The package <literal>xcbuild</literal> can be used to build projects
|
||||||
|
that really depend on Xcode, however projects that build some kind of
|
||||||
|
graphical interface won't work without using Xcode in an impure way.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
</itemizedlist>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</chapter>
|
@ -340,7 +340,7 @@ $ nix-shell -p nox --run "nox-review -k pr PRNUMBER"
|
|||||||
- [ ] options have default
|
- [ ] options have default
|
||||||
- [ ] options have example
|
- [ ] options have example
|
||||||
- [ ] options have descriptions
|
- [ ] options have descriptions
|
||||||
- [ ] No unneeded package is added to system.environmentPackages
|
- [ ] No unneeded package is added to environment.systemPackages
|
||||||
- [ ] meta.maintainers is set
|
- [ ] meta.maintainers is set
|
||||||
- [ ] module documentation is declared in meta.doc
|
- [ ] module documentation is declared in meta.doc
|
||||||
|
|
||||||
|
20
doc/shell.md
Normal file
20
doc/shell.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
title: pkgs.mkShell
|
||||||
|
author: zimbatm
|
||||||
|
date: 2017-10-30
|
||||||
|
---
|
||||||
|
|
||||||
|
pkgs.mkShell is a special kind of derivation that is only useful when using
|
||||||
|
it combined with nix-shell. It will in fact fail to instantiate when invoked
|
||||||
|
with nix-build.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
|
pkgs.mkShell {
|
||||||
|
# this will make all the build inputs from hello and gnutar available to the shell environment
|
||||||
|
inputsFrom = with pkgs; [ hello gnutar ];
|
||||||
|
buildInputs = [ pkgs.gnumake ];
|
||||||
|
}
|
||||||
|
```
|
504
doc/stdenv.xml
504
doc/stdenv.xml
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
xml:id="chap-stdenv">
|
xml:id="chap-stdenv">
|
||||||
@ -180,6 +179,269 @@ genericBuild
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section xml:id="ssec-stdenv-dependencies"><title>Specifying dependencies</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
As described in the Nix manual, almost any <filename>*.drv</filename> store path in a derivation's attribute set will induce a dependency on that derivation.
|
||||||
|
<varname>mkDerivation</varname>, however, takes a few attributes intended to, between them, include all the dependencies of a package.
|
||||||
|
This is done both for structure and consistency, but also so that certain other setup can take place.
|
||||||
|
For example, certain dependencies need their bin directories added to the <envar>PATH</envar>.
|
||||||
|
That is built-in, but other setup is done via a pluggable mechanism that works in conjunction with these dependency attributes.
|
||||||
|
See <xref linkend="ssec-setup-hooks"/> for details.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Dependencies can be broken down along three axes: their host and target platforms relative to the new derivation's, and whether they are propagated.
|
||||||
|
The platform distinctions are motivated by cross compilation; see <xref linkend="chap-cross"/> for exactly what each platform means.
|
||||||
|
<footnote><para>
|
||||||
|
The build platform is ignored because it is a mere implementation detail of the package satisfying the dependency:
|
||||||
|
As a general programming principle, dependencies are always <emphasis>specified</emphasis> as interfaces, not concrete implementation.
|
||||||
|
</para></footnote>
|
||||||
|
But even if one is not cross compiling, the platforms imply whether or not the dependency is needed at run-time or build-time, a concept that makes perfect sense outside of cross compilation.
|
||||||
|
For now, the run-time/build-time distinction is just a hint for mental clarity, but in the future it perhaps could be enforced.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The extension of <envar>PATH</envar> with dependencies, alluded to above, proceeds according to the relative platforms alone.
|
||||||
|
The process is carried out only for dependencies whose host platform matches the new derivation's build platform–i.e. which run on the platform where the new derivation will be built.
|
||||||
|
<footnote><para>
|
||||||
|
Currently, that means for native builds all dependencies are put on the <envar>PATH</envar>.
|
||||||
|
But in the future that may not be the case for sake of matching cross:
|
||||||
|
the platforms would be assumed to be unique for native and cross builds alike, so only the <varname>depsBuild*</varname> and <varname>nativeBuildDependencies</varname> dependencies would affect the <envar>PATH</envar>.
|
||||||
|
</para></footnote>
|
||||||
|
For each dependency <replaceable>dep</replaceable> of those dependencies, <filename><replaceable>dep</replaceable>/bin</filename>, if present, is added to the <envar>PATH</envar> environment variable.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The dependency is propagated when it forces some of its other-transitive (non-immediate) downstream dependencies to also take it on as an immediate dependency.
|
||||||
|
Nix itself already takes a package's transitive dependencies into account, but this propagation ensures nixpkgs-specific infrastructure like setup hooks (mentioned above) also are run as if the propagated dependency.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
It is important to note dependencies are not necessary propagated as the same sort of dependency that they were before, but rather as the corresponding sort so that the platform rules still line up.
|
||||||
|
The exact rules for dependency propagation can be given by assigning each sort of dependency two integers based one how it's host and target platforms are offset from the depending derivation's platforms.
|
||||||
|
Those offsets are given are given below in the descriptions of each dependency list attribute.
|
||||||
|
Algorithmically, we traverse propagated inputs, accumulating every propagated dep's propagated deps and adjusting them to account for the "shift in perspective" described by the current dep's platform offsets.
|
||||||
|
This results in sort a transitive closure of the dependency relation, with the offsets being approximately summed when two dependency links are combined.
|
||||||
|
We also prune transitive deps whose combined offsets go out-of-bounds, which can be viewed as a filter over that transitive closure removing dependencies that are blatantly absurd.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
We can define the process precisely with <link xlink:href="https://en.wikipedia.org/wiki/Natural_deduction">Natural Deduction</link> using the inference rules.
|
||||||
|
This probably seems a bit obtuse, but so is the bash code that actually implements it!
|
||||||
|
<footnote><para>
|
||||||
|
The <function>findInputs</function> function, currently residing in <filename>pkgs/stdenv/generic/setup.sh</filename>, implements the propagation logic.
|
||||||
|
</para></footnote>
|
||||||
|
They're confusing in very different ways so...hopefully if something doesn't make sense in one presentation, it does in the other!
|
||||||
|
<programlisting>
|
||||||
|
let mapOffset(h, t, i) = i + (if i <= 0 then h else t - 1)
|
||||||
|
|
||||||
|
propagated-dep(h0, t0, A, B)
|
||||||
|
propagated-dep(h1, t1, B, C)
|
||||||
|
h0 + h1 in {-1, 0, 1}
|
||||||
|
h0 + t1 in {-1, 0, 1}
|
||||||
|
-------------------------------------- Transitive property
|
||||||
|
propagated-dep(mapOffset(h0, t0, h1),
|
||||||
|
mapOffset(h0, t0, t1),
|
||||||
|
A, C)</programlisting>
|
||||||
|
<programlisting>
|
||||||
|
let mapOffset(h, t, i) = i + (if i <= 0 then h else t - 1)
|
||||||
|
|
||||||
|
dep(h0, _, A, B)
|
||||||
|
propagated-dep(h1, t1, B, C)
|
||||||
|
h0 + h1 in {-1, 0, 1}
|
||||||
|
h0 + t1 in {-1, 0, -1}
|
||||||
|
-------------------------------------- Take immediate deps' propagated deps
|
||||||
|
propagated-dep(mapOffset(h0, t0, h1),
|
||||||
|
mapOffset(h0, t0, t1),
|
||||||
|
A, C)</programlisting>
|
||||||
|
<programlisting>
|
||||||
|
propagated-dep(h, t, A, B)
|
||||||
|
-------------------------------------- Propagated deps count as deps
|
||||||
|
dep(h, t, A, B)</programlisting>
|
||||||
|
Some explanation of this monstrosity is in order.
|
||||||
|
In the common case, the target offset of a dependency is the successor to the target offset: <literal>t = h + 1</literal>.
|
||||||
|
That means that:
|
||||||
|
<programlisting>
|
||||||
|
let f(h, t, i) = i + (if i <= 0 then h else t - 1)
|
||||||
|
let f(h, h + 1, i) = i + (if i <= 0 then h else (h + 1) - 1)
|
||||||
|
let f(h, h + 1, i) = i + (if i <= 0 then h else h)
|
||||||
|
let f(h, h + 1, i) = i + h
|
||||||
|
</programlisting>
|
||||||
|
This is where the "sum-like" comes from above:
|
||||||
|
We can just sum all the host offset to get the host offset of the transitive dependency.
|
||||||
|
The target offset is the transitive dep is simply the host offset + 1, just as it was with the dependencies composed to make this transitive one;
|
||||||
|
it can be ignored as it doesn't add any new information.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Because of the bounds checks, the uncommon cases are <literal>h = t</literal> and <literal>h + 2 = t</literal>.
|
||||||
|
In the former case, the motivation for <function>mapOffset</function> is that since its host and target platforms are the same, no transitive dep of it should be able to "discover" an offset greater than its reduced target offsets.
|
||||||
|
<function>mapOffset</function> effectively "squashes" all its transitive dependencies' offsets so that none will ever be greater than the target offset of the original <literal>h = t</literal> package.
|
||||||
|
In the other case, <literal>h + 1</literal> is skipped over between the host and target offsets.
|
||||||
|
Instead of squashing the offsets, we need to "rip" them apart so no transitive dependencies' offset is that one.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Overall, the unifying theme here is that propagation shouldn't be introducing transitive dependencies involving platforms the needing package is unaware of.
|
||||||
|
The offset bounds checking and definition of <function>mapOffset</function> together ensure that this is the case.
|
||||||
|
Discovering a new offset is discovering a new platform, and since those platforms weren't in the derivation "spec" of the needing package, they cannot be relevant.
|
||||||
|
From a capability perspective, we can imagine that the host and target platforms of a package are the capabilities a package requires, and the depending package must provide the capability to the dependency.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<title>Variables specifying dependencies</title>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>depsBuildBuild</varname></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
A list of dependencies whose host and target platforms are the new derivation's build platform.
|
||||||
|
This means a <literal>-1</literal> host and <literal>-1</literal> target offset from the new derivation's platforms.
|
||||||
|
They are programs/libraries used at build time that furthermore produce programs/libraries also used at build time.
|
||||||
|
If the dependency doesn't care about the target platform (i.e. isn't a compiler or similar tool), put it in <varname>nativeBuildInputs</varname>instead.
|
||||||
|
The most common use for this <literal>buildPackages.stdenv.cc</literal>, the default C compiler for this role.
|
||||||
|
That example crops up more than one might think in old commonly used C libraries.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Since these packages are able to be run at build time, that are always added to the <envar>PATH</envar>, as described above.
|
||||||
|
But since these packages are only guaranteed to be able to run then, they shouldn't persist as run-time dependencies.
|
||||||
|
This isn't currently enforced, but could be in the future.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>nativeBuildInputs</varname></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
A list of dependencies whose host platform is the new derivation's build platform, and target platform is the new derivation's host platform.
|
||||||
|
This means a <literal>-1</literal> host offset and <literal>0</literal> target offset from the new derivation's platforms.
|
||||||
|
They are programs/libraries used at build time that, if they are a compiler or similar tool, produce code to run at run time—i.e. tools used to build the new derivation.
|
||||||
|
If the dependency doesn't care about the target platform (i.e. isn't a compiler or similar tool), put it here, rather than in <varname>depsBuildBuild</varname> or <varname>depsBuildTarget</varname>.
|
||||||
|
This would be called <varname>depsBuildHost</varname> but for historical continuity.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Since these packages are able to be run at build time, that are added to the <envar>PATH</envar>, as described above.
|
||||||
|
But since these packages only are guaranteed to be able to run then, they shouldn't persist as run-time dependencies.
|
||||||
|
This isn't currently enforced, but could be in the future.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>depsBuildTarget</varname></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
A list of dependencies whose host platform is the new derivation's build platform, and target platform is the new derivation's target platform.
|
||||||
|
This means a <literal>-1</literal> host offset and <literal>1</literal> target offset from the new derivation's platforms.
|
||||||
|
They are programs used at build time that produce code to run at run with code produced by the depending package.
|
||||||
|
Most commonly, these would tools used to build the runtime or standard library the currently-being-built compiler will inject into any code it compiles.
|
||||||
|
In many cases, the currently-being built compiler is itself employed for that task, but when that compiler won't run (i.e. its build and host platform differ) this is not possible.
|
||||||
|
Other times, the compiler relies on some other tool, like binutils, that is always built separately so the dependency is unconditional.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This is a somewhat confusing dependency to wrap ones head around, and for good reason.
|
||||||
|
As the only one where the platform offsets are not adjacent integers, it requires thinking of a bootstrapping stage <emphasis>two</emphasis> away from the current one.
|
||||||
|
It and it's use-case go hand in hand and are both considered poor form:
|
||||||
|
try not to need this sort dependency, and try not avoid building standard libraries / runtimes in the same derivation as the compiler produces code using them.
|
||||||
|
Instead strive to build those like a normal library, using the newly-built compiler just as a normal library would.
|
||||||
|
In short, do not use this attribute unless you are packaging a compiler and are sure it is needed.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Since these packages are able to be run at build time, that are added to the <envar>PATH</envar>, as described above.
|
||||||
|
But since these packages only are guaranteed to be able to run then, they shouldn't persist as run-time dependencies.
|
||||||
|
This isn't currently enforced, but could be in the future.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>depsHostHost</varname></term>
|
||||||
|
<listitem><para>
|
||||||
|
A list of dependencies whose host and target platforms match the new derivation's host platform.
|
||||||
|
This means a both <literal>0</literal> host offset and <literal>0</literal> target offset from the new derivation's host platform.
|
||||||
|
These are packages used at run-time to generate code also used at run-time.
|
||||||
|
In practice, that would usually be tools used by compilers for metaprogramming/macro systems, or libraries used by the macros/metaprogramming code itself.
|
||||||
|
It's always preferable to use a <varname>depsBuildBuild</varname> dependency in the derivation being built than a <varname>depsHostHost</varname> on the tool doing the building for this purpose.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>buildInputs</varname></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
A list of dependencies whose host platform and target platform match the new derivation's.
|
||||||
|
This means a <literal>0</literal> host offset and <literal>1</literal> target offset from the new derivation's host platform.
|
||||||
|
This would be called <varname>depsHostTarget</varname> but for historical continuity.
|
||||||
|
If the dependency doesn't care about the target platform (i.e. isn't a compiler or similar tool), put it here, rather than in <varname>depsBuildBuild</varname>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
These often are programs/libraries used by the new derivation at <emphasis>run</emphasis>-time, but that isn't always the case.
|
||||||
|
For example, the machine code in a statically linked library is only used at run time, but the derivation containing the library is only needed at build time.
|
||||||
|
Even in the dynamic case, the library may also be needed at build time to appease the linker.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>depsTargetTarget</varname></term>
|
||||||
|
<listitem><para>
|
||||||
|
A list of dependencies whose host platform matches the new derivation's target platform.
|
||||||
|
This means a <literal>1</literal> offset from the new derivation's platforms.
|
||||||
|
These are packages that run on the target platform, e.g. the standard library or run-time deps of standard library that a compiler insists on knowing about.
|
||||||
|
It's poor form in almost all cases for a package to depend on another from a future stage [future stage corresponding to positive offset].
|
||||||
|
Do not use this attribute unless you are packaging a compiler and are sure it is needed.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>depsBuildBuildPropagated</varname></term>
|
||||||
|
<listitem><para>
|
||||||
|
The propagated equivalent of <varname>depsBuildBuild</varname>.
|
||||||
|
This perhaps never ought to be used, but it is included for consistency [see below for the others].
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>propagatedNativeBuildInputs</varname></term>
|
||||||
|
<listitem><para>
|
||||||
|
The propagated equivalent of <varname>nativeBuildInputs</varname>.
|
||||||
|
This would be called <varname>depsBuildHostPropagated</varname> but for historical continuity.
|
||||||
|
For example, if package <varname>Y</varname> has <literal>propagatedNativeBuildInputs = [X]</literal>, and package <varname>Z</varname> has <literal>buildInputs = [Y]</literal>, then package <varname>Z</varname> will be built as if it included package <varname>X</varname> in its <varname>nativeBuildInputs</varname>.
|
||||||
|
If instead, package <varname>Z</varname> has <literal>nativeBuildInputs = [Y]</literal>, then <varname>Z</varname> will be built as if it included <varname>X</varname> in the <varname>depsBuildBuild</varname> of package <varname>Z</varname>, because of the sum of the two <literal>-1</literal> host offsets.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>depsBuildTargetPropagated</varname></term>
|
||||||
|
<listitem><para>
|
||||||
|
The propagated equivalent of <varname>depsBuildTarget</varname>.
|
||||||
|
This is prefixed for the same reason of alerting potential users.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>depsHostHostPropagated</varname></term>
|
||||||
|
<listitem><para>
|
||||||
|
The propagated equivalent of <varname>depsHostHost</varname>.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>propagatedBuildInputs</varname></term>
|
||||||
|
<listitem><para>
|
||||||
|
The propagated equivalent of <varname>buildInputs</varname>.
|
||||||
|
This would be called <varname>depsHostTargetPropagated</varname> but for historical continuity.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>depsTargetTarget</varname></term>
|
||||||
|
<listitem><para>
|
||||||
|
The propagated equivalent of <varname>depsTargetTarget</varname>.
|
||||||
|
This is prefixed for the same reason of alerting potential users.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<section xml:id="ssec-stdenv-attributes"><title>Attributes</title>
|
<section xml:id="ssec-stdenv-attributes"><title>Attributes</title>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
@ -188,57 +450,12 @@ genericBuild
|
|||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>NIX_DEBUG</varname></term>
|
<term><varname>NIX_DEBUG</varname></term>
|
||||||
<listitem><para>If set, <literal>stdenv</literal> will print some
|
|
||||||
debug information during the build. In particular, the
|
|
||||||
<command>gcc</command> and <command>ld</command> wrapper scripts
|
|
||||||
will print out the complete command line passed to the wrapped
|
|
||||||
tools.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<title>Variables specifying dependencies</title>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><varname>nativeBuildInputs</varname></term>
|
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
A list of dependencies used by the new derivation at <emphasis>build</emphasis>-time.
|
A natural number indicating how much information to log.
|
||||||
I.e. these dependencies should not make it into the package's runtime-closure, though this is currently not checked.
|
If set to 1 or higher, <literal>stdenv</literal> will print moderate debug information during the build.
|
||||||
For each dependency <replaceable>dir</replaceable>, the directory <filename><replaceable>dir</replaceable>/bin</filename>, if it exists, is added to the <envar>PATH</envar> environment variable.
|
In particular, the <command>gcc</command> and <command>ld</command> wrapper scripts will print out the complete command line passed to the wrapped tools.
|
||||||
Other environment variables are also set up via a pluggable mechanism.
|
If set to 6 or higher, the <literal>stdenv</literal> setup script will be run with <literal>set -x</literal> tracing.
|
||||||
For instance, if <varname>buildInputs</varname> contains Perl, then the <filename>lib/site_perl</filename> subdirectory of each input is added to the <envar>PERL5LIB</envar> environment variable.
|
If set to 7 or higher, the <command>gcc</command> and <command>ld</command> wrapper scripts will also be run with <literal>set -x</literal> tracing.
|
||||||
See <xref linkend="ssec-setup-hooks"/> for details.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><varname>buildInputs</varname></term>
|
|
||||||
<listitem><para>
|
|
||||||
A list of dependencies used by the new derivation at <emphasis>run</emphasis>-time.
|
|
||||||
Currently, the build-time environment is modified in the exact same way as with <varname>nativeBuildInputs</varname>.
|
|
||||||
This is problematic in that when cross-compiling, foreign executables can clobber native ones on the <envar>PATH</envar>.
|
|
||||||
Even more confusing is static-linking.
|
|
||||||
A statically-linked library should be listed here because ultimately that generated machine code will be used at run-time, even though a derivation containing the object files or static archives will only be used at build-time.
|
|
||||||
A less confusing solution to this would be nice.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><varname>propagatedNativeBuildInputs</varname></term>
|
|
||||||
<listitem><para>
|
|
||||||
Like <varname>nativeBuildInputs</varname>, but these dependencies are <emphasis>propagated</emphasis>:
|
|
||||||
that is, the dependencies listed here are added to the <varname>nativeBuildInputs</varname> of any package that uses <emphasis>this</emphasis> package as a dependency.
|
|
||||||
So if package Y has <literal>propagatedBuildInputs = [X]</literal>, and package Z has <literal>buildInputs = [Y]</literal>, then package X will appear in Z’s build environment automatically.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><varname>propagatedBuildInputs</varname></term>
|
|
||||||
<listitem><para>
|
|
||||||
Like <varname>buildInputs</varname>, but propagated just like <varname>propagatedNativeBuildInputs</varname>.
|
|
||||||
This inherits <varname>buildInputs</varname>'s flaws of clobbering native executables when cross-compiling and being confusing for static linking.
|
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -249,10 +466,17 @@ genericBuild
|
|||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>enableParallelBuilding</varname></term>
|
<term><varname>enableParallelBuilding</varname></term>
|
||||||
<listitem><para>If set, <literal>stdenv</literal> will pass specific
|
<listitem>
|
||||||
flags to <literal>make</literal> and other build tools to enable
|
<para>If set to <literal>true</literal>, <literal>stdenv</literal> will
|
||||||
parallel building with up to <literal>build-cores</literal>
|
pass specific flags to <literal>make</literal> and other build tools to
|
||||||
workers.</para></listitem>
|
enable parallel building with up to <literal>build-cores</literal>
|
||||||
|
workers.</para>
|
||||||
|
|
||||||
|
<para>Unless set to <literal>false</literal>, some build systems with good
|
||||||
|
support for parallel building including <literal>cmake</literal>,
|
||||||
|
<literal>meson</literal>, and <literal>qmake</literal> will set it to
|
||||||
|
<literal>true</literal>.</para>
|
||||||
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -647,7 +871,7 @@ script) if it exists.</para>
|
|||||||
By default, when cross compiling, the configure script has <option>--build=...</option> and <option>--host=...</option> passed.
|
By default, when cross compiling, the configure script has <option>--build=...</option> and <option>--host=...</option> passed.
|
||||||
Packages can instead pass <literal>[ "build" "host" "target" ]</literal> or a subset to control exactly which platform flags are passed.
|
Packages can instead pass <literal>[ "build" "host" "target" ]</literal> or a subset to control exactly which platform flags are passed.
|
||||||
Compilers and other tools should use this to also pass the target platform, for example.
|
Compilers and other tools should use this to also pass the target platform, for example.
|
||||||
Note eventually these will be passed when in native builds too, to improve determinism: build-time guessing, as is done today, is a risk of impurity.
|
<footnote><para>Eventually these will be passed when in native builds too, to improve determinism: build-time guessing, as is done today, is a risk of impurity.</para></footnote>
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -697,8 +921,14 @@ nothing.</para>
|
|||||||
<listitem><para>A list of strings passed as additional flags to
|
<listitem><para>A list of strings passed as additional flags to
|
||||||
<command>make</command>. These flags are also used by the default
|
<command>make</command>. These flags are also used by the default
|
||||||
install and check phase. For setting make flags specific to the
|
install and check phase. For setting make flags specific to the
|
||||||
build phase, use <varname>buildFlags</varname> (see
|
build phase, use <varname>buildFlags</varname> (see below).
|
||||||
below).</para></listitem>
|
|
||||||
|
<programlisting>
|
||||||
|
makeFlags = [ "PREFIX=$(out)" ];
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
<note><para>The flags are quoted in bash, but environment variables can
|
||||||
|
be specified by using the make syntax.</para></note></para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -765,13 +995,14 @@ but only if the <varname>doCheck</varname> variable is enabled.</para>
|
|||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>doCheck</varname></term>
|
<term><varname>doCheck</varname></term>
|
||||||
<listitem><para>If set to a non-empty string, the check phase is
|
<listitem><para>
|
||||||
executed, otherwise it is skipped (default). Thus you should set
|
Controls whether the check phase is executed.
|
||||||
|
By default it is skipped, but if <varname>doCheck</varname> is set to true, the check phase is usually executed.
|
||||||
<programlisting>
|
Thus you should set <programlisting>doCheck = true;</programlisting> in the derivation to enable checks.
|
||||||
doCheck = true;</programlisting>
|
The exception is cross compilation.
|
||||||
|
Cross compiled builds never run tests, no matter how <varname>doCheck</varname> is set,
|
||||||
in the derivation to enable checks.</para></listitem>
|
as the newly-built program won't run on the platform used to build it.
|
||||||
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -908,6 +1139,20 @@ following:
|
|||||||
<listitem><para>If set, libraries and executables are not
|
<listitem><para>If set, libraries and executables are not
|
||||||
stripped. By default, they are.</para></listitem>
|
stripped. By default, they are.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>dontStripHost</varname></term>
|
||||||
|
<listitem><para>
|
||||||
|
Like <varname>dontStripHost</varname>, but only affects the <command>strip</command> command targetting the package's host platform.
|
||||||
|
Useful when supporting cross compilation, but otherwise feel free to ignore.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>dontStripTarget</varname></term>
|
||||||
|
<listitem><para>
|
||||||
|
Like <varname>dontStripHost</varname>, but only affects the <command>strip</command> command targetting the packages' target platform.
|
||||||
|
Useful when supporting cross compilation, but otherwise feel free to ignore.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>dontMoveSbin</varname></term>
|
<term><varname>dontMoveSbin</varname></term>
|
||||||
@ -1036,12 +1281,14 @@ installcheck</command>.</para>
|
|||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>doInstallCheck</varname></term>
|
<term><varname>doInstallCheck</varname></term>
|
||||||
<listitem><para>If set to a non-empty string, the installCheck phase is
|
<listitem><para>
|
||||||
executed, otherwise it is skipped (default). Thus you should set
|
Controls whether the installCheck phase is executed.
|
||||||
|
By default it is skipped, but if <varname>doInstallCheck</varname> is set to true, the installCheck phase is usually executed.
|
||||||
<programlisting>doInstallCheck = true;</programlisting>
|
Thus you should set <programlisting>doInstallCheck = true;</programlisting> in the derivation to enable install checks.
|
||||||
|
The exception is cross compilation.
|
||||||
in the derivation to enable install checks.</para></listitem>
|
Cross compiled builds never run tests, no matter how <varname>doInstallCheck</varname> is set,
|
||||||
|
as the newly-built program won't run on the platform used to build it.
|
||||||
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -1338,46 +1585,127 @@ someVar=$(stripHash $name)
|
|||||||
|
|
||||||
<section xml:id="ssec-setup-hooks"><title>Package setup hooks</title>
|
<section xml:id="ssec-setup-hooks"><title>Package setup hooks</title>
|
||||||
|
|
||||||
<para>The following packages provide a setup hook:
|
<para>
|
||||||
|
Nix itself considers a build-time dependency merely something that should previously be built and accessible at build time—packages themselves are on their own to perform any additional setup.
|
||||||
|
In most cases, that is fine, and the downstream derivation can deal with it's own dependencies.
|
||||||
|
But for a few common tasks, that would result in almost every package doing the same sort of setup work---depending not on the package itself, but entirely on which dependencies were used.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
In order to alleviate this burden, the <firstterm>setup hook></firstterm>mechanism was written, where any package can include a shell script that [by convention rather than enforcement by Nix], any downstream reverse-dependency will source as part of its build process.
|
||||||
|
That allows the downstream dependency to merely specify its dependencies, and lets those dependencies effectively initialize themselves.
|
||||||
|
No boilerplate mirroring the list of dependencies is needed.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The Setup hook mechanism is a bit of a sledgehammer though: a powerful feature with a broad and indiscriminate area of effect.
|
||||||
|
The combination of its power and implicit use may be expedient, but isn't without costs.
|
||||||
|
Nix itself is unchanged, but the spirit of adding dependencies being effect-free is violated even if the letter isn't.
|
||||||
|
For example, if a derivation path is mentioned more than once, Nix itself doesn't care and simply makes sure the dependency derivation is already built just the same—depending is just needing something to exist, and needing is idempotent.
|
||||||
|
However, a dependency specified twice will have its setup hook run twice, and that could easily change the build environment (though a well-written setup hook will therefore strive to be idempotent so this is in fact not observable).
|
||||||
|
More broadly, setup hooks are anti-modular in that multiple dependencies, whether the same or different, should not interfere and yet their setup hooks may well do so.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The most typical use of the setup hook is actually to add other hooks which are then run (i.e. after all the setup hooks) on each dependency.
|
||||||
|
For example, the C compiler wrapper's setup hook feeds itself flags for each dependency that contains relevant libaries and headers.
|
||||||
|
This is done by defining a bash function, and appending its name to one of
|
||||||
|
<envar>envBuildBuildHooks</envar>`,
|
||||||
|
<envar>envBuildHostHooks</envar>`,
|
||||||
|
<envar>envBuildTargetHooks</envar>`,
|
||||||
|
<envar>envHostHostHooks</envar>`,
|
||||||
|
<envar>envHostTargetHooks</envar>`, or
|
||||||
|
<envar>envTargetTargetHooks</envar>`.
|
||||||
|
These 6 bash variables correspond to the 6 sorts of dependencies by platform (there's 12 total but we ignore the propagated/non-propagated axis).
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Packages adding a hook should not hard code a specific hook, but rather choose a variable <emphasis>relative</emphasis> to how they are included.
|
||||||
|
Returning to the C compiler wrapper example, if it itself is an <literal>n</literal> dependency, then it only wants to accumulate flags from <literal>n + 1</literal> dependencies, as only those ones match the compiler's target platform.
|
||||||
|
The <envar>hostOffset</envar> variable is defined with the current dependency's host offset <envar>targetOffset</envar> with its target offset, before it's setup hook is sourced.
|
||||||
|
Additionally, since most environment hooks don't care about the target platform,
|
||||||
|
That means the setup hook can append to the right bash array by doing something like
|
||||||
|
<programlisting language="bash">
|
||||||
|
addEnvHooks "$hostOffset" myBashFunction
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The <emphasis>existence</emphasis> of setups hooks has long been documented and packages inside Nixpkgs are free to use these mechanism.
|
||||||
|
Other packages, however, should not rely on these mechanisms not changing between Nixpkgs versions.
|
||||||
|
Because of the existing issues with this system, there's little benefit from mandating it be stable for any period of time.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Here are some packages that provide a setup hook.
|
||||||
|
Since the mechanism is modular, this probably isn't an exhaustive list.
|
||||||
|
Then again, since the mechanism is only to be used as a last resort, it might be.
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>CC Wrapper</term>
|
<term>Bintools Wrapper</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
CC Wrapper wraps a C toolchain for a bunch of miscellaneous purposes.
|
Bintools Wrapper wraps the binary utilities for a bunch of miscellaneous purposes.
|
||||||
Specifically, a C compiler (GCC or Clang), Binutils (or the CCTools + binutils mashup when targetting Darwin), and a C standard library (glibc or Darwin's libSystem) are all fed in, and dependency finding, hardening (see below), and purity checks for each are handled by CC Wrapper.
|
These are GNU Binutils when targetting Linux, and a mix of cctools and GNU binutils for Darwin.
|
||||||
Packages typically depend on only CC Wrapper, instead of those 3 inputs directly.
|
[The "Bintools" name is supposed to be a compromise between "Binutils" and "cctools" not denoting any specific implementation.]
|
||||||
|
Specifically, the underlying bintools package, and a C standard library (glibc or Darwin's libSystem, just for the dynamic loader) are all fed in, and dependency finding, hardening (see below), and purity checks for each are handled by Bintools Wrapper.
|
||||||
|
Packages typically depend on CC Wrapper, which in turn (at run time) depends on Bintools Wrapper.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Dependency finding is undoubtedly the main task of CC wrapper.
|
Bintools Wrapper was only just recently split off from CC Wrapper, so the division of labor is still being worked out.
|
||||||
|
For example, it shouldn't care about about the C standard library, but just take a derivation with the dynamic loader (which happens to be the glibc on linux).
|
||||||
|
Dependency finding however is a task both wrappers will continue to need to share, and probably the most important to understand.
|
||||||
It is currently accomplished by collecting directories of host-platform dependencies (i.e. <varname>buildInputs</varname> and <varname>nativeBuildInputs</varname>) in environment variables.
|
It is currently accomplished by collecting directories of host-platform dependencies (i.e. <varname>buildInputs</varname> and <varname>nativeBuildInputs</varname>) in environment variables.
|
||||||
CC wrapper's setup hook causes any <filename>include</filename> subdirectory of such a dependency to be added to <envar>NIX_CFLAGS_COMPILE</envar>, and any <filename>lib</filename> and <filename>lib64</filename> subdirectories to <envar>NIX_LDFLAGS</envar>.
|
Bintools Wrapper's setup hook causes any <filename>lib</filename> and <filename>lib64</filename> subdirectories to be added to <envar>NIX_LDFLAGS</envar>.
|
||||||
The setup hook itself contains some lengthy comments describing the exact convoluted mechanism by which this is accomplished.
|
Since CC Wrapper and Bintools Wrapper use the same strategy, most of the Bintools Wrapper code is sparsely commented and refers to CC Wrapper.
|
||||||
|
But CC Wrapper's code, by contrast, has quite lengthy comments.
|
||||||
|
Bintools Wrapper merely cites those, rather than repeating them, to avoid falling out of sync.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
A final task of the setup hook is defining a number of standard environment variables to tell build systems which executables full-fill which purpose.
|
A final task of the setup hook is defining a number of standard environment variables to tell build systems which executables full-fill which purpose.
|
||||||
They are defined to just be the base name of the tools, under the assumption that CC Wrapper's binaries will be on the path.
|
They are defined to just be the base name of the tools, under the assumption that Bintools Wrapper's binaries will be on the path.
|
||||||
Firstly, this helps poorly-written packages, e.g. ones that look for just <command>gcc</command> when <envar>CC</envar> isn't defined yet <command>clang</command> is to be used.
|
Firstly, this helps poorly-written packages, e.g. ones that look for just <command>gcc</command> when <envar>CC</envar> isn't defined yet <command>clang</command> is to be used.
|
||||||
Secondly, this helps packages not get confused when cross-compiling, in which case multiple CC wrappers may be simultaneous in use (targeting different platforms).
|
Secondly, this helps packages not get confused when cross-compiling, in which case multiple Bintools Wrappers may simultaneously be in use.
|
||||||
<envar>BUILD_</envar>- and <envar>TARGET_</envar>-prefixed versions of the normal environment variable are defined for the additional CC Wrappers, properly disambiguating them.
|
<footnote><para>
|
||||||
|
Each wrapper targets a single platform, so if binaries for multiple platforms are needed, the underlying binaries must be wrapped multiple times.
|
||||||
|
As this is a property of the wrapper itself, the multiple wrappings are needed whether or not the same underlying binaries can target multiple platforms.
|
||||||
|
</para></footnote>
|
||||||
|
<envar>BUILD_</envar>- and <envar>TARGET_</envar>-prefixed versions of the normal environment variable are defined for the additional Bintools Wrappers, properly disambiguating them.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
A problem with this final task is that CC Wrapper is honest and defines <envar>LD</envar> as <command>ld</command>.
|
A problem with this final task is that Bintools Wrapper is honest and defines <envar>LD</envar> as <command>ld</command>.
|
||||||
Most packages, however, firstly use the C compiler for linking, secondly use <envar>LD</envar> anyways, defining it as the C compiler, and thirdly, only so define <envar>LD</envar> when it is undefined as a fallback.
|
Most packages, however, firstly use the C compiler for linking, secondly use <envar>LD</envar> anyways, defining it as the C compiler, and thirdly, only so define <envar>LD</envar> when it is undefined as a fallback.
|
||||||
This triple-threat means CC Wrapper will break those packages, as LD is already defined as the actually linker which the package won't override yet doesn't want to use.
|
This triple-threat means Bintools Wrapper will break those packages, as LD is already defined as the actual linker which the package won't override yet doesn't want to use.
|
||||||
The workaround is to define, just for the problematic package, <envar>LD</envar> as the C compiler.
|
The workaround is to define, just for the problematic package, <envar>LD</envar> as the C compiler.
|
||||||
A good way to do this would be <command>preConfigure = "LD=$CC"</command>.
|
A good way to do this would be <command>preConfigure = "LD=$CC"</command>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>CC Wrapper</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
CC Wrapper wraps a C toolchain for a bunch of miscellaneous purposes.
|
||||||
|
Specifically, a C compiler (GCC or Clang), wrapped binary tools, and a C standard library (glibc or Darwin's libSystem, just for the dynamic loader) are all fed in, and dependency finding, hardening (see below), and purity checks for each are handled by CC Wrapper.
|
||||||
|
Packages typically depend on CC Wrapper, which in turn (at run time) depends on Bintools Wrapper.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Dependency finding is undoubtedly the main task of CC Wrapper.
|
||||||
|
This works just like Bintools Wrapper, except that any <filename>include</filename> subdirectory of any relevant dependency is added to <envar>NIX_CFLAGS_COMPILE</envar>.
|
||||||
|
The setup hook itself contains some lengthy comments describing the exact convoluted mechanism by which this is accomplished.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
CC Wrapper also like Bintools Wrapper defines standard environment variables with the names of the tools it wraps, for the same reasons described above.
|
||||||
|
Importantly, while it includes a <command>cc</command> symlink to the c compiler for portability, the <envar>CC</envar> will be defined using the compiler's "real name" (i.e. <command>gcc</command> or <command>clang</command>).
|
||||||
|
This helps lousy build systems that inspect on the name of the compiler rather than run it.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>Perl</term>
|
<term>Perl</term>
|
||||||
<listitem><para>Adds the <filename>lib/site_perl</filename> subdirectory
|
<listitem>
|
||||||
of each build input to the <envar>PERL5LIB</envar>
|
<para>
|
||||||
environment variable.</para></listitem>
|
Adds the <filename>lib/site_perl</filename> subdirectory of each build input to the <envar>PERL5LIB</envar> environment variable.
|
||||||
|
For instance, if <varname>buildInputs</varname> contains Perl, then the <filename>lib/site_perl</filename> subdirectory of each input is added to the <envar>PERL5LIB</envar> environment variable.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
|
@ -61,7 +61,7 @@ $ git checkout -b 'fix/pkg-name-update'
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>Format the commit in a following way:</para>
|
<para>Format the commit in a following way:</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
(pkg-name | service-name): (from -> to | init at version | refactor | etc)
|
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
|
||||||
Additional information.
|
Additional information.
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
@ -84,13 +84,13 @@ Additional information.
|
|||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<command>hydra service: add bazBaz option</command>
|
<command>nixos/hydra: add bazBaz option</command>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<command>nginx service: refactor config generation</command>
|
<command>nixos/nginx: refactor config generation</command>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
@ -196,7 +196,7 @@ Additional information.
|
|||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Write the title in format <command>(pkg-name | service): improvement</command>.
|
<para>Write the title in format <command>(pkg-name | nixos/<module>): improvement</command>.
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
|
{ lib }:
|
||||||
# Operations on attribute sets.
|
# Operations on attribute sets.
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (builtins) head tail length;
|
inherit (builtins) head tail length;
|
||||||
inherit (import ./trivial.nix) and or;
|
inherit (lib.trivial) and or;
|
||||||
inherit (import ./default.nix) fold;
|
inherit (lib.strings) concatStringsSep;
|
||||||
inherit (import ./strings.nix) concatStringsSep;
|
inherit (lib.lists) fold concatMap concatLists all deepSeqList;
|
||||||
inherit (import ./lists.nix) concatMap concatLists all deepSeqList;
|
|
||||||
in
|
in
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
{ lib }:
|
||||||
let
|
let
|
||||||
|
|
||||||
lib = import ./default.nix;
|
|
||||||
inherit (builtins) attrNames isFunction;
|
inherit (builtins) attrNames isFunction;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
let lib = import ./default.nix;
|
{ lib }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
inherit (builtins) trace attrNamesToStr isAttrs isFunction isList isInt
|
inherit (builtins) trace attrNamesToStr isAttrs isFunction isList isInt
|
||||||
isString isBool head substring attrNames;
|
isString isBool head substring attrNames;
|
||||||
|
156
lib/default.nix
156
lib/default.nix
@ -5,58 +5,126 @@
|
|||||||
*/
|
*/
|
||||||
let
|
let
|
||||||
|
|
||||||
# often used, or depending on very little
|
callLibs = file: import file { inherit lib; };
|
||||||
trivial = import ./trivial.nix;
|
|
||||||
fixedPoints = import ./fixed-points.nix;
|
|
||||||
|
|
||||||
# datatypes
|
lib = rec {
|
||||||
attrsets = import ./attrsets.nix;
|
|
||||||
lists = import ./lists.nix;
|
|
||||||
strings = import ./strings.nix;
|
|
||||||
stringsWithDeps = import ./strings-with-deps.nix;
|
|
||||||
|
|
||||||
# packaging
|
# often used, or depending on very little
|
||||||
customisation = import ./customisation.nix;
|
trivial = callLibs ./trivial.nix;
|
||||||
maintainers = import ./maintainers.nix;
|
fixedPoints = callLibs ./fixed-points.nix;
|
||||||
meta = import ./meta.nix;
|
|
||||||
sources = import ./sources.nix;
|
|
||||||
|
|
||||||
# module system
|
# datatypes
|
||||||
modules = import ./modules.nix;
|
attrsets = callLibs ./attrsets.nix;
|
||||||
options = import ./options.nix;
|
lists = callLibs ./lists.nix;
|
||||||
types = import ./types.nix;
|
strings = callLibs ./strings.nix;
|
||||||
|
stringsWithDeps = callLibs ./strings-with-deps.nix;
|
||||||
|
|
||||||
# constants
|
# packaging
|
||||||
licenses = import ./licenses.nix;
|
customisation = callLibs ./customisation.nix;
|
||||||
systems = import ./systems;
|
maintainers = callLibs ./maintainers.nix;
|
||||||
|
meta = callLibs ./meta.nix;
|
||||||
|
sources = callLibs ./sources.nix;
|
||||||
|
|
||||||
# misc
|
|
||||||
debug = import ./debug.nix;
|
|
||||||
generators = import ./generators.nix;
|
|
||||||
misc = import ./deprecated.nix;
|
|
||||||
|
|
||||||
# domain-specific
|
# module system
|
||||||
sandbox = import ./sandbox.nix;
|
modules = callLibs ./modules.nix;
|
||||||
fetchers = import ./fetchers.nix;
|
options = callLibs ./options.nix;
|
||||||
|
types = callLibs ./types.nix;
|
||||||
|
|
||||||
# Eval-time filesystem handling
|
# constants
|
||||||
filesystem = import ./filesystem.nix;
|
licenses = callLibs ./licenses.nix;
|
||||||
|
systems = callLibs ./systems;
|
||||||
|
|
||||||
in
|
# misc
|
||||||
{ inherit trivial fixedPoints
|
debug = callLibs ./debug.nix;
|
||||||
attrsets lists strings stringsWithDeps
|
|
||||||
customisation maintainers meta sources
|
generators = callLibs ./generators.nix;
|
||||||
modules options types
|
misc = callLibs ./deprecated.nix;
|
||||||
licenses systems
|
# domain-specific
|
||||||
debug generators misc
|
fetchers = callLibs ./fetchers.nix;
|
||||||
sandbox fetchers filesystem;
|
|
||||||
|
# Eval-time filesystem handling
|
||||||
|
filesystem = callLibs ./filesystem.nix;
|
||||||
|
|
||||||
# back-compat aliases
|
# back-compat aliases
|
||||||
platforms = systems.doubles;
|
platforms = systems.doubles;
|
||||||
}
|
|
||||||
# !!! don't include everything at top-level; perhaps only the most
|
inherit (builtins) add addErrorContext attrNames
|
||||||
# commonly used functions.
|
concatLists deepSeq elem elemAt filter genericClosure genList
|
||||||
// trivial // fixedPoints
|
getAttr hasAttr head isAttrs isBool isFunction isInt isList
|
||||||
// lists // strings // stringsWithDeps // attrsets // sources
|
isString length lessThan listToAttrs pathExists readFile
|
||||||
// options // types // meta // debug // misc // modules
|
replaceStrings seq stringLength sub substring tail;
|
||||||
// customisation
|
inherit (trivial) id const concat or and boolToString mergeAttrs
|
||||||
|
flip mapNullable inNixShell min max importJSON warn info
|
||||||
|
nixpkgsVersion mod;
|
||||||
|
|
||||||
|
inherit (fixedPoints) fix fix' extends composeExtensions
|
||||||
|
makeExtensible makeExtensibleWithCustomName;
|
||||||
|
inherit (attrsets) attrByPath hasAttrByPath setAttrByPath
|
||||||
|
getAttrFromPath attrVals attrValues catAttrs filterAttrs
|
||||||
|
filterAttrsRecursive foldAttrs collect nameValuePair mapAttrs
|
||||||
|
mapAttrs' mapAttrsToList mapAttrsRecursive mapAttrsRecursiveCond
|
||||||
|
genAttrs isDerivation toDerivation optionalAttrs
|
||||||
|
zipAttrsWithNames zipAttrsWith zipAttrs recursiveUpdateUntil
|
||||||
|
recursiveUpdate matchAttrs overrideExisting getOutput getBin
|
||||||
|
getLib getDev chooseDevOutputs zipWithNames zip;
|
||||||
|
inherit (lists) singleton foldr fold foldl foldl' imap0 imap1
|
||||||
|
concatMap flatten remove findSingle findFirst any all count
|
||||||
|
optional optionals toList range partition zipListsWith zipLists
|
||||||
|
reverseList listDfs toposort sort take drop sublist last init
|
||||||
|
crossLists unique intersectLists subtractLists
|
||||||
|
mutuallyExclusive;
|
||||||
|
inherit (strings) concatStrings concatMapStrings concatImapStrings
|
||||||
|
intersperse concatStringsSep concatMapStringsSep
|
||||||
|
concatImapStringsSep makeSearchPath makeSearchPathOutput
|
||||||
|
makeLibraryPath makeBinPath makePerlPath optionalString
|
||||||
|
hasPrefix hasSuffix stringToCharacters stringAsChars escape
|
||||||
|
escapeShellArg escapeShellArgs replaceChars lowerChars upperChars
|
||||||
|
toLower toUpper addContextFrom splitString removePrefix
|
||||||
|
removeSuffix versionOlder versionAtLeast getVersion nameFromURL
|
||||||
|
enableFeature fixedWidthString fixedWidthNumber isStorePath
|
||||||
|
toInt readPathsFromFile fileContents;
|
||||||
|
inherit (stringsWithDeps) textClosureList textClosureMap
|
||||||
|
noDepEntry fullDepEntry packEntry stringAfter;
|
||||||
|
inherit (customisation) overrideDerivation makeOverridable
|
||||||
|
callPackageWith callPackagesWith addPassthru hydraJob makeScope;
|
||||||
|
inherit (meta) addMetaAttrs dontDistribute setName updateName
|
||||||
|
appendToName mapDerivationAttrset lowPrio lowPrioSet hiPrio
|
||||||
|
hiPrioSet;
|
||||||
|
inherit (sources) pathType pathIsDirectory cleanSourceFilter
|
||||||
|
cleanSource sourceByRegex sourceFilesBySuffices
|
||||||
|
commitIdFromGitRepo cleanSourceWith pathHasContext canCleanSource;
|
||||||
|
inherit (modules) evalModules closeModules unifyModuleSyntax
|
||||||
|
applyIfFunction unpackSubmodule packSubmodule mergeModules
|
||||||
|
mergeModules' mergeOptionDecls evalOptionValue mergeDefinitions
|
||||||
|
pushDownProperties dischargeProperties filterOverrides
|
||||||
|
sortProperties fixupOptionType mkIf mkAssert mkMerge mkOverride
|
||||||
|
mkOptionDefault mkDefault mkForce mkVMOverride mkStrict
|
||||||
|
mkFixStrictness mkOrder mkBefore mkAfter mkAliasDefinitions
|
||||||
|
mkAliasAndWrapDefinitions fixMergeModules mkRemovedOptionModule
|
||||||
|
mkRenamedOptionModule mkMergedOptionModule mkChangedOptionModule
|
||||||
|
mkAliasOptionModule doRename filterModules;
|
||||||
|
inherit (options) isOption mkEnableOption mkSinkUndeclaredOptions
|
||||||
|
mergeDefaultOption mergeOneOption mergeEqualOption getValues
|
||||||
|
getFiles optionAttrSetToDocList optionAttrSetToDocList'
|
||||||
|
scrubOptionValue literalExample showOption showFiles
|
||||||
|
unknownModule mkOption;
|
||||||
|
inherit (types) isType setType defaultTypeMerge defaultFunctor
|
||||||
|
isOptionType mkOptionType;
|
||||||
|
inherit (debug) addErrorContextToAttrs traceIf traceVal
|
||||||
|
traceXMLVal traceXMLValMarked traceSeq traceSeqN traceValSeq
|
||||||
|
traceValSeqN traceShowVal traceShowValMarked
|
||||||
|
showVal traceCall traceCall2 traceCall3 traceValIfNot runTests
|
||||||
|
testAllTrue strict traceCallXml attrNamesToStr;
|
||||||
|
inherit (misc) maybeEnv defaultMergeArg defaultMerge foldArgs
|
||||||
|
defaultOverridableDelayableArgs composedArgsAndFun
|
||||||
|
maybeAttrNullable maybeAttr ifEnable checkFlag getValue
|
||||||
|
checkReqs uniqList uniqListExt condConcat lazyGenericClosure
|
||||||
|
innerModifySumArgs modifySumArgs innerClosePropagation
|
||||||
|
closePropagation mapAttrsFlatten nvs setAttr setAttrMerge
|
||||||
|
mergeAttrsWithFunc mergeAttrsConcatenateValues
|
||||||
|
mergeAttrsNoOverride mergeAttrByFunc mergeAttrsByFuncDefaults
|
||||||
|
mergeAttrsByFuncDefaultsClean mergeAttrBy
|
||||||
|
prepareDerivationArgs nixType imap overridableDelayableArgs;
|
||||||
|
};
|
||||||
|
in lib
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
let lib = import ./default.nix;
|
{ lib }:
|
||||||
|
let
|
||||||
inherit (builtins) isFunction head tail isList isAttrs isInt attrNames;
|
inherit (builtins) isFunction head tail isList isAttrs isInt attrNames;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
with import ./lists.nix;
|
with lib.lists;
|
||||||
with import ./attrsets.nix;
|
with lib.attrsets;
|
||||||
with import ./strings.nix;
|
with lib.strings;
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# snippets that can be shared by multiple fetchers (pkgs/build-support)
|
# snippets that can be shared by multiple fetchers (pkgs/build-support)
|
||||||
|
{ lib }:
|
||||||
{
|
{
|
||||||
|
|
||||||
proxyImpureEnvVars = [
|
proxyImpureEnvVars = [
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{ lib }:
|
||||||
{ # haskellPathsInDir : Path -> Map String Path
|
{ # haskellPathsInDir : Path -> Map String Path
|
||||||
# A map of all haskell packages defined in the given path,
|
# A map of all haskell packages defined in the given path,
|
||||||
# identified by having a cabal file with the same name as the
|
# identified by having a cabal file with the same name as the
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
rec {
|
rec {
|
||||||
# Compute the fixed point of the given function `f`, which is usually an
|
# Compute the fixed point of the given function `f`, which is usually an
|
||||||
# attribute set that expects its final, non-recursive representation as an
|
# attribute set that expects its final, non-recursive representation as an
|
||||||
|
@ -7,10 +7,11 @@
|
|||||||
* Tests can be found in ./tests.nix
|
* Tests can be found in ./tests.nix
|
||||||
* Documentation in the manual, #sec-generators
|
* Documentation in the manual, #sec-generators
|
||||||
*/
|
*/
|
||||||
with import ./trivial.nix;
|
{ lib }:
|
||||||
|
with (lib).trivial;
|
||||||
let
|
let
|
||||||
libStr = import ./strings.nix;
|
libStr = lib.strings;
|
||||||
libAttr = import ./attrsets.nix;
|
libAttr = lib.attrsets;
|
||||||
|
|
||||||
flipMapAttrs = flip libAttr.mapAttrs;
|
flipMapAttrs = flip libAttr.mapAttrs;
|
||||||
in
|
in
|
||||||
@ -21,11 +22,15 @@ rec {
|
|||||||
* character sep. If sep appears in k, it is escaped.
|
* character sep. If sep appears in k, it is escaped.
|
||||||
* Helper for synaxes with different separators.
|
* Helper for synaxes with different separators.
|
||||||
*
|
*
|
||||||
* mkKeyValueDefault ":" "f:oo" "bar"
|
* mkValueString specifies how values should be formatted.
|
||||||
|
*
|
||||||
|
* mkKeyValueDefault {} ":" "f:oo" "bar"
|
||||||
* > "f\:oo:bar"
|
* > "f\:oo:bar"
|
||||||
*/
|
*/
|
||||||
mkKeyValueDefault = sep: k: v:
|
mkKeyValueDefault = {
|
||||||
"${libStr.escape [sep] k}${sep}${toString v}";
|
mkValueString ? toString
|
||||||
|
}: sep: k: v:
|
||||||
|
"${libStr.escape [sep] k}${sep}${mkValueString v}";
|
||||||
|
|
||||||
|
|
||||||
/* Generate a key-value-style config file from an attrset.
|
/* Generate a key-value-style config file from an attrset.
|
||||||
@ -33,7 +38,7 @@ rec {
|
|||||||
* mkKeyValue is the same as in toINI.
|
* mkKeyValue is the same as in toINI.
|
||||||
*/
|
*/
|
||||||
toKeyValue = {
|
toKeyValue = {
|
||||||
mkKeyValue ? mkKeyValueDefault "="
|
mkKeyValue ? mkKeyValueDefault {} "="
|
||||||
}: attrs:
|
}: attrs:
|
||||||
let mkLine = k: v: mkKeyValue k v + "\n";
|
let mkLine = k: v: mkKeyValue k v + "\n";
|
||||||
in libStr.concatStrings (libAttr.mapAttrsToList mkLine attrs);
|
in libStr.concatStrings (libAttr.mapAttrsToList mkLine attrs);
|
||||||
@ -63,7 +68,7 @@ rec {
|
|||||||
# apply transformations (e.g. escapes) to section names
|
# apply transformations (e.g. escapes) to section names
|
||||||
mkSectionName ? (name: libStr.escape [ "[" "]" ] name),
|
mkSectionName ? (name: libStr.escape [ "[" "]" ] name),
|
||||||
# format a setting line from key and value
|
# format a setting line from key and value
|
||||||
mkKeyValue ? mkKeyValueDefault "="
|
mkKeyValue ? mkKeyValueDefault {} "="
|
||||||
}: attrsOfAttrs:
|
}: attrsOfAttrs:
|
||||||
let
|
let
|
||||||
# map function to string for each key val
|
# map function to string for each key val
|
||||||
@ -125,6 +130,6 @@ rec {
|
|||||||
(name: value:
|
(name: value:
|
||||||
"${toPretty args name} = ${toPretty args value};") v)
|
"${toPretty args name} = ${toPretty args value};") v)
|
||||||
+ " }"
|
+ " }"
|
||||||
else "toPretty: should never happen (v = ${v})";
|
else abort "toPretty: should never happen (v = ${v})";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
{ lib }:
|
||||||
let
|
let
|
||||||
|
|
||||||
lib = import ./default.nix;
|
|
||||||
|
|
||||||
spdx = lic: lic // {
|
spdx = lic: lic // {
|
||||||
url = "http://spdx.org/licenses/${lic.spdxId}";
|
url = "http://spdx.org/licenses/${lic.spdxId}";
|
||||||
};
|
};
|
||||||
@ -16,7 +15,12 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
|||||||
|
|
||||||
afl21 = spdx {
|
afl21 = spdx {
|
||||||
spdxId = "AFL-2.1";
|
spdxId = "AFL-2.1";
|
||||||
fullName = "Academic Free License";
|
fullName = "Academic Free License v2.1";
|
||||||
|
};
|
||||||
|
|
||||||
|
afl3 = spdx {
|
||||||
|
spdxId = "AFL-3.0";
|
||||||
|
fullName = "Academic Free License v3.0";
|
||||||
};
|
};
|
||||||
|
|
||||||
agpl3 = spdx {
|
agpl3 = spdx {
|
||||||
@ -175,6 +179,12 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
|||||||
fullName = "DOC License";
|
fullName = "DOC License";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
eapl = {
|
||||||
|
fullName = "EPSON AVASYS PUBLIC LICENSE";
|
||||||
|
url = http://avasys.jp/hp/menu000000700/hpg000000603.htm;
|
||||||
|
free = false;
|
||||||
|
};
|
||||||
|
|
||||||
efl10 = spdx {
|
efl10 = spdx {
|
||||||
spdxId = "EFL-1.0";
|
spdxId = "EFL-1.0";
|
||||||
fullName = "Eiffel Forum License v1.0";
|
fullName = "Eiffel Forum License v1.0";
|
||||||
@ -211,6 +221,12 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
|||||||
fullName = "GNU Free Documentation License v1.3";
|
fullName = "GNU Free Documentation License v1.3";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ffsl = {
|
||||||
|
fullName = "Floodgap Free Software License";
|
||||||
|
url = http://www.floodgap.com/software/ffsl/license.html;
|
||||||
|
free = false;
|
||||||
|
};
|
||||||
|
|
||||||
free = {
|
free = {
|
||||||
fullName = "Unspecified free software license";
|
fullName = "Unspecified free software license";
|
||||||
};
|
};
|
||||||
@ -271,6 +287,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
|||||||
url = https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception;
|
url = https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hpnd = spdx {
|
||||||
|
spdxId = "HPND";
|
||||||
|
fullName = "Historic Permission Notice and Disclaimer";
|
||||||
|
};
|
||||||
|
|
||||||
# Intel's license, seems free
|
# Intel's license, seems free
|
||||||
iasl = {
|
iasl = {
|
||||||
fullName = "iASL";
|
fullName = "iASL";
|
||||||
@ -282,9 +303,16 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
|||||||
fullName = "Independent JPEG Group License";
|
fullName = "Independent JPEG Group License";
|
||||||
};
|
};
|
||||||
|
|
||||||
inria = {
|
inria-compcert = {
|
||||||
fullName = "INRIA Non-Commercial License Agreement";
|
fullName = "INRIA Non-Commercial License Agreement for the CompCert verified compiler";
|
||||||
url = "http://compcert.inria.fr/doc/LICENSE";
|
url = "http://compcert.inria.fr/doc/LICENSE";
|
||||||
|
free = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
inria-icesl = {
|
||||||
|
fullName = "INRIA Non-Commercial License Agreement for IceSL";
|
||||||
|
url = "http://shapeforge.loria.fr/icesl/EULA_IceSL_binary.pdf";
|
||||||
|
free = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
ipa = spdx {
|
ipa = spdx {
|
||||||
@ -409,6 +437,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
|||||||
fullName = "Notion modified LGPL";
|
fullName = "Notion modified LGPL";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nposl3 = spdx {
|
||||||
|
spdxId = "NPOSL-3.0";
|
||||||
|
fullName = "Non-Profit Open Software License 3.0";
|
||||||
|
};
|
||||||
|
|
||||||
ofl = spdx {
|
ofl = spdx {
|
||||||
spdxId = "OFL-1.1";
|
spdxId = "OFL-1.1";
|
||||||
fullName = "SIL Open Font License 1.1";
|
fullName = "SIL Open Font License 1.1";
|
||||||
@ -424,6 +457,16 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
|||||||
fullName = "OpenSSL License";
|
fullName = "OpenSSL License";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
osl21 = spdx {
|
||||||
|
spdxId = "OSL-2.1";
|
||||||
|
fullName = "Open Software License 2.1";
|
||||||
|
};
|
||||||
|
|
||||||
|
osl3 = spdx {
|
||||||
|
spdxId = "OSL-3.0";
|
||||||
|
fullName = "Open Software License 3.0";
|
||||||
|
};
|
||||||
|
|
||||||
php301 = spdx {
|
php301 = spdx {
|
||||||
spdxId = "PHP-3.01";
|
spdxId = "PHP-3.01";
|
||||||
fullName = "PHP License v3.01";
|
fullName = "PHP License v3.01";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# General list operations.
|
# General list operations.
|
||||||
|
{ lib }:
|
||||||
with import ./trivial.nix;
|
with lib.trivial;
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{ ...}:
|
||||||
/* List of NixOS maintainers. The format is:
|
/* List of NixOS maintainers. The format is:
|
||||||
|
|
||||||
handle = "Real Name <address@example.org>";
|
handle = "Real Name <address@example.org>";
|
||||||
@ -27,9 +28,12 @@
|
|||||||
afranchuk = "Alex Franchuk <alex.franchuk@gmail.com>";
|
afranchuk = "Alex Franchuk <alex.franchuk@gmail.com>";
|
||||||
aherrmann = "Andreas Herrmann <andreash87@gmx.ch>";
|
aherrmann = "Andreas Herrmann <andreash87@gmx.ch>";
|
||||||
ahmedtd = "Taahir Ahmed <ahmed.taahir@gmail.com>";
|
ahmedtd = "Taahir Ahmed <ahmed.taahir@gmail.com>";
|
||||||
|
aij = "Ivan Jager <aij+git@mrph.org>";
|
||||||
|
ajgrf = "Alex Griffin <a@ajgrf.com>";
|
||||||
ak = "Alexander Kjeldaas <ak@formalprivacy.com>";
|
ak = "Alexander Kjeldaas <ak@formalprivacy.com>";
|
||||||
akaWolf = "Artjom Vejsel <akawolf0@gmail.com>";
|
akaWolf = "Artjom Vejsel <akawolf0@gmail.com>";
|
||||||
akc = "Anders Claesson <akc@akc.is>";
|
akc = "Anders Claesson <akc@akc.is>";
|
||||||
|
alexvorobiev = "Alex Vorobiev <alexander.vorobiev@gmail.com";
|
||||||
algorith = "Dries Van Daele <dries_van_daele@telenet.be>";
|
algorith = "Dries Van Daele <dries_van_daele@telenet.be>";
|
||||||
alibabzo = "Alistair Bill <alistair.bill@gmail.com>";
|
alibabzo = "Alistair Bill <alistair.bill@gmail.com>";
|
||||||
all = "Nix Committers <nix-commits@lists.science.uu.nl>";
|
all = "Nix Committers <nix-commits@lists.science.uu.nl>";
|
||||||
@ -40,12 +44,15 @@
|
|||||||
amorsillo = "Andrew Morsillo <andrew.morsillo@gmail.com>";
|
amorsillo = "Andrew Morsillo <andrew.morsillo@gmail.com>";
|
||||||
AndersonTorres = "Anderson Torres <torres.anderson.85@gmail.com>";
|
AndersonTorres = "Anderson Torres <torres.anderson.85@gmail.com>";
|
||||||
anderspapitto = "Anders Papitto <anderspapitto@gmail.com>";
|
anderspapitto = "Anders Papitto <anderspapitto@gmail.com>";
|
||||||
|
andir = "Andreas Rammhold <andreas@rammhold.de>";
|
||||||
andres = "Andres Loeh <ksnixos@andres-loeh.de>";
|
andres = "Andres Loeh <ksnixos@andres-loeh.de>";
|
||||||
|
andrestylianos = "Andre S. Ramos <andre.stylianos@gmail.com>";
|
||||||
andrewrk = "Andrew Kelley <superjoe30@gmail.com>";
|
andrewrk = "Andrew Kelley <superjoe30@gmail.com>";
|
||||||
andsild = "Anders Sildnes <andsild@gmail.com>";
|
andsild = "Anders Sildnes <andsild@gmail.com>";
|
||||||
aneeshusa = "Aneesh Agrawal <aneeshusa@gmail.com>";
|
aneeshusa = "Aneesh Agrawal <aneeshusa@gmail.com>";
|
||||||
ankhers = "Justin Wood <justin.k.wood@gmail.com>";
|
ankhers = "Justin Wood <justin.k.wood@gmail.com>";
|
||||||
antono = "Antono Vasiljev <self@antono.info>";
|
antono = "Antono Vasiljev <self@antono.info>";
|
||||||
|
antonxy = "Anton Schirg <anton.schirg@posteo.de>";
|
||||||
apeschar = "Albert Peschar <albert@peschar.net>";
|
apeschar = "Albert Peschar <albert@peschar.net>";
|
||||||
apeyroux = "Alexandre Peyroux <alex@px.io>";
|
apeyroux = "Alexandre Peyroux <alex@px.io>";
|
||||||
ardumont = "Antoine R. Dumont <eniotna.t@gmail.com>";
|
ardumont = "Antoine R. Dumont <eniotna.t@gmail.com>";
|
||||||
@ -57,22 +64,25 @@
|
|||||||
asppsa = "Alastair Pharo <asppsa@gmail.com>";
|
asppsa = "Alastair Pharo <asppsa@gmail.com>";
|
||||||
astsmtl = "Alexander Tsamutali <astsmtl@yandex.ru>";
|
astsmtl = "Alexander Tsamutali <astsmtl@yandex.ru>";
|
||||||
asymmetric = "Lorenzo Manacorda <lorenzo@mailbox.org>";
|
asymmetric = "Lorenzo Manacorda <lorenzo@mailbox.org>";
|
||||||
aszlig = "aszlig <aszlig@redmoonstudios.org>";
|
aszlig = "aszlig <aszlig@nix.build>";
|
||||||
auntie = "Jonathan Glines <auntieNeo@gmail.com>";
|
auntie = "Jonathan Glines <auntieNeo@gmail.com>";
|
||||||
avnik = "Alexander V. Nikolaev <avn@avnik.info>";
|
avnik = "Alexander V. Nikolaev <avn@avnik.info>";
|
||||||
aycanirican = "Aycan iRiCAN <iricanaycan@gmail.com>";
|
aycanirican = "Aycan iRiCAN <iricanaycan@gmail.com>";
|
||||||
bachp = "Pascal Bach <pascal.bach@nextrem.ch>";
|
bachp = "Pascal Bach <pascal.bach@nextrem.ch>";
|
||||||
|
backuitist = "Bruno Bieth";
|
||||||
badi = "Badi' Abdul-Wahid <abdulwahidc@gmail.com>";
|
badi = "Badi' Abdul-Wahid <abdulwahidc@gmail.com>";
|
||||||
balajisivaraman = "Balaji Sivaraman<sivaraman.balaji@gmail.com>";
|
balajisivaraman = "Balaji Sivaraman <sivaraman.balaji@gmail.com>";
|
||||||
barrucadu = "Michael Walker <mike@barrucadu.co.uk>";
|
barrucadu = "Michael Walker <mike@barrucadu.co.uk>";
|
||||||
basvandijk = "Bas van Dijk <v.dijk.bas@gmail.com>";
|
basvandijk = "Bas van Dijk <v.dijk.bas@gmail.com>";
|
||||||
Baughn = "Svein Ove Aas <sveina@gmail.com>";
|
Baughn = "Svein Ove Aas <sveina@gmail.com>";
|
||||||
bcarrell = "Brandon Carrell <brandoncarrell@gmail.com>";
|
bcarrell = "Brandon Carrell <brandoncarrell@gmail.com>";
|
||||||
bcdarwin = "Ben Darwin <bcdarwin@gmail.com>";
|
bcdarwin = "Ben Darwin <bcdarwin@gmail.com>";
|
||||||
bdimcheff = "Brandon Dimcheff <brandon@dimcheff.com>";
|
bdimcheff = "Brandon Dimcheff <brandon@dimcheff.com>";
|
||||||
|
bendlas = "Herwig Hochleitner <herwig@bendlas.net>";
|
||||||
benley = "Benjamin Staffin <benley@gmail.com>";
|
benley = "Benjamin Staffin <benley@gmail.com>";
|
||||||
bennofs = "Benno Fünfstück <benno.fuenfstueck@gmail.com>";
|
bennofs = "Benno Fünfstück <benno.fuenfstueck@gmail.com>";
|
||||||
benwbooth = "Ben Booth <benwbooth@gmail.com>";
|
benwbooth = "Ben Booth <benwbooth@gmail.com>";
|
||||||
|
berce = "Bert Moens <bert.moens@gmail.com>";
|
||||||
berdario = "Dario Bertini <berdario@gmail.com>";
|
berdario = "Dario Bertini <berdario@gmail.com>";
|
||||||
bergey = "Daniel Bergey <bergey@teallabs.org>";
|
bergey = "Daniel Bergey <bergey@teallabs.org>";
|
||||||
bhipple = "Benjamin Hipple <bhipple@protonmail.com>";
|
bhipple = "Benjamin Hipple <bhipple@protonmail.com>";
|
||||||
@ -88,7 +98,9 @@
|
|||||||
bradediger = "Brad Ediger <brad@bradediger.com>";
|
bradediger = "Brad Ediger <brad@bradediger.com>";
|
||||||
bramd = "Bram Duvigneau <bram@bramd.nl>";
|
bramd = "Bram Duvigneau <bram@bramd.nl>";
|
||||||
bstrik = "Berno Strik <dutchman55@gmx.com>";
|
bstrik = "Berno Strik <dutchman55@gmx.com>";
|
||||||
|
bugworm = "Roman Gerasimenko <bugworm@zoho.com>";
|
||||||
bzizou = "Bruno Bzeznik <Bruno@bzizou.net>";
|
bzizou = "Bruno Bzeznik <Bruno@bzizou.net>";
|
||||||
|
c0bw3b = "Renaud <c0bw3b@gmail.com>";
|
||||||
c0dehero = "CodeHero <codehero@nerdpol.ch>";
|
c0dehero = "CodeHero <codehero@nerdpol.ch>";
|
||||||
calbrecht = "Christian Albrecht <christian.albrecht@mayflower.de>";
|
calbrecht = "Christian Albrecht <christian.albrecht@mayflower.de>";
|
||||||
calrama = "Moritz Maxeiner <moritz@ucworks.org>";
|
calrama = "Moritz Maxeiner <moritz@ucworks.org>";
|
||||||
@ -97,18 +109,25 @@
|
|||||||
canndrew = "Andrew Cann <shum@canndrew.org>";
|
canndrew = "Andrew Cann <shum@canndrew.org>";
|
||||||
carlsverre = "Carl Sverre <accounts@carlsverre.com>";
|
carlsverre = "Carl Sverre <accounts@carlsverre.com>";
|
||||||
casey = "Casey Rodarmor <casey@rodarmor.net>";
|
casey = "Casey Rodarmor <casey@rodarmor.net>";
|
||||||
|
catern = "Spencer Baugh <sbaugh@catern.com>";
|
||||||
caugner = "Claas Augner <nixos@caugner.de>";
|
caugner = "Claas Augner <nixos@caugner.de>";
|
||||||
cdepillabout = "Dennis Gosnell <cdep.illabout@gmail.com>";
|
cdepillabout = "Dennis Gosnell <cdep.illabout@gmail.com>";
|
||||||
cfouche = "Chaddaï Fouché <chaddai.fouche@gmail.com>";
|
cfouche = "Chaddaï Fouché <chaddai.fouche@gmail.com>";
|
||||||
changlinli = "Changlin Li <mail@changlinli.com>";
|
changlinli = "Changlin Li <mail@changlinli.com>";
|
||||||
chaoflow = "Florian Friesdorf <flo@chaoflow.net>";
|
chaoflow = "Florian Friesdorf <flo@chaoflow.net>";
|
||||||
chattered = "Phil Scott <me@philscotted.com>";
|
chattered = "Phil Scott <me@philscotted.com>";
|
||||||
|
ChengCat = "Yucheng Zhang <yu@cheng.cat>";
|
||||||
choochootrain = "Hurshal Patel <hurshal@imap.cc>";
|
choochootrain = "Hurshal Patel <hurshal@imap.cc>";
|
||||||
|
chpatrick = "Patrick Chilton <chpatrick@gmail.com>";
|
||||||
|
chreekat = "Bryan Richter <b@chreekat.net>";
|
||||||
chris-martin = "Chris Martin <ch.martin@gmail.com>";
|
chris-martin = "Chris Martin <ch.martin@gmail.com>";
|
||||||
chrisjefferson = "Christopher Jefferson <chris@bubblescope.net>";
|
chrisjefferson = "Christopher Jefferson <chris@bubblescope.net>";
|
||||||
|
chrisrosset = "Christopher Rosset <chris@rosset.org.uk>";
|
||||||
christopherpoole = "Christopher Mark Poole <mail@christopherpoole.net>";
|
christopherpoole = "Christopher Mark Poole <mail@christopherpoole.net>";
|
||||||
ciil = "Simon Lackerbauer <simon@lackerbauer.com>";
|
ciil = "Simon Lackerbauer <simon@lackerbauer.com>";
|
||||||
|
ck3d = "Christian Kögler <ck3d@gmx.de>";
|
||||||
ckampka = "Christian Kampka <christian@kampka.net>";
|
ckampka = "Christian Kampka <christian@kampka.net>";
|
||||||
|
ckauhaus = "Christian Kauhaus <kc@flyingcircus.io>";
|
||||||
cko = "Christine Koppelt <christine.koppelt@gmail.com>";
|
cko = "Christine Koppelt <christine.koppelt@gmail.com>";
|
||||||
cleverca22 = "Michael Bishop <cleverca22@gmail.com>";
|
cleverca22 = "Michael Bishop <cleverca22@gmail.com>";
|
||||||
cmcdragonkai = "Roger Qiu <roger.qiu@matrix.ai>";
|
cmcdragonkai = "Roger Qiu <roger.qiu@matrix.ai>";
|
||||||
@ -128,12 +147,15 @@
|
|||||||
cryptix = "Henry Bubert <cryptix@riseup.net>";
|
cryptix = "Henry Bubert <cryptix@riseup.net>";
|
||||||
CrystalGamma = "Jona Stubbe <nixos@crystalgamma.de>";
|
CrystalGamma = "Jona Stubbe <nixos@crystalgamma.de>";
|
||||||
cstrahan = "Charles Strahan <charles@cstrahan.com>";
|
cstrahan = "Charles Strahan <charles@cstrahan.com>";
|
||||||
|
csingley = "Christopher Singley <csingley@gmail.com>";
|
||||||
cwoac = "Oliver Matthews <oliver@codersoffortune.net>";
|
cwoac = "Oliver Matthews <oliver@codersoffortune.net>";
|
||||||
DamienCassou = "Damien Cassou <damien@cassou.me>";
|
DamienCassou = "Damien Cassou <damien@cassou.me>";
|
||||||
danbst = "Danylo Hlynskyi <abcz2.uprola@gmail.com>";
|
danbst = "Danylo Hlynskyi <abcz2.uprola@gmail.com>";
|
||||||
dancek = "Hannu Hartikainen <hannu.hartikainen@gmail.com>";
|
dancek = "Hannu Hartikainen <hannu.hartikainen@gmail.com>";
|
||||||
|
danharaj = "Dan Haraj <dan@obsidian.systems>";
|
||||||
danielfullmer = "Daniel Fullmer <danielrf12@gmail.com>";
|
danielfullmer = "Daniel Fullmer <danielrf12@gmail.com>";
|
||||||
dasuxullebt = "Christoph-Simon Senjak <christoph.senjak@googlemail.com>";
|
dasuxullebt = "Christoph-Simon Senjak <christoph.senjak@googlemail.com>";
|
||||||
|
david50407 = "David Kuo <me@davy.tw>";
|
||||||
davidak = "David Kleuker <post@davidak.de>";
|
davidak = "David Kleuker <post@davidak.de>";
|
||||||
davidrusu = "David Rusu <davidrusu.me@gmail.com>";
|
davidrusu = "David Rusu <davidrusu.me@gmail.com>";
|
||||||
davorb = "Davor Babic <davor@davor.se>";
|
davorb = "Davor Babic <davor@davor.se>";
|
||||||
@ -153,6 +175,7 @@
|
|||||||
dgonyeo = "Derek Gonyeo <derek@gonyeo.com>";
|
dgonyeo = "Derek Gonyeo <derek@gonyeo.com>";
|
||||||
dipinhora = "Dipin Hora <dipinhora+github@gmail.com>";
|
dipinhora = "Dipin Hora <dipinhora+github@gmail.com>";
|
||||||
disassembler = "Samuel Leathers <disasm@gmail.com>";
|
disassembler = "Samuel Leathers <disasm@gmail.com>";
|
||||||
|
dizfer = "David Izquierdo <david@izquierdofernandez.com>";
|
||||||
dmalikov = "Dmitry Malikov <malikov.d.y@gmail.com>";
|
dmalikov = "Dmitry Malikov <malikov.d.y@gmail.com>";
|
||||||
DmitryTsygankov = "Dmitry Tsygankov <dmitry.tsygankov@gmail.com>";
|
DmitryTsygankov = "Dmitry Tsygankov <dmitry.tsygankov@gmail.com>";
|
||||||
dmjio = "David Johnson <djohnson.m@gmail.com>";
|
dmjio = "David Johnson <djohnson.m@gmail.com>";
|
||||||
@ -161,13 +184,17 @@
|
|||||||
dotlambda = "Robert Schütz <rschuetz17@gmail.com>";
|
dotlambda = "Robert Schütz <rschuetz17@gmail.com>";
|
||||||
doublec = "Chris Double <chris.double@double.co.nz>";
|
doublec = "Chris Double <chris.double@double.co.nz>";
|
||||||
dpaetzel = "David Pätzel <david.a.paetzel@gmail.com>";
|
dpaetzel = "David Pätzel <david.a.paetzel@gmail.com>";
|
||||||
|
dpflug = "David Pflug <david@pflug.email>";
|
||||||
drets = "Dmytro Rets <dmitryrets@gmail.com>";
|
drets = "Dmytro Rets <dmitryrets@gmail.com>";
|
||||||
drewkett = "Andrew Burkett <burkett.andrew@gmail.com>";
|
drewkett = "Andrew Burkett <burkett.andrew@gmail.com>";
|
||||||
dsferruzza = "David Sferruzza <david.sferruzza@gmail.com>";
|
dsferruzza = "David Sferruzza <david.sferruzza@gmail.com>";
|
||||||
dtzWill = "Will Dietz <nix@wdtz.org>";
|
dtzWill = "Will Dietz <nix@wdtz.org>";
|
||||||
|
dupgit = "Olivier Delhomme <olivier.delhomme@free.fr>";
|
||||||
dywedir = "Vladyslav M. <dywedir@protonmail.ch>";
|
dywedir = "Vladyslav M. <dywedir@protonmail.ch>";
|
||||||
|
dzabraev = "Maksim Dzabraev <dzabraew@gmail.com>";
|
||||||
e-user = "Alexander Kahl <nixos@sodosopa.io>";
|
e-user = "Alexander Kahl <nixos@sodosopa.io>";
|
||||||
ebzzry = "Rommel Martinez <ebzzry@gmail.com>";
|
earldouglas = "James Earl Douglas <james@earldouglas.com>";
|
||||||
|
ebzzry = "Rommel Martinez <ebzzry@ebzzry.io>";
|
||||||
edanaher = "Evan Danaher <nixos@edanaher.net>";
|
edanaher = "Evan Danaher <nixos@edanaher.net>";
|
||||||
edef = "edef <edef@edef.eu>";
|
edef = "edef <edef@edef.eu>";
|
||||||
ederoyd46 = "Matthew Brown <matt@ederoyd.co.uk>";
|
ederoyd46 = "Matthew Brown <matt@ederoyd.co.uk>";
|
||||||
@ -183,19 +210,27 @@
|
|||||||
elijahcaine = "Elijah Caine <elijahcainemv@gmail.com>";
|
elijahcaine = "Elijah Caine <elijahcainemv@gmail.com>";
|
||||||
elitak = "Eric Litak <elitak@gmail.com>";
|
elitak = "Eric Litak <elitak@gmail.com>";
|
||||||
ellis = "Ellis Whitehead <nixos@ellisw.net>";
|
ellis = "Ellis Whitehead <nixos@ellisw.net>";
|
||||||
|
enzime = "Michael Hoang <enzime@users.noreply.github.com>";
|
||||||
eperuffo = "Emanuele Peruffo <info@emanueleperuffo.com>";
|
eperuffo = "Emanuele Peruffo <info@emanueleperuffo.com>";
|
||||||
epitrochoid = "Mabry Cervin <mpcervin@uncg.edu>";
|
epitrochoid = "Mabry Cervin <mpcervin@uncg.edu>";
|
||||||
|
eqyiel = "Ruben Maher <r@rkm.id.au>";
|
||||||
ericbmerritt = "Eric Merritt <eric@afiniate.com>";
|
ericbmerritt = "Eric Merritt <eric@afiniate.com>";
|
||||||
ericsagnes = "Eric Sagnes <eric.sagnes@gmail.com>";
|
ericsagnes = "Eric Sagnes <eric.sagnes@gmail.com>";
|
||||||
|
ericson2314 = "John Ericson <John.Ericson@Obsidian.Systems>";
|
||||||
|
erictapen = "Justin Humm <justin.humm@posteo.de>";
|
||||||
erikryb = "Erik Rybakken <erik.rybakken@math.ntnu.no>";
|
erikryb = "Erik Rybakken <erik.rybakken@math.ntnu.no>";
|
||||||
ertes = "Ertugrul Söylemez <esz@posteo.de>";
|
ertes = "Ertugrul Söylemez <esz@posteo.de>";
|
||||||
ethercrow = "Dmitry Ivanov <ethercrow@gmail.com>";
|
ethercrow = "Dmitry Ivanov <ethercrow@gmail.com>";
|
||||||
|
etu = "Elis Hirwing <elis@hirwing.se>";
|
||||||
exi = "Reno Reckling <nixos@reckling.org>";
|
exi = "Reno Reckling <nixos@reckling.org>";
|
||||||
exlevan = "Alexey Levan <exlevan@gmail.com>";
|
exlevan = "Alexey Levan <exlevan@gmail.com>";
|
||||||
expipiplus1 = "Joe Hermaszewski <nix@monoid.al>";
|
expipiplus1 = "Joe Hermaszewski <nix@monoid.al>";
|
||||||
fadenb = "Tristan Helmich <tristan.helmich+nixos@gmail.com>";
|
fadenb = "Tristan Helmich <tristan.helmich+nixos@gmail.com>";
|
||||||
fare = "Francois-Rene Rideau <fahree@gmail.com>";
|
|
||||||
falsifian = "James Cook <james.cook@utoronto.ca>";
|
falsifian = "James Cook <james.cook@utoronto.ca>";
|
||||||
|
fare = "Francois-Rene Rideau <fahree@gmail.com>";
|
||||||
|
fgaz = "Francesco Gazzetta <francygazz@gmail.com>";
|
||||||
|
FireyFly = "Jonas Höglund <nix@firefly.nu>";
|
||||||
|
flokli = "Florian Klink <flokli@flokli.de>";
|
||||||
florianjacob = "Florian Jacob <projects+nixos@florianjacob.de>";
|
florianjacob = "Florian Jacob <projects+nixos@florianjacob.de>";
|
||||||
flosse = "Markus Kohlhase <mail@markus-kohlhase.de>";
|
flosse = "Markus Kohlhase <mail@markus-kohlhase.de>";
|
||||||
fluffynukeit = "Daniel Austin <dan@fluffynukeit.com>";
|
fluffynukeit = "Daniel Austin <dan@fluffynukeit.com>";
|
||||||
@ -234,13 +269,16 @@
|
|||||||
grburst = "Julius Elias <grburst@openmailbox.org>";
|
grburst = "Julius Elias <grburst@openmailbox.org>";
|
||||||
gridaphobe = "Eric Seidel <eric@seidel.io>";
|
gridaphobe = "Eric Seidel <eric@seidel.io>";
|
||||||
guibert = "David Guibert <david.guibert@gmail.com>";
|
guibert = "David Guibert <david.guibert@gmail.com>";
|
||||||
|
guibou = "Guillaume Bouchard <guillaum.bouchard@gmail.com>";
|
||||||
guillaumekoenig = "Guillaume Koenig <guillaume.edward.koenig@gmail.com>";
|
guillaumekoenig = "Guillaume Koenig <guillaume.edward.koenig@gmail.com>";
|
||||||
guyonvarch = "Joris Guyonvarch <joris@guyonvarch.me>";
|
guyonvarch = "Joris Guyonvarch <joris@guyonvarch.me>";
|
||||||
hakuch = "Jesse Haber-Kucharsky <hakuch@gmail.com>";
|
hakuch = "Jesse Haber-Kucharsky <hakuch@gmail.com>";
|
||||||
|
hamhut1066 = "Hamish Hutchings <github@hamhut1066.com>";
|
||||||
havvy = "Ryan Scheel <ryan.havvy@gmail.com>";
|
havvy = "Ryan Scheel <ryan.havvy@gmail.com>";
|
||||||
hbunke = "Hendrik Bunke <bunke.hendrik@gmail.com>";
|
hbunke = "Hendrik Bunke <bunke.hendrik@gmail.com>";
|
||||||
hce = "Hans-Christian Esperer <hc@hcesperer.org>";
|
hce = "Hans-Christian Esperer <hc@hcesperer.org>";
|
||||||
hectorj = "Hector Jusforgues <hector.jusforgues+nixos@gmail.com>";
|
hectorj = "Hector Jusforgues <hector.jusforgues+nixos@gmail.com>";
|
||||||
|
hedning = "Tor Hedin Brønner <torhedinbronner@gmail.com>";
|
||||||
heel = "Sergii Paryzhskyi <parizhskiy@gmail.com>";
|
heel = "Sergii Paryzhskyi <parizhskiy@gmail.com>";
|
||||||
henrytill = "Henry Till <henrytill@gmail.com>";
|
henrytill = "Henry Till <henrytill@gmail.com>";
|
||||||
hhm = "hhm <heehooman+nixpkgs@gmail.com>";
|
hhm = "hhm <heehooman+nixpkgs@gmail.com>";
|
||||||
@ -248,13 +286,18 @@
|
|||||||
hodapp = "Chris Hodapp <hodapp87@gmail.com>";
|
hodapp = "Chris Hodapp <hodapp87@gmail.com>";
|
||||||
hrdinka = "Christoph Hrdinka <c.nix@hrdinka.at>";
|
hrdinka = "Christoph Hrdinka <c.nix@hrdinka.at>";
|
||||||
htr = "Hugo Tavares Reis <hugo@linux.com>";
|
htr = "Hugo Tavares Reis <hugo@linux.com>";
|
||||||
|
hyphon81 = "Masato Yonekawa <zero812n@gmail.com>";
|
||||||
iand675 = "Ian Duncan <ian@iankduncan.com>";
|
iand675 = "Ian Duncan <ian@iankduncan.com>";
|
||||||
ianwookim = "Ian-Woo Kim <ianwookim@gmail.com>";
|
ianwookim = "Ian-Woo Kim <ianwookim@gmail.com>";
|
||||||
|
iblech = "Ingo Blechschmidt <iblech@speicherleck.de>";
|
||||||
igsha = "Igor Sharonov <igor.sharonov@gmail.com>";
|
igsha = "Igor Sharonov <igor.sharonov@gmail.com>";
|
||||||
ikervagyok = "Balázs Lengyel <ikervagyok@gmail.com>";
|
ikervagyok = "Balázs Lengyel <ikervagyok@gmail.com>";
|
||||||
|
ilya-kolpakov = "Ilya Kolpakov <ilya.kolpakov@gmail.com>";
|
||||||
infinisil = "Silvan Mosberger <infinisil@icloud.com>";
|
infinisil = "Silvan Mosberger <infinisil@icloud.com>";
|
||||||
ironpinguin = "Michele Catalano <michele@catalano.de>";
|
ironpinguin = "Michele Catalano <michele@catalano.de>";
|
||||||
ivan-tkatchev = "Ivan Tkatchev <tkatchev@gmail.com>";
|
ivan-tkatchev = "Ivan Tkatchev <tkatchev@gmail.com>";
|
||||||
|
ixmatus = "Parnell Springmeyer <parnell@digitalmentat.com>";
|
||||||
|
izorkin = "Yurii Izorkin <Izorkin@gmail.com>";
|
||||||
j-keck = "Jürgen Keck <jhyphenkeck@gmail.com>";
|
j-keck = "Jürgen Keck <jhyphenkeck@gmail.com>";
|
||||||
jagajaga = "Arseniy Seroka <ars.seroka@gmail.com>";
|
jagajaga = "Arseniy Seroka <ars.seroka@gmail.com>";
|
||||||
jammerful = "jammerful <jammerful@gmail.com>";
|
jammerful = "jammerful <jammerful@gmail.com>";
|
||||||
@ -281,10 +324,12 @@
|
|||||||
joelmo = "Joel Moberg <joel.moberg@gmail.com>";
|
joelmo = "Joel Moberg <joel.moberg@gmail.com>";
|
||||||
joelteon = "Joel Taylor <me@joelt.io>";
|
joelteon = "Joel Taylor <me@joelt.io>";
|
||||||
johbo = "Johannes Bornhold <johannes@bornhold.name>";
|
johbo = "Johannes Bornhold <johannes@bornhold.name>";
|
||||||
|
johnmh = "John M. Harris, Jr. <johnmh@openblox.org>";
|
||||||
johnramsden = "John Ramsden <johnramsden@riseup.net>";
|
johnramsden = "John Ramsden <johnramsden@riseup.net>";
|
||||||
joko = "Ioannis Koutras <ioannis.koutras@gmail.com>";
|
joko = "Ioannis Koutras <ioannis.koutras@gmail.com>";
|
||||||
jonafato = "Jon Banafato <jon@jonafato.com>";
|
jonafato = "Jon Banafato <jon@jonafato.com>";
|
||||||
jpbernardy = "Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>";
|
joncojonathan = "Jonathan Haddock <joncojonathan@gmail.com>";
|
||||||
|
jpdoyle = "Joe Doyle <joethedoyle@gmail.com>";
|
||||||
jpierre03 = "Jean-Pierre PRUNARET <nix@prunetwork.fr>";
|
jpierre03 = "Jean-Pierre PRUNARET <nix@prunetwork.fr>";
|
||||||
jpotier = "Martin Potier <jpo.contributes.to.nixos@marvid.fr>";
|
jpotier = "Martin Potier <jpo.contributes.to.nixos@marvid.fr>";
|
||||||
jraygauthier = "Raymond Gauthier <jraygauthier@gmail.com>";
|
jraygauthier = "Raymond Gauthier <jraygauthier@gmail.com>";
|
||||||
@ -292,29 +337,35 @@
|
|||||||
juliendehos = "Julien Dehos <dehos@lisic.univ-littoral.fr>";
|
juliendehos = "Julien Dehos <dehos@lisic.univ-littoral.fr>";
|
||||||
jwiegley = "John Wiegley <johnw@newartisans.com>";
|
jwiegley = "John Wiegley <johnw@newartisans.com>";
|
||||||
jwilberding = "Jordan Wilberding <jwilberding@afiniate.com>";
|
jwilberding = "Jordan Wilberding <jwilberding@afiniate.com>";
|
||||||
|
jyp = "Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>";
|
||||||
jzellner = "Jeff Zellner <jeffz@eml.cc>";
|
jzellner = "Jeff Zellner <jeffz@eml.cc>";
|
||||||
kaiha = "Kai Harries <kai.harries@gmail.com>";
|
kaiha = "Kai Harries <kai.harries@gmail.com>";
|
||||||
kamilchm = "Kamil Chmielewski <kamil.chm@gmail.com>";
|
kamilchm = "Kamil Chmielewski <kamil.chm@gmail.com>";
|
||||||
kampfschlaefer = "Arnold Krille <arnold@arnoldarts.de>";
|
kampfschlaefer = "Arnold Krille <arnold@arnoldarts.de>";
|
||||||
|
karolchmist = "karolchmist <info+nix@chmist.com>";
|
||||||
kentjames = "James Kent <jameschristopherkent@gmail.com";
|
kentjames = "James Kent <jameschristopherkent@gmail.com";
|
||||||
kevincox = "Kevin Cox <kevincox@kevincox.ca>";
|
kevincox = "Kevin Cox <kevincox@kevincox.ca>";
|
||||||
khumba = "Bryan Gardiner <bog@khumba.net>";
|
khumba = "Bryan Gardiner <bog@khumba.net>";
|
||||||
KibaFox = "Kiba Fox <kiba.fox@foxypossibilities.com>";
|
KibaFox = "Kiba Fox <kiba.fox@foxypossibilities.com>";
|
||||||
kierdavis = "Kier Davis <kierdavis@gmail.com>";
|
kierdavis = "Kier Davis <kierdavis@gmail.com>";
|
||||||
kiloreux = "Kiloreux Emperex <kiloreux@gmail.com>";
|
kiloreux = "Kiloreux Emperex <kiloreux@gmail.com>";
|
||||||
|
kini = "Keshav Kini <keshav.kini@gmail.com>";
|
||||||
kkallio = "Karn Kallio <tierpluspluslists@gmail.com>";
|
kkallio = "Karn Kallio <tierpluspluslists@gmail.com>";
|
||||||
knedlsepp = "Josef Kemetmüller <josef.kemetmueller@gmail.com>";
|
knedlsepp = "Josef Kemetmüller <josef.kemetmueller@gmail.com>";
|
||||||
konimex = "Muhammad Herdiansyah <herdiansyah@openmailbox.org>";
|
konimex = "Muhammad Herdiansyah <herdiansyah@netc.eu>";
|
||||||
koral = "Koral <koral@mailoo.org>";
|
koral = "Koral <koral@mailoo.org>";
|
||||||
kovirobi = "Kovacsics Robert <kovirobi@gmail.com>";
|
kovirobi = "Kovacsics Robert <kovirobi@gmail.com>";
|
||||||
|
kquick = "Kevin Quick <quick@sparq.org>";
|
||||||
kragniz = "Louis Taylor <louis@kragniz.eu>";
|
kragniz = "Louis Taylor <louis@kragniz.eu>";
|
||||||
kristoff3r = "Kristoffer Søholm <k.soeholm@gmail.com>";
|
kristoff3r = "Kristoffer Søholm <k.soeholm@gmail.com>";
|
||||||
ktosiek = "Tomasz Kontusz <tomasz.kontusz@gmail.com>";
|
ktosiek = "Tomasz Kontusz <tomasz.kontusz@gmail.com>";
|
||||||
|
kuznero = "Roman Kuznetsov <roman@kuznero.com>";
|
||||||
lassulus = "Lassulus <lassulus@gmail.com>";
|
lassulus = "Lassulus <lassulus@gmail.com>";
|
||||||
layus = "Guillaume Maudoux <layus.on@gmail.com>";
|
layus = "Guillaume Maudoux <layus.on@gmail.com>";
|
||||||
ldesgoui = "Lucas Desgouilles <ldesgoui@gmail.com>";
|
ldesgoui = "Lucas Desgouilles <ldesgoui@gmail.com>";
|
||||||
league = "Christopher League <league@contrapunctus.net>";
|
league = "Christopher League <league@contrapunctus.net>";
|
||||||
lebastr = "Alexander Lebedev <lebastr@gmail.com>";
|
lebastr = "Alexander Lebedev <lebastr@gmail.com>";
|
||||||
|
ledif = "Adam Fidel <refuse@gmail.com>";
|
||||||
leemachin = "Lee Machin <me@mrl.ee>";
|
leemachin = "Lee Machin <me@mrl.ee>";
|
||||||
leenaars = "Michiel Leenaars <ml.software@leenaa.rs>";
|
leenaars = "Michiel Leenaars <ml.software@leenaa.rs>";
|
||||||
leonardoce = "Leonardo Cecchi <leonardo.cecchi@gmail.com>";
|
leonardoce = "Leonardo Cecchi <leonardo.cecchi@gmail.com>";
|
||||||
@ -327,15 +378,18 @@
|
|||||||
linus = "Linus Arver <linusarver@gmail.com>";
|
linus = "Linus Arver <linusarver@gmail.com>";
|
||||||
lluchs = "Lukas Werling <lukas.werling@gmail.com>";
|
lluchs = "Lukas Werling <lukas.werling@gmail.com>";
|
||||||
lnl7 = "Daiderd Jordan <daiderd@gmail.com>";
|
lnl7 = "Daiderd Jordan <daiderd@gmail.com>";
|
||||||
|
lo1tuma = "Mathias Schreck <schreck.mathias@gmail.com>";
|
||||||
loskutov = "Ignat Loskutov <ignat.loskutov@gmail.com>";
|
loskutov = "Ignat Loskutov <ignat.loskutov@gmail.com>";
|
||||||
lovek323 = "Jason O'Conal <jason@oconal.id.au>";
|
lovek323 = "Jason O'Conal <jason@oconal.id.au>";
|
||||||
lowfatcomputing = "Andreas Wagner <andreas.wagner@lowfatcomputing.org>";
|
lowfatcomputing = "Andreas Wagner <andreas.wagner@lowfatcomputing.org>";
|
||||||
lsix = "Lancelot SIX <lsix@lancelotsix.com>";
|
lsix = "Lancelot SIX <lsix@lancelotsix.com>";
|
||||||
|
ltavard = "Laure Tavard <laure.tavard@univ-grenoble-alpes.fr>";
|
||||||
lucas8 = "Luc Chabassier <luc.linux@mailoo.org>";
|
lucas8 = "Luc Chabassier <luc.linux@mailoo.org>";
|
||||||
ludo = "Ludovic Courtès <ludo@gnu.org>";
|
ludo = "Ludovic Courtès <ludo@gnu.org>";
|
||||||
lufia = "Kyohei Kadota <lufia@lufia.org>";
|
lufia = "Kyohei Kadota <lufia@lufia.org>";
|
||||||
luispedro = "Luis Pedro Coelho <luis@luispedro.org>";
|
luispedro = "Luis Pedro Coelho <luis@luispedro.org>";
|
||||||
lukego = "Luke Gorrie <luke@snabb.co>";
|
lukego = "Luke Gorrie <luke@snabb.co>";
|
||||||
|
luz = "Luz <luz666@daum.net>";
|
||||||
lw = "Sergey Sofeychuk <lw@fmap.me>";
|
lw = "Sergey Sofeychuk <lw@fmap.me>";
|
||||||
lyt = "Tim Liou <wheatdoge@gmail.com>";
|
lyt = "Tim Liou <wheatdoge@gmail.com>";
|
||||||
m3tti = "Mathaeus Sander <mathaeus.peter.sander@gmail.com>";
|
m3tti = "Mathaeus Sander <mathaeus.peter.sander@gmail.com>";
|
||||||
@ -348,6 +402,7 @@
|
|||||||
manveru = "Michael Fellinger <m.fellinger@gmail.com>";
|
manveru = "Michael Fellinger <m.fellinger@gmail.com>";
|
||||||
marcweber = "Marc Weber <marco-oweber@gmx.de>";
|
marcweber = "Marc Weber <marco-oweber@gmx.de>";
|
||||||
markus1189 = "Markus Hauck <markus1189@gmail.com>";
|
markus1189 = "Markus Hauck <markus1189@gmail.com>";
|
||||||
|
markuskowa = "Markus Kowalewski <markus.kowalewski@gmail.com>";
|
||||||
markWot = "Markus Wotringer <markus@wotringer.de>";
|
markWot = "Markus Wotringer <markus@wotringer.de>";
|
||||||
martijnvermaat = "Martijn Vermaat <martijn@vermaat.name>";
|
martijnvermaat = "Martijn Vermaat <martijn@vermaat.name>";
|
||||||
martingms = "Martin Gammelsæter <martin@mg.am>";
|
martingms = "Martin Gammelsæter <martin@mg.am>";
|
||||||
@ -359,31 +414,39 @@
|
|||||||
mbakke = "Marius Bakke <mbakke@fastmail.com>";
|
mbakke = "Marius Bakke <mbakke@fastmail.com>";
|
||||||
mbbx6spp = "Susan Potter <me@susanpotter.net>";
|
mbbx6spp = "Susan Potter <me@susanpotter.net>";
|
||||||
mbe = "Brandon Edens <brandonedens@gmail.com>";
|
mbe = "Brandon Edens <brandonedens@gmail.com>";
|
||||||
|
mbode = "Maximilian Bode <maxbode@gmail.com>";
|
||||||
mboes = "Mathieu Boespflug <mboes@tweag.net>";
|
mboes = "Mathieu Boespflug <mboes@tweag.net>";
|
||||||
mbrgm = "Marius Bergmann <marius@yeai.de>";
|
mbrgm = "Marius Bergmann <marius@yeai.de>";
|
||||||
mcmtroffaes = "Matthias C. M. Troffaes <matthias.troffaes@gmail.com>";
|
mcmtroffaes = "Matthias C. M. Troffaes <matthias.troffaes@gmail.com>";
|
||||||
mdaiter = "Matthew S. Daiter <mdaiter8121@gmail.com>";
|
mdaiter = "Matthew S. Daiter <mdaiter8121@gmail.com>";
|
||||||
meditans = "Carlo Nucera <meditans@gmail.com>";
|
meditans = "Carlo Nucera <meditans@gmail.com>";
|
||||||
|
mehandes = "Matt Deming <niewskici@gmail.com>";
|
||||||
meisternu = "Matt Miemiec <meister@krutt.org>";
|
meisternu = "Matt Miemiec <meister@krutt.org>";
|
||||||
metabar = "Celine Mercier <softs@metabarcoding.org>";
|
metabar = "Celine Mercier <softs@metabarcoding.org>";
|
||||||
|
mgdelacroix = "Miguel de la Cruz <mgdelacroix@gmail.com>";
|
||||||
|
mgttlinger = "Merlin Göttlinger <megoettlinger@gmail.com";
|
||||||
mguentner = "Maximilian Güntner <code@klandest.in>";
|
mguentner = "Maximilian Güntner <code@klandest.in>";
|
||||||
mic92 = "Jörg Thalheim <joerg@thalheim.io>";
|
mic92 = "Jörg Thalheim <joerg@thalheim.io>";
|
||||||
michaelpj = "Michael Peyton Jones <michaelpj@gmail.com>";
|
michaelpj = "Michael Peyton Jones <michaelpj@gmail.com>";
|
||||||
michalrus = "Michal Rus <m@michalrus.com>";
|
michalrus = "Michal Rus <m@michalrus.com>";
|
||||||
michelk = "Michel Kuhlmann <michel@kuhlmanns.info>";
|
michelk = "Michel Kuhlmann <michel@kuhlmanns.info>";
|
||||||
|
mickours = "Michael Mercier <mickours@gmail.com<";
|
||||||
midchildan = "midchildan <midchildan+nix@gmail.com>";
|
midchildan = "midchildan <midchildan+nix@gmail.com>";
|
||||||
mikefaille = "Michaël Faille <michael@faille.io>";
|
mikefaille = "Michaël Faille <michael@faille.io>";
|
||||||
|
mikoim = "Eshin Kunishima <ek@esh.ink>";
|
||||||
miltador = "Vasiliy Solovey <miltador@yandex.ua>";
|
miltador = "Vasiliy Solovey <miltador@yandex.ua>";
|
||||||
mimadrid = "Miguel Madrid <mimadrid@ucm.es>";
|
mimadrid = "Miguel Madrid <mimadrid@ucm.es>";
|
||||||
mingchuan = "Ming Chuan <ming@culpring.com>";
|
|
||||||
mirdhyn = "Merlin Gaillard <mirdhyn@gmail.com>";
|
mirdhyn = "Merlin Gaillard <mirdhyn@gmail.com>";
|
||||||
mirrexagon = "Andrew Abbott <mirrexagon@mirrexagon.com>";
|
mirrexagon = "Andrew Abbott <mirrexagon@mirrexagon.com>";
|
||||||
mjanczyk = "Marcin Janczyk <m@dragonvr.pl>";
|
mjanczyk = "Marcin Janczyk <m@dragonvr.pl>";
|
||||||
|
mjp = "Mike Playle <mike@mythik.co.uk>"; # github = "MikePlayle";
|
||||||
mlieberman85 = "Michael Lieberman <mlieberman85@gmail.com>";
|
mlieberman85 = "Michael Lieberman <mlieberman85@gmail.com>";
|
||||||
|
moaxcp = "John Mercier <moaxcp@gmail.com>";
|
||||||
modulistic = "Pablo Costa <modulistic@gmail.com>";
|
modulistic = "Pablo Costa <modulistic@gmail.com>";
|
||||||
mog = "Matthew O'Gorman <mog-lists@rldn.net>";
|
mog = "Matthew O'Gorman <mog-lists@rldn.net>";
|
||||||
montag451 = "montag451 <montag451@laposte.net>";
|
montag451 = "montag451 <montag451@laposte.net>";
|
||||||
moosingin3space = "Nathan Moos <moosingin3space@gmail.com>";
|
moosingin3space = "Nathan Moos <moosingin3space@gmail.com>";
|
||||||
|
moredread = "André-Patrick Bubel <code@apb.name>";
|
||||||
moretea = "Maarten Hoogendoorn <maarten@moretea.nl>";
|
moretea = "Maarten Hoogendoorn <maarten@moretea.nl>";
|
||||||
mornfall = "Petr Ročkai <me@mornfall.net>";
|
mornfall = "Petr Ročkai <me@mornfall.net>";
|
||||||
MostAwesomeDude = "Corbin Simpson <cds@corbinsimpson.com>";
|
MostAwesomeDude = "Corbin Simpson <cds@corbinsimpson.com>";
|
||||||
@ -392,8 +455,10 @@
|
|||||||
mpcsh = "Mark Cohen <m@mpc.sh>";
|
mpcsh = "Mark Cohen <m@mpc.sh>";
|
||||||
mpscholten = "Marc Scholten <marc@mpscholten.de>";
|
mpscholten = "Marc Scholten <marc@mpscholten.de>";
|
||||||
mpsyco = "Francis St-Amour <fr.st-amour@gmail.com>";
|
mpsyco = "Francis St-Amour <fr.st-amour@gmail.com>";
|
||||||
|
mrVanDalo = "Ingolf Wanger <contact@ingolf-wagner.de>";
|
||||||
msackman = "Matthew Sackman <matthew@wellquite.org>";
|
msackman = "Matthew Sackman <matthew@wellquite.org>";
|
||||||
mschristiansen = "Mikkel Christiansen <mikkel@rheosystems.com>";
|
mschristiansen = "Mikkel Christiansen <mikkel@rheosystems.com>";
|
||||||
|
mstarzyk = "Maciek Starzyk <mstarzyk@gmail.com>";
|
||||||
msteen = "Matthijs Steen <emailmatthijs@gmail.com>";
|
msteen = "Matthijs Steen <emailmatthijs@gmail.com>";
|
||||||
mt-caret = "Masayuki Takeda <mtakeda.enigsol@gmail.com>";
|
mt-caret = "Masayuki Takeda <mtakeda.enigsol@gmail.com>";
|
||||||
mtreskin = "Max Treskin <zerthurd@gmail.com>";
|
mtreskin = "Max Treskin <zerthurd@gmail.com>";
|
||||||
@ -415,7 +480,7 @@
|
|||||||
nicknovitski = "Nick Novitski <nixpkgs@nicknovitski.com>";
|
nicknovitski = "Nick Novitski <nixpkgs@nicknovitski.com>";
|
||||||
nico202 = "Nicolò Balzarotti <anothersms@gmail.com>";
|
nico202 = "Nicolò Balzarotti <anothersms@gmail.com>";
|
||||||
NikolaMandic = "Ratko Mladic <nikola@mandic.email>";
|
NikolaMandic = "Ratko Mladic <nikola@mandic.email>";
|
||||||
nixy = "Andrew R. M. <andrewmiller237@gmail.com>";
|
nixy = "Andrew R. M. <nixy@nixy.moe>";
|
||||||
nocoolnametom = "Tom Doggett <nocoolnametom@gmail.com>";
|
nocoolnametom = "Tom Doggett <nocoolnametom@gmail.com>";
|
||||||
notthemessiah = "Brian Cohen <brian.cohen.88@gmail.com>";
|
notthemessiah = "Brian Cohen <brian.cohen.88@gmail.com>";
|
||||||
np = "Nicolas Pouillard <np.nix@nicolaspouillard.fr>";
|
np = "Nicolas Pouillard <np.nix@nicolaspouillard.fr>";
|
||||||
@ -439,22 +504,24 @@
|
|||||||
oxij = "Jan Malakhovski <oxij@oxij.org>";
|
oxij = "Jan Malakhovski <oxij@oxij.org>";
|
||||||
paholg = "Paho Lurie-Gregg <paho@paholg.com>";
|
paholg = "Paho Lurie-Gregg <paho@paholg.com>";
|
||||||
pakhfn = "Fedor Pakhomov <pakhfn@gmail.com>";
|
pakhfn = "Fedor Pakhomov <pakhfn@gmail.com>";
|
||||||
palo = "Ingolf Wanger <palipalo9@googlemail.com>";
|
|
||||||
panaeon = "Vitalii Voloshyn <vitalii.voloshyn@gmail.com";
|
panaeon = "Vitalii Voloshyn <vitalii.voloshyn@gmail.com";
|
||||||
paperdigits = "Mica Semrick <mica@silentumbrella.com>";
|
paperdigits = "Mica Semrick <mica@silentumbrella.com>";
|
||||||
pashev = "Igor Pashev <pashev.igor@gmail.com>";
|
pashev = "Igor Pashev <pashev.igor@gmail.com>";
|
||||||
patternspandemic = "Brad Christensen <patternspandemic@live.com>";
|
patternspandemic = "Brad Christensen <patternspandemic@live.com>";
|
||||||
pawelpacana = "Paweł Pacana <pawel.pacana@gmail.com>";
|
pawelpacana = "Paweł Pacana <pawel.pacana@gmail.com>";
|
||||||
pbogdan = "Piotr Bogdan <ppbogdan@gmail.com>";
|
pbogdan = "Piotr Bogdan <ppbogdan@gmail.com>";
|
||||||
|
pcarrier = "Pierre Carrier <pc@rrier.ca>";
|
||||||
periklis = "theopompos@gmail.com";
|
periklis = "theopompos@gmail.com";
|
||||||
pesterhazy = "Paulus Esterhazy <pesterhazy@gmail.com>";
|
pesterhazy = "Paulus Esterhazy <pesterhazy@gmail.com>";
|
||||||
peterhoeg = "Peter Hoeg <peter@hoeg.com>";
|
peterhoeg = "Peter Hoeg <peter@hoeg.com>";
|
||||||
|
peterromfeldhk = "Peter Romfeld <peter.romfeld.hk@gmail.com>";
|
||||||
peti = "Peter Simons <simons@cryp.to>";
|
peti = "Peter Simons <simons@cryp.to>";
|
||||||
philandstuff = "Philip Potter <philip.g.potter@gmail.com>";
|
philandstuff = "Philip Potter <philip.g.potter@gmail.com>";
|
||||||
phile314 = "Philipp Hausmann <nix@314.ch>";
|
phile314 = "Philipp Hausmann <nix@314.ch>";
|
||||||
Phlogistique = "Noé Rubinstein <noe.rubinstein@gmail.com>";
|
Phlogistique = "Noé Rubinstein <noe.rubinstein@gmail.com>";
|
||||||
phreedom = "Evgeny Egorochkin <phreedom@yandex.ru>";
|
phreedom = "Evgeny Egorochkin <phreedom@yandex.ru>";
|
||||||
phunehehe = "Hoang Xuan Phu <phunehehe@gmail.com>";
|
phunehehe = "Hoang Xuan Phu <phunehehe@gmail.com>";
|
||||||
|
pierrechevalier83 = "Pierre Chevalier <pierrechevalier83@gmail.com>";
|
||||||
pierrer = "Pierre Radermecker <pierrer@pi3r.be>";
|
pierrer = "Pierre Radermecker <pierrer@pi3r.be>";
|
||||||
pierron = "Nicolas B. Pierron <nixos@nbp.name>";
|
pierron = "Nicolas B. Pierron <nixos@nbp.name>";
|
||||||
piotr = "Piotr Pietraszkiewicz <ppietrasa@gmail.com>";
|
piotr = "Piotr Pietraszkiewicz <ppietrasa@gmail.com>";
|
||||||
@ -464,6 +531,7 @@
|
|||||||
plcplc = "Philip Lykke Carlsen <plcplc@gmail.com>";
|
plcplc = "Philip Lykke Carlsen <plcplc@gmail.com>";
|
||||||
plumps = "Maksim Bronsky <maks.bronsky@web.de";
|
plumps = "Maksim Bronsky <maks.bronsky@web.de";
|
||||||
pmahoney = "Patrick Mahoney <pat@polycrystal.org>";
|
pmahoney = "Patrick Mahoney <pat@polycrystal.org>";
|
||||||
|
pmeunier = "Pierre-Étienne Meunier <pierre-etienne.meunier@inria.fr>";
|
||||||
pmiddend = "Philipp Middendorf <pmidden@secure.mailbox.org>";
|
pmiddend = "Philipp Middendorf <pmidden@secure.mailbox.org>";
|
||||||
polyrod = "Maurizio Di Pietro <dc1mdp@gmail.com>";
|
polyrod = "Maurizio Di Pietro <dc1mdp@gmail.com>";
|
||||||
pradeepchhetri = "Pradeep Chhetri <pradeep.chhetri89@gmail.com>";
|
pradeepchhetri = "Pradeep Chhetri <pradeep.chhetri89@gmail.com>";
|
||||||
@ -484,6 +552,7 @@
|
|||||||
rardiol = "Ricardo Ardissone <ricardo.ardissone@gmail.com>";
|
rardiol = "Ricardo Ardissone <ricardo.ardissone@gmail.com>";
|
||||||
rasendubi = "Alexey Shmalko <rasen.dubi@gmail.com>";
|
rasendubi = "Alexey Shmalko <rasen.dubi@gmail.com>";
|
||||||
raskin = "Michael Raskin <7c6f434c@mail.ru>";
|
raskin = "Michael Raskin <7c6f434c@mail.ru>";
|
||||||
|
ravloony = "Tom Macdonald <ravloony@gmail.com>";
|
||||||
rbasso = "Rafael Basso <rbasso@sharpgeeks.net>";
|
rbasso = "Rafael Basso <rbasso@sharpgeeks.net>";
|
||||||
redbaron = "Maxim Ivanov <ivanov.maxim@gmail.com>";
|
redbaron = "Maxim Ivanov <ivanov.maxim@gmail.com>";
|
||||||
redvers = "Redvers Davies <red@infect.me>";
|
redvers = "Redvers Davies <red@infect.me>";
|
||||||
@ -493,6 +562,7 @@
|
|||||||
renzo = "Renzo Carbonara <renzocarbonara@gmail.com>";
|
renzo = "Renzo Carbonara <renzocarbonara@gmail.com>";
|
||||||
retrry = "Tadas Barzdžius <retrry@gmail.com>";
|
retrry = "Tadas Barzdžius <retrry@gmail.com>";
|
||||||
rht = "rht <rhtbot@protonmail.com>";
|
rht = "rht <rhtbot@protonmail.com>";
|
||||||
|
richardipsum = "Richard Ipsum <richardipsum@fastmail.co.uk>";
|
||||||
rick68 = "Wei-Ming Yang <rick68@gmail.com>";
|
rick68 = "Wei-Ming Yang <rick68@gmail.com>";
|
||||||
rickynils = "Rickard Nilsson <rickynils@gmail.com>";
|
rickynils = "Rickard Nilsson <rickynils@gmail.com>";
|
||||||
ris = "Robert Scott <code@humanleg.org.uk>";
|
ris = "Robert Scott <code@humanleg.org.uk>";
|
||||||
@ -502,6 +572,7 @@
|
|||||||
robberer = "Longrin Wischnewski <robberer@freakmail.de>";
|
robberer = "Longrin Wischnewski <robberer@freakmail.de>";
|
||||||
robbinch = "Robbin C. <robbinch33@gmail.com>";
|
robbinch = "Robbin C. <robbinch33@gmail.com>";
|
||||||
roberth = "Robert Hensing <nixpkgs@roberthensing.nl>";
|
roberth = "Robert Hensing <nixpkgs@roberthensing.nl>";
|
||||||
|
robertodr = "Roberto Di Remigio <roberto.diremigio@gmail.com>";
|
||||||
robgssp = "Rob Glossop <robgssp@gmail.com>";
|
robgssp = "Rob Glossop <robgssp@gmail.com>";
|
||||||
roblabla = "Robin Lambertz <robinlambertz+dev@gmail.com>";
|
roblabla = "Robin Lambertz <robinlambertz+dev@gmail.com>";
|
||||||
roconnor = "Russell O'Connor <roconnor@theorem.ca>";
|
roconnor = "Russell O'Connor <roconnor@theorem.ca>";
|
||||||
@ -512,15 +583,18 @@
|
|||||||
rushmorem = "Rushmore Mushambi <rushmore@webenchanter.com>";
|
rushmorem = "Rushmore Mushambi <rushmore@webenchanter.com>";
|
||||||
rvl = "Rodney Lorrimar <dev+nix@rodney.id.au>";
|
rvl = "Rodney Lorrimar <dev+nix@rodney.id.au>";
|
||||||
rvlander = "Gaëtan André <rvlander@gaetanandre.eu>";
|
rvlander = "Gaëtan André <rvlander@gaetanandre.eu>";
|
||||||
rvolosatovs = "Roman Volosatovs <rvolosatovs@riseup.net";
|
rvolosatovs = "Roman Volosatovs <rvolosatovs@riseup.net>";
|
||||||
ryanartecona = "Ryan Artecona <ryanartecona@gmail.com>";
|
ryanartecona = "Ryan Artecona <ryanartecona@gmail.com>";
|
||||||
ryansydnor = "Ryan Sydnor <ryan.t.sydnor@gmail.com>";
|
ryansydnor = "Ryan Sydnor <ryan.t.sydnor@gmail.com>";
|
||||||
ryantm = "Ryan Mulligan <ryan@ryantm.com>";
|
ryantm = "Ryan Mulligan <ryan@ryantm.com>";
|
||||||
|
ryantrinkle = "Ryan Trinkle <ryan.trinkle@gmail.com>";
|
||||||
rybern = "Ryan Bernstein <ryan.bernstein@columbia.edu>";
|
rybern = "Ryan Bernstein <ryan.bernstein@columbia.edu>";
|
||||||
rycee = "Robert Helgesson <robert@rycee.net>";
|
rycee = "Robert Helgesson <robert@rycee.net>";
|
||||||
ryneeverett = "Ryne Everett <ryneeverett@gmail.com>";
|
ryneeverett = "Ryne Everett <ryneeverett@gmail.com>";
|
||||||
rzetterberg = "Richard Zetterberg <richard.zetterberg@gmail.com>";
|
rzetterberg = "Richard Zetterberg <richard.zetterberg@gmail.com>";
|
||||||
s1lvester = "Markus Silvester <s1lvester@bockhacker.me>";
|
s1lvester = "Markus Silvester <s1lvester@bockhacker.me>";
|
||||||
|
samdroid-apps = "Sam Parkinson <sam@sam.today>";
|
||||||
|
samueldr = "Samuel Dionne-Riel <samuel@dionne-riel.com>";
|
||||||
samuelrivas = "Samuel Rivas <samuelrivas@gmail.com>";
|
samuelrivas = "Samuel Rivas <samuelrivas@gmail.com>";
|
||||||
sander = "Sander van der Burg <s.vanderburg@tudelft.nl>";
|
sander = "Sander van der Burg <s.vanderburg@tudelft.nl>";
|
||||||
sargon = "Daniel Ehlers <danielehlers@mindeye.net>";
|
sargon = "Daniel Ehlers <danielehlers@mindeye.net>";
|
||||||
@ -530,6 +604,7 @@
|
|||||||
schristo = "Scott Christopher <schristopher@konputa.com>";
|
schristo = "Scott Christopher <schristopher@konputa.com>";
|
||||||
scolobb = "Sergiu Ivanov <sivanov@colimite.fr>";
|
scolobb = "Sergiu Ivanov <sivanov@colimite.fr>";
|
||||||
sdll = "Sasha Illarionov <sasha.delly@gmail.com>";
|
sdll = "Sasha Illarionov <sasha.delly@gmail.com>";
|
||||||
|
SeanZicari = "Sean Zicari <sean.zicari@gmail.com>";
|
||||||
sellout = "Greg Pfeil <greg@technomadic.org>";
|
sellout = "Greg Pfeil <greg@technomadic.org>";
|
||||||
sepi = "Raffael Mancini <raffael@mancini.lu>";
|
sepi = "Raffael Mancini <raffael@mancini.lu>";
|
||||||
seppeljordan = "Sebastian Jordan <sebastian.jordan.mail@googlemail.com>";
|
seppeljordan = "Sebastian Jordan <sebastian.jordan.mail@googlemail.com>";
|
||||||
@ -540,8 +615,10 @@
|
|||||||
shell = "Shell Turner <cam.turn@gmail.com>";
|
shell = "Shell Turner <cam.turn@gmail.com>";
|
||||||
shlevy = "Shea Levy <shea@shealevy.com>";
|
shlevy = "Shea Levy <shea@shealevy.com>";
|
||||||
siddharthist = "Langston Barrett <langston.barrett@gmail.com>";
|
siddharthist = "Langston Barrett <langston.barrett@gmail.com>";
|
||||||
|
sifmelcara = "Ming Chuan <ming@culpring.com>";
|
||||||
sigma = "Yann Hodique <yann.hodique@gmail.com>";
|
sigma = "Yann Hodique <yann.hodique@gmail.com>";
|
||||||
simonvandel = "Simon Vandel Sillesen <simon.vandel@gmail.com>";
|
simonvandel = "Simon Vandel Sillesen <simon.vandel@gmail.com>";
|
||||||
|
sivteck = "Sivaram Balakrishnan <sivaram1992@gmail.com>";
|
||||||
sjagoe = "Simon Jagoe <simon@simonjagoe.com>";
|
sjagoe = "Simon Jagoe <simon@simonjagoe.com>";
|
||||||
sjmackenzie = "Stewart Mackenzie <setori88@gmail.com>";
|
sjmackenzie = "Stewart Mackenzie <setori88@gmail.com>";
|
||||||
sjourdois = "Stéphane ‘kwisatz’ Jourdois <sjourdois@gmail.com>";
|
sjourdois = "Stéphane ‘kwisatz’ Jourdois <sjourdois@gmail.com>";
|
||||||
@ -552,6 +629,7 @@
|
|||||||
snyh = "Xia Bin <snyh@snyh.org>";
|
snyh = "Xia Bin <snyh@snyh.org>";
|
||||||
solson = "Scott Olson <scott@solson.me>";
|
solson = "Scott Olson <scott@solson.me>";
|
||||||
sorpaas = "Wei Tang <hi@that.world>";
|
sorpaas = "Wei Tang <hi@that.world>";
|
||||||
|
sorki = "Richard Marko <srk@48.io>";
|
||||||
spacefrogg = "Michael Raitza <spacefrogg-nixos@meterriblecrew.net>";
|
spacefrogg = "Michael Raitza <spacefrogg-nixos@meterriblecrew.net>";
|
||||||
spencerjanssen = "Spencer Janssen <spencerjanssen@gmail.com>";
|
spencerjanssen = "Spencer Janssen <spencerjanssen@gmail.com>";
|
||||||
spinus = "Tomasz Czyż <tomasz.czyz@gmail.com>";
|
spinus = "Tomasz Czyż <tomasz.czyz@gmail.com>";
|
||||||
@ -563,28 +641,39 @@
|
|||||||
sternenseemann = "Lukas Epple <post@lukasepple.de>";
|
sternenseemann = "Lukas Epple <post@lukasepple.de>";
|
||||||
stesie = "Stefan Siegl <stesie@brokenpipe.de>";
|
stesie = "Stefan Siegl <stesie@brokenpipe.de>";
|
||||||
steveej = "Stefan Junker <mail@stefanjunker.de>";
|
steveej = "Stefan Junker <mail@stefanjunker.de>";
|
||||||
|
StillerHarpo = "Florian Engel <florianengel39@gmail.com>";
|
||||||
|
stumoss = "Stuart Moss <samoss@gmail.com>";
|
||||||
SuprDewd = "Bjarki Ágúst Guðmundsson <suprdewd@gmail.com>";
|
SuprDewd = "Bjarki Ágúst Guðmundsson <suprdewd@gmail.com>";
|
||||||
swarren83 = "Shawn Warren <shawn.w.warren@gmail.com>";
|
swarren83 = "Shawn Warren <shawn.w.warren@gmail.com>";
|
||||||
swflint = "Samuel W. Flint <swflint@flintfam.org>";
|
swflint = "Samuel W. Flint <swflint@flintfam.org>";
|
||||||
swistak35 = "Rafał Łasocha <me@swistak35.com>";
|
swistak35 = "Rafał Łasocha <me@swistak35.com>";
|
||||||
|
symphorien = "Guillaume Girol <symphorien_nixpkgs@xlumurb.eu>";
|
||||||
szczyp = "Szczyp <qb@szczyp.com>";
|
szczyp = "Szczyp <qb@szczyp.com>";
|
||||||
sztupi = "Attila Sztupak <attila.sztupak@gmail.com>";
|
sztupi = "Attila Sztupak <attila.sztupak@gmail.com>";
|
||||||
taeer = "Taeer Bar-Yam <taeer@necsi.edu>";
|
taeer = "Taeer Bar-Yam <taeer@necsi.edu>";
|
||||||
tailhook = "Paul Colomiets <paul@colomiets.name>";
|
tailhook = "Paul Colomiets <paul@colomiets.name>";
|
||||||
|
taketwo = "Sergey Alexandrov <alexandrov88@gmail.com>";
|
||||||
takikawa = "Asumu Takikawa <asumu@igalia.com>";
|
takikawa = "Asumu Takikawa <asumu@igalia.com>";
|
||||||
taktoa = "Remy Goldschmidt <taktoa@gmail.com>";
|
taktoa = "Remy Goldschmidt <taktoa@gmail.com>";
|
||||||
taku0 = "Takuo Yonezawa <mxxouy6x3m_github@tatapa.org>";
|
taku0 = "Takuo Yonezawa <mxxouy6x3m_github@tatapa.org>";
|
||||||
tari = "Peter Marheine <peter@taricorp.net>";
|
tari = "Peter Marheine <peter@taricorp.net>";
|
||||||
tavyc = "Octavian Cerna <octavian.cerna@gmail.com>";
|
tavyc = "Octavian Cerna <octavian.cerna@gmail.com>";
|
||||||
ltavard = "Laure Tavard <laure.tavard@univ-grenoble-alpes.fr>";
|
TealG = "Teal Gaure <~@Teal.Gr>";
|
||||||
teh = "Tom Hunger <tehunger@gmail.com>";
|
teh = "Tom Hunger <tehunger@gmail.com>";
|
||||||
telotortium = "Robert Irelan <rirelan@gmail.com>";
|
telotortium = "Robert Irelan <rirelan@gmail.com>";
|
||||||
|
teto = "Matthieu Coudron <mcoudron@hotmail.com>";
|
||||||
|
tex = "Milan Svoboda <milan.svoboda@centrum.cz>";
|
||||||
thall = "Niclas Thall <niclas.thall@gmail.com>";
|
thall = "Niclas Thall <niclas.thall@gmail.com>";
|
||||||
thammers = "Tobias Hammerschmidt <jawr@gmx.de>";
|
thammers = "Tobias Hammerschmidt <jawr@gmx.de>";
|
||||||
|
thanegill = "Thane Gill <me@thanegill.com>";
|
||||||
the-kenny = "Moritz Ulrich <moritz@tarn-vedra.de>";
|
the-kenny = "Moritz Ulrich <moritz@tarn-vedra.de>";
|
||||||
theuni = "Christian Theune <ct@flyingcircus.io>";
|
theuni = "Christian Theune <ct@flyingcircus.io>";
|
||||||
|
ThomasMader = "Thomas Mader <thomas.mader@gmail.com>";
|
||||||
thoughtpolice = "Austin Seipp <aseipp@pobox.com>";
|
thoughtpolice = "Austin Seipp <aseipp@pobox.com>";
|
||||||
|
thpham = "Thomas Pham <thomas.pham@ithings.ch>";
|
||||||
timbertson = "Tim Cuthbertson <tim@gfxmonk.net>";
|
timbertson = "Tim Cuthbertson <tim@gfxmonk.net>";
|
||||||
|
timokau = "Timo Kaufmann <timokau@zoho.com>";
|
||||||
|
tiramiseb = "Sébastien Maccagnoni <sebastien@maccagnoni.eu>";
|
||||||
titanous = "Jonathan Rudenberg <jonathan@titanous.com>";
|
titanous = "Jonathan Rudenberg <jonathan@titanous.com>";
|
||||||
tnias = "Philipp Bartsch <phil@grmr.de>";
|
tnias = "Philipp Bartsch <phil@grmr.de>";
|
||||||
tohl = "Tomas Hlavaty <tom@logand.com>";
|
tohl = "Tomas Hlavaty <tom@logand.com>";
|
||||||
@ -606,6 +695,7 @@
|
|||||||
#urkud = "Yury G. Kudryashov <urkud+nix@ya.ru>"; inactive since 2012
|
#urkud = "Yury G. Kudryashov <urkud+nix@ya.ru>"; inactive since 2012
|
||||||
uwap = "uwap <me@uwap.name>";
|
uwap = "uwap <me@uwap.name>";
|
||||||
vaibhavsagar = "Vaibhav Sagar <vaibhavsagar@gmail.com>";
|
vaibhavsagar = "Vaibhav Sagar <vaibhavsagar@gmail.com>";
|
||||||
|
valeriangalliat = "Valérian Galliat <val@codejam.info>";
|
||||||
vandenoever = "Jos van den Oever <jos@vandenoever.info>";
|
vandenoever = "Jos van den Oever <jos@vandenoever.info>";
|
||||||
vanschelven = "Klaas van Schelven <klaas@vanschelven.com>";
|
vanschelven = "Klaas van Schelven <klaas@vanschelven.com>";
|
||||||
vanzef = "Ivan Solyankin <vanzef@gmail.com>";
|
vanzef = "Ivan Solyankin <vanzef@gmail.com>";
|
||||||
@ -613,7 +703,9 @@
|
|||||||
vbmithr = "Vincent Bernardoff <vb@luminar.eu.org>";
|
vbmithr = "Vincent Bernardoff <vb@luminar.eu.org>";
|
||||||
vcunat = "Vladimír Čunát <vcunat@gmail.com>";
|
vcunat = "Vladimír Čunát <vcunat@gmail.com>";
|
||||||
vdemeester = "Vincent Demeester <vincent@sbr.pm>";
|
vdemeester = "Vincent Demeester <vincent@sbr.pm>";
|
||||||
|
velovix = "Tyler Compton <xaviosx@gmail.com>";
|
||||||
veprbl = "Dmitry Kalinkin <veprbl@gmail.com>";
|
veprbl = "Dmitry Kalinkin <veprbl@gmail.com>";
|
||||||
|
vidbina = "David Asabina <vid@bina.me>";
|
||||||
vifino = "Adrian Pistol <vifino@tty.sh>";
|
vifino = "Adrian Pistol <vifino@tty.sh>";
|
||||||
vinymeuh = "VinyMeuh <vinymeuh@gmail.com>";
|
vinymeuh = "VinyMeuh <vinymeuh@gmail.com>";
|
||||||
viric = "Lluís Batlle i Rossell <viric@viric.name>";
|
viric = "Lluís Batlle i Rossell <viric@viric.name>";
|
||||||
@ -622,7 +714,6 @@
|
|||||||
vlstill = "Vladimír Štill <xstill@fi.muni.cz>";
|
vlstill = "Vladimír Štill <xstill@fi.muni.cz>";
|
||||||
vmandela = "Venkateswara Rao Mandela <venkat.mandela@gmail.com>";
|
vmandela = "Venkateswara Rao Mandela <venkat.mandela@gmail.com>";
|
||||||
vmchale = "Vanessa McHale <tmchale@wisc.edu>";
|
vmchale = "Vanessa McHale <tmchale@wisc.edu>";
|
||||||
valeriangalliat = "Valérian Galliat <val@codejam.info>";
|
|
||||||
volhovm = "Mikhail Volkhov <volhovm.cs@gmail.com>";
|
volhovm = "Mikhail Volkhov <volhovm.cs@gmail.com>";
|
||||||
volth = "Jaroslavas Pocepko <jaroslavas@volth.com>";
|
volth = "Jaroslavas Pocepko <jaroslavas@volth.com>";
|
||||||
vozz = "Oliver Hunt <oliver.huntuk@gmail.com>";
|
vozz = "Oliver Hunt <oliver.huntuk@gmail.com>";
|
||||||
@ -636,15 +727,21 @@
|
|||||||
wjlroe = "William Roe <willroe@gmail.com>";
|
wjlroe = "William Roe <willroe@gmail.com>";
|
||||||
wkennington = "William A. Kennington III <william@wkennington.com>";
|
wkennington = "William A. Kennington III <william@wkennington.com>";
|
||||||
wmertens = "Wout Mertens <Wout.Mertens@gmail.com>";
|
wmertens = "Wout Mertens <Wout.Mertens@gmail.com>";
|
||||||
|
woffs = "Frank Doepper <github@woffs.de>";
|
||||||
womfoo = "Kranium Gikos Mendoza <kranium@gikos.net>";
|
womfoo = "Kranium Gikos Mendoza <kranium@gikos.net>";
|
||||||
wscott = "Wayne Scott <wsc9tt@gmail.com>";
|
wscott = "Wayne Scott <wsc9tt@gmail.com>";
|
||||||
wyvie = "Elijah Rum <elijahrum@gmail.com>";
|
wyvie = "Elijah Rum <elijahrum@gmail.com>";
|
||||||
|
xaverdh = "Dominik Xaver Hörl <hoe.dom@gmx.de>";
|
||||||
xnwdd = "Guillermo NWDD <nwdd+nixos@no.team>";
|
xnwdd = "Guillermo NWDD <nwdd+nixos@no.team>";
|
||||||
xvapx = "Marti Serra <marti.serra.coscollano@gmail.com>";
|
xvapx = "Marti Serra <marti.serra.coscollano@gmail.com>";
|
||||||
xwvvvvwx = "David Terry <davidterry@posteo.de>";
|
xwvvvvwx = "David Terry <davidterry@posteo.de>";
|
||||||
|
xzfc = "Albert Safin <xzfcpw@gmail.com>";
|
||||||
yarr = "Dmitry V. <savraz@gmail.com>";
|
yarr = "Dmitry V. <savraz@gmail.com>";
|
||||||
|
yegortimoshenko = "Yegor Timoshenko <yegortimoshenko@gmail.com>";
|
||||||
|
ylwghst = "Burim Augustin Berisa <ylwghst@onionmail.info>";
|
||||||
yochai = "Yochai <yochai@titat.info>";
|
yochai = "Yochai <yochai@titat.info>";
|
||||||
yorickvp = "Yorick van Pelt <yorickvanpelt@gmail.com>";
|
yorickvp = "Yorick van Pelt <yorickvanpelt@gmail.com>";
|
||||||
|
yrashk = "Yurii Rashkovskii <yrashk@gmail.com>";
|
||||||
yuriaisaka = "Yuri Aisaka <yuri.aisaka+nix@gmail.com>";
|
yuriaisaka = "Yuri Aisaka <yuri.aisaka+nix@gmail.com>";
|
||||||
yurrriq = "Eric Bailey <eric@ericb.me>";
|
yurrriq = "Eric Bailey <eric@ericb.me>";
|
||||||
z77z = "Marco Maggesi <maggesi@math.unifi.it>";
|
z77z = "Marco Maggesi <maggesi@math.unifi.it>";
|
||||||
@ -659,4 +756,5 @@
|
|||||||
zoomulator = "Kim Simmons <zoomulator@gmail.com>";
|
zoomulator = "Kim Simmons <zoomulator@gmail.com>";
|
||||||
zraexy = "David Mell <zraexy@gmail.com>";
|
zraexy = "David Mell <zraexy@gmail.com>";
|
||||||
zx2c4 = "Jason A. Donenfeld <Jason@zx2c4.com>";
|
zx2c4 = "Jason A. Donenfeld <Jason@zx2c4.com>";
|
||||||
|
zzamboni = "Diego Zamboni <diego@zzamboni.org>";
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
/* Some functions for manipulating meta attributes, as well as the
|
/* Some functions for manipulating meta attributes, as well as the
|
||||||
name attribute. */
|
name attribute. */
|
||||||
|
|
||||||
let lib = import ./default.nix;
|
{ lib }:
|
||||||
in
|
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
with import ./lists.nix;
|
{ lib }:
|
||||||
with import ./strings.nix;
|
|
||||||
with import ./trivial.nix;
|
with lib.lists;
|
||||||
with import ./attrsets.nix;
|
with lib.strings;
|
||||||
with import ./options.nix;
|
with lib.trivial;
|
||||||
with import ./debug.nix;
|
with lib.attrsets;
|
||||||
with import ./types.nix;
|
with lib.options;
|
||||||
|
with lib.debug;
|
||||||
|
with lib.types;
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
@ -336,7 +338,7 @@ rec {
|
|||||||
# Type-check the remaining definitions, and merge them.
|
# Type-check the remaining definitions, and merge them.
|
||||||
mergedValue = foldl' (res: def:
|
mergedValue = foldl' (res: def:
|
||||||
if type.check def.value then res
|
if type.check def.value then res
|
||||||
else throw "The option value `${showOption loc}' in `${def.file}' is not a ${type.description}.")
|
else throw "The option value `${showOption loc}' in `${def.file}' is not of type `${type.description}'.")
|
||||||
(type.merge loc defsFinal) defsFinal;
|
(type.merge loc defsFinal) defsFinal;
|
||||||
|
|
||||||
isDefined = defsFinal != [];
|
isDefined = defsFinal != [];
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
# Nixpkgs/NixOS option handling.
|
# Nixpkgs/NixOS option handling.
|
||||||
|
{ lib }:
|
||||||
|
|
||||||
let lib = import ./default.nix; in
|
with lib.trivial;
|
||||||
|
with lib.lists;
|
||||||
with import ./trivial.nix;
|
with lib.attrsets;
|
||||||
with import ./lists.nix;
|
with lib.strings;
|
||||||
with import ./attrsets.nix;
|
|
||||||
with import ./strings.nix;
|
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
with import ./strings.nix;
|
|
||||||
|
|
||||||
/* Helpers for creating lisp S-exprs for the Apple sandbox
|
|
||||||
|
|
||||||
lib.sandbox.allowFileRead [ "/usr/bin/file" ];
|
|
||||||
# => "(allow file-read* (literal \"/usr/bin/file\"))";
|
|
||||||
|
|
||||||
lib.sandbox.allowFileRead {
|
|
||||||
literal = [ "/usr/bin/file" ];
|
|
||||||
subpath = [ "/usr/lib/system" ];
|
|
||||||
}
|
|
||||||
# => "(allow file-read* (literal \"/usr/bin/file\") (subpath \"/usr/lib/system\"))"
|
|
||||||
*/
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
sexp = tokens: "(" + builtins.concatStringsSep " " tokens + ")";
|
|
||||||
generateFileList = files:
|
|
||||||
if builtins.isList files
|
|
||||||
then concatMapStringsSep " " (x: sexp [ "literal" ''"${x}"'' ]) files
|
|
||||||
else if builtins.isString files
|
|
||||||
then generateFileList [ files ]
|
|
||||||
else concatStringsSep " " (
|
|
||||||
(map (x: sexp [ "literal" ''"${x}"'' ]) (files.literal or [])) ++
|
|
||||||
(map (x: sexp [ "subpath" ''"${x}"'' ]) (files.subpath or []))
|
|
||||||
);
|
|
||||||
applyToFiles = f: act: files: f "${act} ${generateFileList files}";
|
|
||||||
genActions = actionName: let
|
|
||||||
action = feature: sexp [ actionName feature ];
|
|
||||||
self = {
|
|
||||||
"${actionName}" = action;
|
|
||||||
"${actionName}File" = applyToFiles action "file*";
|
|
||||||
"${actionName}FileRead" = applyToFiles action "file-read*";
|
|
||||||
"${actionName}FileReadMetadata" = applyToFiles action "file-read-metadata";
|
|
||||||
"${actionName}DirectoryList" = self."${actionName}FileReadMetadata";
|
|
||||||
"${actionName}FileWrite" = applyToFiles action "file-write*";
|
|
||||||
"${actionName}FileWriteMetadata" = applyToFiles action "file-write-metadata";
|
|
||||||
};
|
|
||||||
in self;
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
genActions "allow" // genActions "deny" // {
|
|
||||||
importProfile = derivation: ''
|
|
||||||
(import "${derivation}")
|
|
||||||
'';
|
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
# Functions for copying sources to the Nix store.
|
# Functions for copying sources to the Nix store.
|
||||||
|
{ lib }:
|
||||||
let lib = import ./default.nix; in
|
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
@ -15,9 +14,10 @@ rec {
|
|||||||
cleanSourceFilter = name: type: let baseName = baseNameOf (toString name); in ! (
|
cleanSourceFilter = name: type: let baseName = baseNameOf (toString name); in ! (
|
||||||
# Filter out Subversion and CVS directories.
|
# Filter out Subversion and CVS directories.
|
||||||
(type == "directory" && (baseName == ".git" || baseName == ".svn" || baseName == "CVS" || baseName == ".hg")) ||
|
(type == "directory" && (baseName == ".git" || baseName == ".svn" || baseName == "CVS" || baseName == ".hg")) ||
|
||||||
# Filter out backup files.
|
# Filter out editor backup / swap files.
|
||||||
lib.hasSuffix "~" baseName ||
|
lib.hasSuffix "~" baseName ||
|
||||||
builtins.match "^.*\.sw[a-z]$" baseName != null ||
|
builtins.match "^\\.sw[a-z]$" baseName != null ||
|
||||||
|
builtins.match "^\\..*\\.sw[a-z]$" baseName != null ||
|
||||||
|
|
||||||
# Filter out generates files.
|
# Filter out generates files.
|
||||||
lib.hasSuffix ".o" baseName ||
|
lib.hasSuffix ".o" baseName ||
|
||||||
@ -26,14 +26,35 @@ rec {
|
|||||||
(type == "symlink" && lib.hasPrefix "result" baseName)
|
(type == "symlink" && lib.hasPrefix "result" baseName)
|
||||||
);
|
);
|
||||||
|
|
||||||
cleanSource = builtins.filterSource cleanSourceFilter;
|
cleanSource = src: cleanSourceWith { filter = cleanSourceFilter; inherit src; };
|
||||||
|
|
||||||
|
# Like `builtins.filterSource`, except it will compose with itself,
|
||||||
|
# allowing you to chain multiple calls together without any
|
||||||
|
# intermediate copies being put in the nix store.
|
||||||
|
#
|
||||||
|
# lib.cleanSourceWith f (lib.cleanSourceWith g ./.) # Succeeds!
|
||||||
|
# builtins.filterSource f (builtins.filterSource g ./.) # Fails!
|
||||||
|
cleanSourceWith = { filter, src }:
|
||||||
|
let
|
||||||
|
isFiltered = src ? _isLibCleanSourceWith;
|
||||||
|
origSrc = if isFiltered then src.origSrc else src;
|
||||||
|
filter' = if isFiltered then name: type: filter name type && src.filter name type else filter;
|
||||||
|
in {
|
||||||
|
inherit origSrc;
|
||||||
|
filter = filter';
|
||||||
|
outPath = builtins.filterSource filter' origSrc;
|
||||||
|
_isLibCleanSourceWith = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Filter sources by a list of regular expressions.
|
# Filter sources by a list of regular expressions.
|
||||||
#
|
#
|
||||||
# E.g. `src = sourceByRegex ./my-subproject [".*\.py$" "^database.sql$"]`
|
# E.g. `src = sourceByRegex ./my-subproject [".*\.py$" "^database.sql$"]`
|
||||||
sourceByRegex = src: regexes: builtins.filterSource (path: type:
|
sourceByRegex = src: regexes: cleanSourceWith {
|
||||||
let relPath = lib.removePrefix (toString src + "/") (toString path);
|
filter = (path: type:
|
||||||
in lib.any (re: builtins.match re relPath != null) regexes) src;
|
let relPath = lib.removePrefix (toString src + "/") (toString path);
|
||||||
|
in lib.any (re: builtins.match re relPath != null) regexes);
|
||||||
|
inherit src;
|
||||||
|
};
|
||||||
|
|
||||||
# Get all files ending with the specified suffices from the given
|
# Get all files ending with the specified suffices from the given
|
||||||
# directory or its descendants. E.g. `sourceFilesBySuffices ./dir
|
# directory or its descendants. E.g. `sourceFilesBySuffices ./dir
|
||||||
@ -42,7 +63,7 @@ rec {
|
|||||||
let filter = name: type:
|
let filter = name: type:
|
||||||
let base = baseNameOf (toString name);
|
let base = baseNameOf (toString name);
|
||||||
in type == "directory" || lib.any (ext: lib.hasSuffix ext base) exts;
|
in type == "directory" || lib.any (ext: lib.hasSuffix ext base) exts;
|
||||||
in builtins.filterSource filter path;
|
in cleanSourceWith { inherit filter; src = path; };
|
||||||
|
|
||||||
|
|
||||||
# Get the commit id of a git repo
|
# Get the commit id of a git repo
|
||||||
@ -72,4 +93,8 @@ rec {
|
|||||||
else lib.head matchRef
|
else lib.head matchRef
|
||||||
else throw ("Not a .git directory: " + path);
|
else throw ("Not a .git directory: " + path);
|
||||||
in lib.flip readCommitFromFile "HEAD";
|
in lib.flip readCommitFromFile "HEAD";
|
||||||
|
|
||||||
|
pathHasContext = builtins.hasContext or (lib.hasPrefix builtins.storeDir);
|
||||||
|
|
||||||
|
canCleanSource = src: src ? _isLibCleanSourceWith || !(pathHasContext (toString src));
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{ lib }:
|
||||||
/*
|
/*
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
@ -40,9 +41,9 @@ Usage:
|
|||||||
[1] maybe this behaviour should be removed to keep things simple (?)
|
[1] maybe this behaviour should be removed to keep things simple (?)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
with import ./lists.nix;
|
with lib.lists;
|
||||||
with import ./attrsets.nix;
|
with lib.attrsets;
|
||||||
with import ./strings.nix;
|
with lib.strings;
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* String manipulation functions. */
|
/* String manipulation functions. */
|
||||||
|
{ lib }:
|
||||||
let lib = import ./default.nix;
|
let
|
||||||
|
|
||||||
inherit (builtins) length;
|
inherit (builtins) length;
|
||||||
|
|
||||||
@ -219,6 +219,14 @@ rec {
|
|||||||
*/
|
*/
|
||||||
escapeShellArgs = concatMapStringsSep " " escapeShellArg;
|
escapeShellArgs = concatMapStringsSep " " escapeShellArg;
|
||||||
|
|
||||||
|
/* Turn a string into a Nix expression representing that string
|
||||||
|
|
||||||
|
Example:
|
||||||
|
escapeNixString "hello\${}\n"
|
||||||
|
=> "\"hello\\\${}\\n\""
|
||||||
|
*/
|
||||||
|
escapeNixString = s: escape ["$"] (builtins.toJSON s);
|
||||||
|
|
||||||
/* Obsolete - use replaceStrings instead. */
|
/* Obsolete - use replaceStrings instead. */
|
||||||
replaceChars = builtins.replaceStrings or (
|
replaceChars = builtins.replaceStrings or (
|
||||||
del: new: s:
|
del: new: s:
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
let inherit (import ../attrsets.nix) mapAttrs; in
|
{ lib }:
|
||||||
|
let inherit (lib.attrsets) mapAttrs; in
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
doubles = import ./doubles.nix;
|
doubles = import ./doubles.nix { inherit lib; };
|
||||||
parse = import ./parse.nix;
|
parse = import ./parse.nix { inherit lib; };
|
||||||
inspect = import ./inspect.nix;
|
inspect = import ./inspect.nix { inherit lib; };
|
||||||
platforms = import ./platforms.nix;
|
platforms = import ./platforms.nix { inherit lib; };
|
||||||
examples = import ./examples.nix;
|
examples = import ./examples.nix { inherit lib; };
|
||||||
|
|
||||||
# Elaborate a `localSystem` or `crossSystem` so that it contains everything
|
# Elaborate a `localSystem` or `crossSystem` so that it contains everything
|
||||||
# necessary.
|
# necessary.
|
||||||
@ -28,6 +29,15 @@ rec {
|
|||||||
else if final.isLinux then "glibc"
|
else if final.isLinux then "glibc"
|
||||||
# TODO(@Ericson2314) think more about other operating systems
|
# TODO(@Ericson2314) think more about other operating systems
|
||||||
else "native/impure";
|
else "native/impure";
|
||||||
|
extensions = {
|
||||||
|
sharedLibrary =
|
||||||
|
/**/ if final.isDarwin then ".dylib"
|
||||||
|
else if final.isWindows then ".dll"
|
||||||
|
else ".so";
|
||||||
|
executable =
|
||||||
|
/**/ if final.isWindows then ".exe"
|
||||||
|
else "";
|
||||||
|
};
|
||||||
} // mapAttrs (n: v: v final.parsed) inspect.predicates
|
} // mapAttrs (n: v: v final.parsed) inspect.predicates
|
||||||
// args;
|
// args;
|
||||||
in final;
|
in final;
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
{ lib }:
|
||||||
let
|
let
|
||||||
lists = import ../lists.nix;
|
inherit (lib) lists;
|
||||||
parse = import ./parse.nix;
|
parse = import ./parse.nix { inherit lib; };
|
||||||
inherit (import ./inspect.nix) predicates;
|
inherit (import ./inspect.nix { inherit lib; }) predicates;
|
||||||
inherit (import ../attrsets.nix) matchAttrs;
|
inherit (lib.attrsets) matchAttrs;
|
||||||
|
|
||||||
all = [
|
all = [
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# These can be passed to nixpkgs as either the `localSystem` or
|
# These can be passed to nixpkgs as either the `localSystem` or
|
||||||
# `crossSystem`. They are put here for user convenience, but also used by cross
|
# `crossSystem`. They are put here for user convenience, but also used by cross
|
||||||
# tests and linux cross stdenv building, so handle with care!
|
# tests and linux cross stdenv building, so handle with care!
|
||||||
|
{ lib }:
|
||||||
let platforms = import ./platforms.nix; in
|
let platforms = import ./platforms.nix { inherit lib; }; in
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
#
|
#
|
||||||
@ -18,7 +18,6 @@ rec {
|
|||||||
libc = "glibc";
|
libc = "glibc";
|
||||||
platform = platforms.sheevaplug;
|
platform = platforms.sheevaplug;
|
||||||
openssl.system = "linux-generic32";
|
openssl.system = "linux-generic32";
|
||||||
inherit (platform) gcc;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
raspberryPi = rec {
|
raspberryPi = rec {
|
||||||
@ -31,7 +30,6 @@ rec {
|
|||||||
libc = "glibc";
|
libc = "glibc";
|
||||||
platform = platforms.raspberrypi;
|
platform = platforms.raspberrypi;
|
||||||
openssl.system = "linux-generic32";
|
openssl.system = "linux-generic32";
|
||||||
inherit (platform) gcc;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
armv7l-hf-multiplatform = rec {
|
armv7l-hf-multiplatform = rec {
|
||||||
@ -44,7 +42,6 @@ rec {
|
|||||||
libc = "glibc";
|
libc = "glibc";
|
||||||
platform = platforms.armv7l-hf-multiplatform;
|
platform = platforms.armv7l-hf-multiplatform;
|
||||||
openssl.system = "linux-generic32";
|
openssl.system = "linux-generic32";
|
||||||
inherit (platform) gcc;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
aarch64-multiplatform = rec {
|
aarch64-multiplatform = rec {
|
||||||
@ -54,23 +51,20 @@ rec {
|
|||||||
withTLS = true;
|
withTLS = true;
|
||||||
libc = "glibc";
|
libc = "glibc";
|
||||||
platform = platforms.aarch64-multiplatform;
|
platform = platforms.aarch64-multiplatform;
|
||||||
inherit (platform) gcc;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
scaleway-c1 = armv7l-hf-multiplatform // rec {
|
scaleway-c1 = armv7l-hf-multiplatform // rec {
|
||||||
platform = platforms.scaleway-c1;
|
platform = platforms.scaleway-c1;
|
||||||
inherit (platform) gcc;
|
inherit (platform.gcc) fpu;
|
||||||
inherit (gcc) fpu;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pogoplug4 = rec {
|
pogoplug4 = rec {
|
||||||
arch = "armv5tel";
|
arch = "armv5tel";
|
||||||
config = "armv5tel-softfloat-linux-gnueabi";
|
config = "armv5tel-unknown-linux-gnueabi";
|
||||||
float = "soft";
|
float = "soft";
|
||||||
|
|
||||||
platform = platforms.pogoplug4;
|
platform = platforms.pogoplug4;
|
||||||
|
|
||||||
inherit (platform) gcc;
|
|
||||||
libc = "glibc";
|
libc = "glibc";
|
||||||
|
|
||||||
withTLS = true;
|
withTLS = true;
|
||||||
@ -86,7 +80,6 @@ rec {
|
|||||||
libc = "glibc";
|
libc = "glibc";
|
||||||
platform = platforms.fuloong2f_n32;
|
platform = platforms.fuloong2f_n32;
|
||||||
openssl.system = "linux-generic32";
|
openssl.system = "linux-generic32";
|
||||||
inherit (platform) gcc;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
with import ./parse.nix;
|
{ lib }:
|
||||||
with import ../attrsets.nix;
|
with import ./parse.nix { inherit lib; };
|
||||||
with import ../lists.nix;
|
with lib.attrsets;
|
||||||
|
with lib.lists;
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
patterns = rec {
|
patterns = rec {
|
||||||
|
@ -4,14 +4,13 @@
|
|||||||
# http://llvm.org/docs/doxygen/html/Triple_8cpp_source.html especially
|
# http://llvm.org/docs/doxygen/html/Triple_8cpp_source.html especially
|
||||||
# Triple::normalize. Parsing should essentially act as a more conservative
|
# Triple::normalize. Parsing should essentially act as a more conservative
|
||||||
# version of that last function.
|
# version of that last function.
|
||||||
|
{ lib }:
|
||||||
with import ../lists.nix;
|
with lib.lists;
|
||||||
with import ../types.nix;
|
with lib.types;
|
||||||
with import ../attrsets.nix;
|
with lib.attrsets;
|
||||||
with (import ./inspect.nix).predicates;
|
with (import ./inspect.nix { inherit lib; }).predicates;
|
||||||
|
|
||||||
let
|
let
|
||||||
lib = import ../default.nix;
|
|
||||||
setTypesAssert = type: pred:
|
setTypesAssert = type: pred:
|
||||||
mapAttrs (name: value:
|
mapAttrs (name: value:
|
||||||
assert pred value;
|
assert pred value;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
{ lib }:
|
||||||
rec {
|
rec {
|
||||||
pcBase = {
|
pcBase = {
|
||||||
name = "pc";
|
name = "pc";
|
||||||
uboot = null;
|
|
||||||
kernelHeadersBaseConfig = "defconfig";
|
kernelHeadersBaseConfig = "defconfig";
|
||||||
kernelBaseConfig = "defconfig";
|
kernelBaseConfig = "defconfig";
|
||||||
# Build whatever possible as a module, if not stated in the extra config.
|
# Build whatever possible as a module, if not stated in the extra config.
|
||||||
@ -49,9 +49,6 @@ rec {
|
|||||||
kernelTarget = "uImage";
|
kernelTarget = "uImage";
|
||||||
# TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working
|
# TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working
|
||||||
#kernelDTB = true;
|
#kernelDTB = true;
|
||||||
|
|
||||||
# XXX can be anything non-null, pkgs actually only cares if it is set or not
|
|
||||||
uboot = "pogoplug4";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sheevaplug = {
|
sheevaplug = {
|
||||||
@ -161,9 +158,6 @@ rec {
|
|||||||
'';
|
'';
|
||||||
kernelMakeFlags = [ "LOADADDR=0x0200000" ];
|
kernelMakeFlags = [ "LOADADDR=0x0200000" ];
|
||||||
kernelTarget = "uImage";
|
kernelTarget = "uImage";
|
||||||
uboot = "sheevaplug";
|
|
||||||
# Only for uboot = uboot :
|
|
||||||
ubootConfig = "sheevaplug_config";
|
|
||||||
kernelDTB = true; # Beyond 3.10
|
kernelDTB = true; # Beyond 3.10
|
||||||
gcc = {
|
gcc = {
|
||||||
arch = "armv5te";
|
arch = "armv5te";
|
||||||
@ -250,7 +244,6 @@ rec {
|
|||||||
LATENCYTOP y
|
LATENCYTOP y
|
||||||
'';
|
'';
|
||||||
kernelTarget = "zImage";
|
kernelTarget = "zImage";
|
||||||
uboot = null;
|
|
||||||
gcc = {
|
gcc = {
|
||||||
arch = "armv6";
|
arch = "armv6";
|
||||||
fpu = "vfp";
|
fpu = "vfp";
|
||||||
@ -341,7 +334,6 @@ rec {
|
|||||||
XEN? n
|
XEN? n
|
||||||
'';
|
'';
|
||||||
kernelTarget = "zImage";
|
kernelTarget = "zImage";
|
||||||
uboot = null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
scaleway-c1 = armv7l-hf-multiplatform // {
|
scaleway-c1 = armv7l-hf-multiplatform // {
|
||||||
@ -373,7 +365,6 @@ rec {
|
|||||||
kernelMakeFlags = [ "LOADADDR=0x10800000" ];
|
kernelMakeFlags = [ "LOADADDR=0x10800000" ];
|
||||||
kernelTarget = "uImage";
|
kernelTarget = "uImage";
|
||||||
kernelDTB = true;
|
kernelDTB = true;
|
||||||
uboot = true; #XXX: any non-null value here is needed so that mkimage is present to build kernelTarget uImage
|
|
||||||
gcc = {
|
gcc = {
|
||||||
cpu = "cortex-a9";
|
cpu = "cortex-a9";
|
||||||
fpu = "neon";
|
fpu = "neon";
|
||||||
@ -463,7 +454,6 @@ rec {
|
|||||||
FTRACE n
|
FTRACE n
|
||||||
'';
|
'';
|
||||||
kernelTarget = "vmlinux";
|
kernelTarget = "vmlinux";
|
||||||
uboot = null;
|
|
||||||
gcc = {
|
gcc = {
|
||||||
arch = "loongson2f";
|
arch = "loongson2f";
|
||||||
abi = "n32";
|
abi = "n32";
|
||||||
@ -472,11 +462,10 @@ rec {
|
|||||||
|
|
||||||
beaglebone = armv7l-hf-multiplatform // {
|
beaglebone = armv7l-hf-multiplatform // {
|
||||||
name = "beaglebone";
|
name = "beaglebone";
|
||||||
kernelBaseConfig = "omap2plus_defconfig";
|
kernelBaseConfig = "bb.org_defconfig";
|
||||||
kernelAutoModules = false;
|
kernelAutoModules = false;
|
||||||
kernelExtraConfig = ""; # TBD kernel config
|
kernelExtraConfig = ""; # TBD kernel config
|
||||||
kernelTarget = "zImage";
|
kernelTarget = "zImage";
|
||||||
uboot = null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
armv7l-hf-multiplatform = {
|
armv7l-hf-multiplatform = {
|
||||||
@ -488,7 +477,6 @@ rec {
|
|||||||
kernelDTB = true;
|
kernelDTB = true;
|
||||||
kernelAutoModules = true;
|
kernelAutoModules = true;
|
||||||
kernelPreferBuiltin = true;
|
kernelPreferBuiltin = true;
|
||||||
uboot = null;
|
|
||||||
kernelTarget = "zImage";
|
kernelTarget = "zImage";
|
||||||
kernelExtraConfig = ''
|
kernelExtraConfig = ''
|
||||||
# Fix broken sunxi-sid nvmem driver.
|
# Fix broken sunxi-sid nvmem driver.
|
||||||
@ -544,11 +532,13 @@ rec {
|
|||||||
# Cavium ThunderX stuff.
|
# Cavium ThunderX stuff.
|
||||||
PCI_HOST_THUNDER_ECAM y
|
PCI_HOST_THUNDER_ECAM y
|
||||||
|
|
||||||
|
# Nvidia Tegra stuff.
|
||||||
|
PCI_TEGRA y
|
||||||
|
|
||||||
# The default (=y) forces us to have the XHCI firmware available in initrd,
|
# The default (=y) forces us to have the XHCI firmware available in initrd,
|
||||||
# which our initrd builder can't currently do easily.
|
# which our initrd builder can't currently do easily.
|
||||||
USB_XHCI_TEGRA m
|
USB_XHCI_TEGRA m
|
||||||
'';
|
'';
|
||||||
uboot = null;
|
|
||||||
kernelTarget = "Image";
|
kernelTarget = "Image";
|
||||||
gcc = {
|
gcc = {
|
||||||
arch = "armv8-a";
|
arch = "armv8-a";
|
||||||
|
@ -201,7 +201,7 @@ runTests {
|
|||||||
# in alphabetical order
|
# in alphabetical order
|
||||||
|
|
||||||
testMkKeyValueDefault = {
|
testMkKeyValueDefault = {
|
||||||
expr = generators.mkKeyValueDefault ":" "f:oo" "bar";
|
expr = generators.mkKeyValueDefault {} ":" "f:oo" "bar";
|
||||||
expected = ''f\:oo:bar'';
|
expected = ''f\:oo:bar'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -61,6 +61,16 @@ checkConfigError() {
|
|||||||
checkConfigOutput "false" config.enable ./declare-enable.nix
|
checkConfigOutput "false" config.enable ./declare-enable.nix
|
||||||
checkConfigError 'The option .* defined in .* does not exist.' config.enable ./define-enable.nix
|
checkConfigError 'The option .* defined in .* does not exist.' config.enable ./define-enable.nix
|
||||||
|
|
||||||
|
# Check integer types.
|
||||||
|
# unsigned
|
||||||
|
checkConfigOutput "42" config.value ./declare-int-unsigned-value.nix ./define-value-int-positive.nix
|
||||||
|
checkConfigError 'The option value .* in .* is not of type.*unsigned integer.*' config.value ./declare-int-unsigned-value.nix ./define-value-int-negative.nix
|
||||||
|
# positive
|
||||||
|
checkConfigError 'The option value .* in .* is not of type.*positive integer.*' config.value ./declare-int-positive-value.nix ./define-value-int-zero.nix
|
||||||
|
# between
|
||||||
|
checkConfigOutput "42" config.value ./declare-int-between-value.nix ./define-value-int-positive.nix
|
||||||
|
checkConfigError 'The option value .* in .* is not of type.*between.*-21 and 43.*inclusive.*' config.value ./declare-int-between-value.nix ./define-value-int-negative.nix
|
||||||
|
|
||||||
# Check mkForce without submodules.
|
# Check mkForce without submodules.
|
||||||
set -- config.enable ./declare-enable.nix ./define-enable.nix
|
set -- config.enable ./declare-enable.nix ./define-enable.nix
|
||||||
checkConfigOutput "true" "$@"
|
checkConfigOutput "true" "$@"
|
||||||
@ -126,7 +136,7 @@ checkConfigOutput "true" "$@" ./define-module-check.nix
|
|||||||
# Check coerced value.
|
# Check coerced value.
|
||||||
checkConfigOutput "\"42\"" config.value ./declare-coerced-value.nix
|
checkConfigOutput "\"42\"" config.value ./declare-coerced-value.nix
|
||||||
checkConfigOutput "\"24\"" config.value ./declare-coerced-value.nix ./define-value-string.nix
|
checkConfigOutput "\"24\"" config.value ./declare-coerced-value.nix ./define-value-string.nix
|
||||||
checkConfigError 'The option value .* in .* is not a string or integer.' config.value ./declare-coerced-value.nix ./define-value-list.nix
|
checkConfigError 'The option value .* in .* is not.*string or signed integer.*' config.value ./declare-coerced-value.nix ./define-value-list.nix
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
====== module tests ======
|
====== module tests ======
|
||||||
|
9
lib/tests/modules/declare-int-between-value.nix
Normal file
9
lib/tests/modules/declare-int-between-value.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
value = lib.mkOption {
|
||||||
|
type = lib.types.ints.between (-21) 43;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
9
lib/tests/modules/declare-int-positive-value.nix
Normal file
9
lib/tests/modules/declare-int-positive-value.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
value = lib.mkOption {
|
||||||
|
type = lib.types.ints.positive;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
9
lib/tests/modules/declare-int-unsigned-value.nix
Normal file
9
lib/tests/modules/declare-int-unsigned-value.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
value = lib.mkOption {
|
||||||
|
type = lib.types.ints.unsigned;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
3
lib/tests/modules/define-value-int-negative.nix
Normal file
3
lib/tests/modules/define-value-int-negative.nix
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
value = -23;
|
||||||
|
}
|
3
lib/tests/modules/define-value-int-positive.nix
Normal file
3
lib/tests/modules/define-value-int-positive.nix
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
value = 42;
|
||||||
|
}
|
3
lib/tests/modules/define-value-int-zero.nix
Normal file
3
lib/tests/modules/define-value-int-zero.nix
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
{ lib }:
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
/* The identity function
|
/* The identity function
|
||||||
@ -55,7 +56,7 @@ rec {
|
|||||||
isInt add sub lessThan
|
isInt add sub lessThan
|
||||||
seq deepSeq genericClosure;
|
seq deepSeq genericClosure;
|
||||||
|
|
||||||
inherit (import ./strings.nix) fileContents;
|
inherit (lib.strings) fileContents;
|
||||||
|
|
||||||
# Return the Nixpkgs version number.
|
# Return the Nixpkgs version number.
|
||||||
nixpkgsVersion =
|
nixpkgsVersion =
|
||||||
|
131
lib/types.nix
131
lib/types.nix
@ -1,15 +1,16 @@
|
|||||||
# Definitions related to run-time type checking. Used in particular
|
# Definitions related to run-time type checking. Used in particular
|
||||||
# to type-check NixOS configurations.
|
# to type-check NixOS configurations.
|
||||||
|
{ lib }:
|
||||||
|
with lib.lists;
|
||||||
|
with lib.attrsets;
|
||||||
|
with lib.options;
|
||||||
|
with lib.trivial;
|
||||||
|
with lib.strings;
|
||||||
|
let
|
||||||
|
|
||||||
with import ./lists.nix;
|
inherit (lib.modules) mergeDefinitions filterOverrides;
|
||||||
with import ./attrsets.nix;
|
outer_types =
|
||||||
with import ./options.nix;
|
|
||||||
with import ./trivial.nix;
|
|
||||||
with import ./strings.nix;
|
|
||||||
let inherit (import ./modules.nix) mergeDefinitions filterOverrides; in
|
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
isType = type: x: (x._type or "") == type;
|
isType = type: x: (x._type or "") == type;
|
||||||
|
|
||||||
setType = typeName: value: value // {
|
setType = typeName: value: value // {
|
||||||
@ -95,7 +96,6 @@ rec {
|
|||||||
# When adding new types don't forget to document them in
|
# When adding new types don't forget to document them in
|
||||||
# nixos/doc/manual/development/option-types.xml!
|
# nixos/doc/manual/development/option-types.xml!
|
||||||
types = rec {
|
types = rec {
|
||||||
|
|
||||||
unspecified = mkOptionType {
|
unspecified = mkOptionType {
|
||||||
name = "unspecified";
|
name = "unspecified";
|
||||||
};
|
};
|
||||||
@ -108,11 +108,64 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
int = mkOptionType rec {
|
int = mkOptionType rec {
|
||||||
name = "int";
|
name = "int";
|
||||||
description = "integer";
|
description = "signed integer";
|
||||||
check = isInt;
|
check = isInt;
|
||||||
merge = mergeOneOption;
|
merge = mergeOneOption;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Specialized subdomains of int
|
||||||
|
ints =
|
||||||
|
let
|
||||||
|
betweenDesc = lowest: highest:
|
||||||
|
"${toString lowest} and ${toString highest} (both inclusive)";
|
||||||
|
between = lowest: highest: assert lowest <= highest;
|
||||||
|
addCheck int (x: x >= lowest && x <= highest) // {
|
||||||
|
name = "intBetween";
|
||||||
|
description = "integer between ${betweenDesc lowest highest}";
|
||||||
|
};
|
||||||
|
ign = lowest: highest: name: docStart:
|
||||||
|
between lowest highest // {
|
||||||
|
inherit name;
|
||||||
|
description = docStart + "; between ${betweenDesc lowest highest}";
|
||||||
|
};
|
||||||
|
unsign = bit: range: ign 0 (range - 1)
|
||||||
|
"unsignedInt${toString bit}" "${toString bit} bit unsigned integer";
|
||||||
|
sign = bit: range: ign (0 - (range / 2)) (range / 2 - 1)
|
||||||
|
"signedInt${toString bit}" "${toString bit} bit signed integer";
|
||||||
|
|
||||||
|
in rec {
|
||||||
|
/* An int with a fixed range.
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* (ints.between 0 100).check (-1)
|
||||||
|
* => false
|
||||||
|
* (ints.between 0 100).check (101)
|
||||||
|
* => false
|
||||||
|
* (ints.between 0 0).check 0
|
||||||
|
* => true
|
||||||
|
*/
|
||||||
|
inherit between;
|
||||||
|
|
||||||
|
unsigned = addCheck types.int (x: x >= 0) // {
|
||||||
|
name = "unsignedInt";
|
||||||
|
description = "unsigned integer, meaning >=0";
|
||||||
|
};
|
||||||
|
positive = addCheck types.int (x: x > 0) // {
|
||||||
|
name = "positiveInt";
|
||||||
|
description = "positive integer, meaning >0";
|
||||||
|
};
|
||||||
|
u8 = unsign 8 256;
|
||||||
|
u16 = unsign 16 65536;
|
||||||
|
# the biggest int a 64-bit Nix accepts is 2^63 - 1 (9223372036854775808), for a 32-bit Nix it is 2^31 - 1 (2147483647)
|
||||||
|
# the smallest int a 64-bit Nix accepts is -2^63 (-9223372036854775807), for a 32-bit Nix it is -2^31 (-2147483648)
|
||||||
|
# u32 = unsign 32 4294967296;
|
||||||
|
# u64 = unsign 64 18446744073709551616;
|
||||||
|
|
||||||
|
s8 = sign 8 256;
|
||||||
|
s16 = sign 16 65536;
|
||||||
|
# s32 = sign 32 4294967296;
|
||||||
|
};
|
||||||
|
|
||||||
str = mkOptionType {
|
str = mkOptionType {
|
||||||
name = "str";
|
name = "str";
|
||||||
@ -121,6 +174,13 @@ rec {
|
|||||||
merge = mergeOneOption;
|
merge = mergeOneOption;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
strMatching = pattern: mkOptionType {
|
||||||
|
name = "strMatching ${escapeNixString pattern}";
|
||||||
|
description = "string matching the pattern ${pattern}";
|
||||||
|
check = x: str.check x && builtins.match pattern x != null;
|
||||||
|
inherit (str) merge;
|
||||||
|
};
|
||||||
|
|
||||||
# Merge multiple definitions by concatenating them (with the given
|
# Merge multiple definitions by concatenating them (with the given
|
||||||
# separator between the values).
|
# separator between the values).
|
||||||
separatedString = sep: mkOptionType rec {
|
separatedString = sep: mkOptionType rec {
|
||||||
@ -172,7 +232,7 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# drop this in the future:
|
# drop this in the future:
|
||||||
list = builtins.trace "`types.list' is deprecated; use `types.listOf' instead" types.listOf;
|
list = builtins.trace "`types.list` is deprecated; use `types.listOf` instead" types.listOf;
|
||||||
|
|
||||||
listOf = elemType: mkOptionType rec {
|
listOf = elemType: mkOptionType rec {
|
||||||
name = "listOf";
|
name = "listOf";
|
||||||
@ -189,7 +249,7 @@ rec {
|
|||||||
).optionalValue
|
).optionalValue
|
||||||
) def.value
|
) def.value
|
||||||
else
|
else
|
||||||
throw "The option value `${showOption loc}' in `${def.file}' is not a list.") defs)));
|
throw "The option value `${showOption loc}` in `${def.file}` is not a list.") defs)));
|
||||||
getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["*"]);
|
getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["*"]);
|
||||||
getSubModules = elemType.getSubModules;
|
getSubModules = elemType.getSubModules;
|
||||||
substSubModules = m: listOf (elemType.substSubModules m);
|
substSubModules = m: listOf (elemType.substSubModules m);
|
||||||
@ -240,25 +300,6 @@ rec {
|
|||||||
functor = (defaultFunctor name) // { wrapped = elemType; };
|
functor = (defaultFunctor name) // { wrapped = elemType; };
|
||||||
};
|
};
|
||||||
|
|
||||||
# List or element of ...
|
|
||||||
loeOf = elemType: mkOptionType rec {
|
|
||||||
name = "loeOf";
|
|
||||||
description = "element or list of ${elemType.description}s";
|
|
||||||
check = x: isList x || elemType.check x;
|
|
||||||
merge = loc: defs:
|
|
||||||
let
|
|
||||||
defs' = filterOverrides defs;
|
|
||||||
res = (head defs').value;
|
|
||||||
in
|
|
||||||
if isList res then concatLists (getValues defs')
|
|
||||||
else if lessThan 1 (length defs') then
|
|
||||||
throw "The option `${showOption loc}' is defined multiple times, in ${showFiles (getFiles defs)}."
|
|
||||||
else if !isString res then
|
|
||||||
throw "The option `${showOption loc}' does not have a string value, in ${showFiles (getFiles defs)}."
|
|
||||||
else res;
|
|
||||||
functor = (defaultFunctor name) // { wrapped = elemType; };
|
|
||||||
};
|
|
||||||
|
|
||||||
# Value of given type but with no merging (i.e. `uniq list`s are not concatenated).
|
# Value of given type but with no merging (i.e. `uniq list`s are not concatenated).
|
||||||
uniq = elemType: mkOptionType rec {
|
uniq = elemType: mkOptionType rec {
|
||||||
name = "uniq";
|
name = "uniq";
|
||||||
@ -279,7 +320,7 @@ rec {
|
|||||||
let nrNulls = count (def: def.value == null) defs; in
|
let nrNulls = count (def: def.value == null) defs; in
|
||||||
if nrNulls == length defs then null
|
if nrNulls == length defs then null
|
||||||
else if nrNulls != 0 then
|
else if nrNulls != 0 then
|
||||||
throw "The option `${showOption loc}' is defined both null and not null, in ${showFiles (getFiles defs)}."
|
throw "The option `${showOption loc}` is defined both null and not null, in ${showFiles (getFiles defs)}."
|
||||||
else elemType.merge loc defs;
|
else elemType.merge loc defs;
|
||||||
getSubOptions = elemType.getSubOptions;
|
getSubOptions = elemType.getSubOptions;
|
||||||
getSubModules = elemType.getSubModules;
|
getSubModules = elemType.getSubModules;
|
||||||
@ -291,7 +332,7 @@ rec {
|
|||||||
submodule = opts:
|
submodule = opts:
|
||||||
let
|
let
|
||||||
opts' = toList opts;
|
opts' = toList opts;
|
||||||
inherit (import ./modules.nix) evalModules;
|
inherit (lib.modules) evalModules;
|
||||||
in
|
in
|
||||||
mkOptionType rec {
|
mkOptionType rec {
|
||||||
name = "submodule";
|
name = "submodule";
|
||||||
@ -307,8 +348,17 @@ rec {
|
|||||||
}).config;
|
}).config;
|
||||||
getSubOptions = prefix: (evalModules
|
getSubOptions = prefix: (evalModules
|
||||||
{ modules = opts'; inherit prefix;
|
{ modules = opts'; inherit prefix;
|
||||||
# FIXME: hack to get shit to evaluate.
|
# This is a work-around due to the fact that some sub-modules,
|
||||||
args = { name = ""; }; }).options;
|
# such as the one included in an attribute set, expects a "args"
|
||||||
|
# attribute to be given to the sub-module. As the option
|
||||||
|
# evaluation does not have any specific attribute name, we
|
||||||
|
# provide a default one for the documentation.
|
||||||
|
#
|
||||||
|
# This is mandatory as some option declaration might use the
|
||||||
|
# "name" attribute given as argument of the submodule and use it
|
||||||
|
# as the default of option declarations.
|
||||||
|
args.name = "<name>";
|
||||||
|
}).options;
|
||||||
getSubModules = opts';
|
getSubModules = opts';
|
||||||
substSubModules = m: submodule m;
|
substSubModules = m: submodule m;
|
||||||
functor = (defaultFunctor name) // {
|
functor = (defaultFunctor name) // {
|
||||||
@ -395,5 +445,6 @@ rec {
|
|||||||
addCheck = elemType: check: elemType // { check = x: elemType.check x && check x; };
|
addCheck = elemType: check: elemType // { check = x: elemType.check x && check x; };
|
||||||
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
}
|
in outer_types // outer_types.types
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#! /usr/bin/env nix-shell
|
#! /usr/bin/env nix-shell
|
||||||
#! nix-shell -i perl -p perl perlPackages.NetAmazonS3 perlPackages.FileSlurp nixUnstable
|
#! nix-shell -i perl -p perl perlPackages.NetAmazonS3 perlPackages.FileSlurp nixUnstable nixUnstable.perl-bindings
|
||||||
|
|
||||||
# This command uploads tarballs to tarballs.nixos.org, the
|
# This command uploads tarballs to tarballs.nixos.org, the
|
||||||
# content-addressed cache used by fetchurl as a fallback for when
|
# content-addressed cache used by fetchurl as a fallback for when
|
||||||
@ -59,6 +59,7 @@ my $s3 = Net::Amazon::S3->new(
|
|||||||
{ aws_access_key_id => $aws_access_key_id,
|
{ aws_access_key_id => $aws_access_key_id,
|
||||||
aws_secret_access_key => $aws_secret_access_key,
|
aws_secret_access_key => $aws_secret_access_key,
|
||||||
retry => 1,
|
retry => 1,
|
||||||
|
host => "s3-eu-west-1.amazonaws.com",
|
||||||
});
|
});
|
||||||
|
|
||||||
my $bucket = $s3->bucket("nixpkgs-tarballs") or die;
|
my $bucket = $s3->bucket("nixpkgs-tarballs") or die;
|
||||||
|
@ -6,20 +6,18 @@ GNOME_FTP=ftp.gnome.org/pub/GNOME/sources
|
|||||||
|
|
||||||
# projects that don't follow the GNOME major versioning, or that we don't want to
|
# projects that don't follow the GNOME major versioning, or that we don't want to
|
||||||
# programmatically update
|
# programmatically update
|
||||||
NO_GNOME_MAJOR="ghex gtkhtml gdm"
|
NO_GNOME_MAJOR="ghex gtkhtml gdm gucharmap"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $0 gnome_dir <show project>|<update project>|<update-all> [major.minor]" >&2
|
echo "Usage: $0 <show project>|<update project>|<update-all> [major.minor]" >&2
|
||||||
echo "gnome_dir is for example pkgs/desktops/gnome-3/3.18" >&2
|
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$#" -lt 2 ]; then
|
if [ "$#" -lt 1 ]; then
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
GNOME_TOP=$1
|
GNOME_TOP=pkgs/desktops/gnome-3
|
||||||
shift
|
|
||||||
|
|
||||||
action=$1
|
action=$1
|
||||||
|
|
||||||
|
@ -13,10 +13,8 @@ from pyquery import PyQuery as pq
|
|||||||
|
|
||||||
|
|
||||||
maintainers_json = subprocess.check_output([
|
maintainers_json = subprocess.check_output([
|
||||||
'nix-instantiate',
|
'nix-instantiate', '-E', 'import ./lib/maintainers.nix {}', '--eval', '--json'
|
||||||
'lib/maintainers.nix',
|
])
|
||||||
'--eval',
|
|
||||||
'--json'])
|
|
||||||
maintainers = json.loads(maintainers_json)
|
maintainers = json.loads(maintainers_json)
|
||||||
MAINTAINERS = {v: k for k, v in maintainers.iteritems()}
|
MAINTAINERS = {v: k for k, v in maintainers.iteritems()}
|
||||||
|
|
||||||
@ -51,8 +49,8 @@ def get_maintainers(attr_name):
|
|||||||
@click.command()
|
@click.command()
|
||||||
@click.option(
|
@click.option(
|
||||||
'--jobset',
|
'--jobset',
|
||||||
default="nixos/release-17.03",
|
default="nixos/release-17.09",
|
||||||
help='Hydra project like nixos/release-17.03')
|
help='Hydra project like nixos/release-17.09')
|
||||||
def cli(jobset):
|
def cli(jobset):
|
||||||
"""
|
"""
|
||||||
Given a Hydra project, inspect latest evaluation
|
Given a Hydra project, inspect latest evaluation
|
||||||
|
@ -1,82 +0,0 @@
|
|||||||
#! /usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
while test -n "$1"; do
|
|
||||||
|
|
||||||
# tell Travis to use folding
|
|
||||||
echo -en "travis_fold:start:$1\r"
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
nixpkgs-verify)
|
|
||||||
echo "=== Verifying that nixpkgs evaluates..."
|
|
||||||
|
|
||||||
nix-env --file $TRAVIS_BUILD_DIR --query --available --json > /dev/null
|
|
||||||
;;
|
|
||||||
|
|
||||||
nixos-options)
|
|
||||||
echo "=== Checking NixOS options"
|
|
||||||
|
|
||||||
nix-build $TRAVIS_BUILD_DIR/nixos/release.nix --attr options --show-trace
|
|
||||||
;;
|
|
||||||
|
|
||||||
nixos-manual)
|
|
||||||
echo "=== Checking NixOS manuals"
|
|
||||||
|
|
||||||
nix-build $TRAVIS_BUILD_DIR/nixos/release.nix --attr manual --show-trace
|
|
||||||
;;
|
|
||||||
|
|
||||||
nixpkgs-manual)
|
|
||||||
echo "=== Checking nixpkgs manuals"
|
|
||||||
|
|
||||||
nix-build $TRAVIS_BUILD_DIR/pkgs/top-level/release.nix --attr manual --show-trace
|
|
||||||
;;
|
|
||||||
|
|
||||||
nixpkgs-tarball)
|
|
||||||
echo "=== Checking nixpkgs tarball creation"
|
|
||||||
|
|
||||||
nix-build $TRAVIS_BUILD_DIR/pkgs/top-level/release.nix --attr tarball --show-trace
|
|
||||||
;;
|
|
||||||
|
|
||||||
nixpkgs-unstable)
|
|
||||||
echo "=== Checking nixpkgs unstable job"
|
|
||||||
|
|
||||||
nix-instantiate $TRAVIS_BUILD_DIR/pkgs/top-level/release.nix --attr unstable --show-trace
|
|
||||||
;;
|
|
||||||
|
|
||||||
nixpkgs-lint)
|
|
||||||
echo "=== Checking nixpkgs lint"
|
|
||||||
|
|
||||||
nix-shell --packages nixpkgs-lint --run "nixpkgs-lint -f $TRAVIS_BUILD_DIR"
|
|
||||||
;;
|
|
||||||
|
|
||||||
nox)
|
|
||||||
echo "=== Fetching Nox from binary cache"
|
|
||||||
|
|
||||||
# build nox (+ a basic nix-shell env) silently so it's not in the log
|
|
||||||
nix-shell -p nox stdenv --command true
|
|
||||||
;;
|
|
||||||
|
|
||||||
pr)
|
|
||||||
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
|
||||||
echo "=== No pull request found"
|
|
||||||
else
|
|
||||||
echo "=== Building pull request #$TRAVIS_PULL_REQUEST"
|
|
||||||
|
|
||||||
token=""
|
|
||||||
if [ -n "$GITHUB_TOKEN" ]; then
|
|
||||||
token="--token $GITHUB_TOKEN"
|
|
||||||
fi
|
|
||||||
|
|
||||||
nix-shell --packages nox --run "nox-review pr --slug $TRAVIS_REPO_SLUG $token $TRAVIS_PULL_REQUEST"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "Skipping unknown option $1"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo -en "travis_fold:end:$1\r"
|
|
||||||
shift
|
|
||||||
done
|
|
@ -1,5 +1,5 @@
|
|||||||
#! /usr/bin/env nix-shell
|
#! /usr/bin/env nix-shell
|
||||||
#! nix-shell -i python3 -p 'python3.withPackages(ps: with ps; [ requests toolz ])'
|
#! nix-shell -i python3 -p 'python3.withPackages(ps: with ps; [ packaging requests toolz ])' -p git
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Update a Python package expression by passing in the `.nix` file, or the directory containing it.
|
Update a Python package expression by passing in the `.nix` file, or the directory containing it.
|
||||||
@ -18,6 +18,12 @@ import os
|
|||||||
import re
|
import re
|
||||||
import requests
|
import requests
|
||||||
import toolz
|
import toolz
|
||||||
|
from concurrent.futures import ThreadPoolExecutor as Pool
|
||||||
|
from packaging.version import Version as _Version
|
||||||
|
from packaging.version import InvalidVersion
|
||||||
|
from packaging.specifiers import SpecifierSet
|
||||||
|
import collections
|
||||||
|
import subprocess
|
||||||
|
|
||||||
INDEX = "https://pypi.io/pypi"
|
INDEX = "https://pypi.io/pypi"
|
||||||
"""url of PyPI"""
|
"""url of PyPI"""
|
||||||
@ -25,10 +31,30 @@ INDEX = "https://pypi.io/pypi"
|
|||||||
EXTENSIONS = ['tar.gz', 'tar.bz2', 'tar', 'zip', '.whl']
|
EXTENSIONS = ['tar.gz', 'tar.bz2', 'tar', 'zip', '.whl']
|
||||||
"""Permitted file extensions. These are evaluated from left to right and the first occurance is returned."""
|
"""Permitted file extensions. These are evaluated from left to right and the first occurance is returned."""
|
||||||
|
|
||||||
|
PRERELEASES = False
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
|
||||||
|
|
||||||
|
class Version(_Version, collections.abc.Sequence):
|
||||||
|
|
||||||
|
def __init__(self, version):
|
||||||
|
super().__init__(version)
|
||||||
|
# We cannot use `str(Version(0.04.21))` because that becomes `0.4.21`
|
||||||
|
# https://github.com/avian2/unidecode/issues/13#issuecomment-354538882
|
||||||
|
self.raw_version = version
|
||||||
|
|
||||||
|
def __getitem__(self, i):
|
||||||
|
return self._version.release[i]
|
||||||
|
|
||||||
|
def __len__(self):
|
||||||
|
return len(self._version.release)
|
||||||
|
|
||||||
|
def __iter__(self):
|
||||||
|
yield from self._version.release
|
||||||
|
|
||||||
|
|
||||||
def _get_values(attribute, text):
|
def _get_values(attribute, text):
|
||||||
"""Match attribute in text and return all matches.
|
"""Match attribute in text and return all matches.
|
||||||
|
|
||||||
@ -81,13 +107,59 @@ def _fetch_page(url):
|
|||||||
else:
|
else:
|
||||||
raise ValueError("request for {} failed".format(url))
|
raise ValueError("request for {} failed".format(url))
|
||||||
|
|
||||||
def _get_latest_version_pypi(package, extension):
|
|
||||||
|
SEMVER = {
|
||||||
|
'major' : 0,
|
||||||
|
'minor' : 1,
|
||||||
|
'patch' : 2,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def _determine_latest_version(current_version, target, versions):
|
||||||
|
"""Determine latest version, given `target`.
|
||||||
|
"""
|
||||||
|
current_version = Version(current_version)
|
||||||
|
|
||||||
|
def _parse_versions(versions):
|
||||||
|
for v in versions:
|
||||||
|
try:
|
||||||
|
yield Version(v)
|
||||||
|
except InvalidVersion:
|
||||||
|
pass
|
||||||
|
|
||||||
|
versions = _parse_versions(versions)
|
||||||
|
|
||||||
|
index = SEMVER[target]
|
||||||
|
|
||||||
|
ceiling = list(current_version[0:index])
|
||||||
|
if len(ceiling) == 0:
|
||||||
|
ceiling = None
|
||||||
|
else:
|
||||||
|
ceiling[-1]+=1
|
||||||
|
ceiling = Version(".".join(map(str, ceiling)))
|
||||||
|
|
||||||
|
# We do not want prereleases
|
||||||
|
versions = SpecifierSet(prereleases=PRERELEASES).filter(versions)
|
||||||
|
|
||||||
|
if ceiling is not None:
|
||||||
|
versions = SpecifierSet(f"<{ceiling}").filter(versions)
|
||||||
|
|
||||||
|
return (max(sorted(versions))).raw_version
|
||||||
|
|
||||||
|
|
||||||
|
def _get_latest_version_pypi(package, extension, current_version, target):
|
||||||
"""Get latest version and hash from PyPI."""
|
"""Get latest version and hash from PyPI."""
|
||||||
url = "{}/{}/json".format(INDEX, package)
|
url = "{}/{}/json".format(INDEX, package)
|
||||||
json = _fetch_page(url)
|
json = _fetch_page(url)
|
||||||
|
|
||||||
version = json['info']['version']
|
versions = json['releases'].keys()
|
||||||
for release in json['releases'][version]:
|
version = _determine_latest_version(current_version, target, versions)
|
||||||
|
|
||||||
|
try:
|
||||||
|
releases = json['releases'][version]
|
||||||
|
except KeyError as e:
|
||||||
|
raise KeyError('Could not find version {} for {}'.format(version, package)) from e
|
||||||
|
for release in releases:
|
||||||
if release['filename'].endswith(extension):
|
if release['filename'].endswith(extension):
|
||||||
# TODO: In case of wheel we need to do further checks!
|
# TODO: In case of wheel we need to do further checks!
|
||||||
sha256 = release['digests']['sha256']
|
sha256 = release['digests']['sha256']
|
||||||
@ -97,7 +169,7 @@ def _get_latest_version_pypi(package, extension):
|
|||||||
return version, sha256
|
return version, sha256
|
||||||
|
|
||||||
|
|
||||||
def _get_latest_version_github(package, extension):
|
def _get_latest_version_github(package, extension, current_version, target):
|
||||||
raise ValueError("updating from GitHub is not yet supported.")
|
raise ValueError("updating from GitHub is not yet supported.")
|
||||||
|
|
||||||
|
|
||||||
@ -140,9 +212,9 @@ def _determine_extension(text, fetcher):
|
|||||||
"""
|
"""
|
||||||
if fetcher == 'fetchPypi':
|
if fetcher == 'fetchPypi':
|
||||||
try:
|
try:
|
||||||
format = _get_unique_value('format', text)
|
src_format = _get_unique_value('format', text)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
format = None # format was not given
|
src_format = None # format was not given
|
||||||
|
|
||||||
try:
|
try:
|
||||||
extension = _get_unique_value('extension', text)
|
extension = _get_unique_value('extension', text)
|
||||||
@ -150,9 +222,11 @@ def _determine_extension(text, fetcher):
|
|||||||
extension = None # extension was not given
|
extension = None # extension was not given
|
||||||
|
|
||||||
if extension is None:
|
if extension is None:
|
||||||
if format is None:
|
if src_format is None:
|
||||||
format = 'setuptools'
|
src_format = 'setuptools'
|
||||||
extension = FORMATS[format]
|
elif src_format == 'flit':
|
||||||
|
raise ValueError("Don't know how to update a Flit package.")
|
||||||
|
extension = FORMATS[src_format]
|
||||||
|
|
||||||
elif fetcher == 'fetchurl':
|
elif fetcher == 'fetchurl':
|
||||||
url = _get_unique_value('url', text)
|
url = _get_unique_value('url', text)
|
||||||
@ -166,9 +240,7 @@ def _determine_extension(text, fetcher):
|
|||||||
return extension
|
return extension
|
||||||
|
|
||||||
|
|
||||||
def _update_package(path):
|
def _update_package(path, target):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Read the expression
|
# Read the expression
|
||||||
with open(path, 'r') as f:
|
with open(path, 'r') as f:
|
||||||
@ -185,11 +257,13 @@ def _update_package(path):
|
|||||||
|
|
||||||
extension = _determine_extension(text, fetcher)
|
extension = _determine_extension(text, fetcher)
|
||||||
|
|
||||||
new_version, new_sha256 = _get_latest_version_pypi(pname, extension)
|
new_version, new_sha256 = FETCHERS[fetcher](pname, extension, version, target)
|
||||||
|
|
||||||
if new_version == version:
|
if new_version == version:
|
||||||
logging.info("Path {}: no update available for {}.".format(path, pname))
|
logging.info("Path {}: no update available for {}.".format(path, pname))
|
||||||
return False
|
return False
|
||||||
|
elif new_version <= version:
|
||||||
|
raise ValueError("downgrade for {}.".format(pname))
|
||||||
if not new_sha256:
|
if not new_sha256:
|
||||||
raise ValueError("no file available for {}.".format(pname))
|
raise ValueError("no file available for {}.".format(pname))
|
||||||
|
|
||||||
@ -201,10 +275,19 @@ def _update_package(path):
|
|||||||
|
|
||||||
logging.info("Path {}: updated {} from {} to {}".format(path, pname, version, new_version))
|
logging.info("Path {}: updated {} from {} to {}".format(path, pname, version, new_version))
|
||||||
|
|
||||||
return True
|
result = {
|
||||||
|
'path' : path,
|
||||||
|
'target': target,
|
||||||
|
'pname': pname,
|
||||||
|
'old_version' : version,
|
||||||
|
'new_version' : new_version,
|
||||||
|
#'fetcher' : fetcher,
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
def _update(path):
|
def _update(path, target):
|
||||||
|
|
||||||
# We need to read and modify a Nix expression.
|
# We need to read and modify a Nix expression.
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
@ -221,23 +304,58 @@ def _update(path):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return _update_package(path)
|
return _update_package(path, target)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
logging.warning("Path {}: {}".format(path, e))
|
logging.warning("Path {}: {}".format(path, e))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def _commit(path, pname, old_version, new_version, **kwargs):
|
||||||
|
"""Commit result.
|
||||||
|
"""
|
||||||
|
|
||||||
|
msg = f'python: {pname}: {old_version} -> {new_version}'
|
||||||
|
|
||||||
|
try:
|
||||||
|
subprocess.check_call(['git', 'add', path])
|
||||||
|
subprocess.check_call(['git', 'commit', '-m', msg])
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
subprocess.check_call(['git', 'checkout', path])
|
||||||
|
raise subprocess.CalledProcessError(f'Could not commit {path}') from e
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('package', type=str, nargs='+')
|
parser.add_argument('package', type=str, nargs='+')
|
||||||
|
parser.add_argument('--target', type=str, choices=SEMVER.keys(), default='major')
|
||||||
|
parser.add_argument('--commit', action='store_true', help='Create a commit for each package update')
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
target = args.target
|
||||||
|
|
||||||
packages = map(os.path.abspath, args.package)
|
packages = list(map(os.path.abspath, args.package))
|
||||||
|
|
||||||
|
logging.info("Updating packages...")
|
||||||
|
|
||||||
|
# Use threads to update packages concurrently
|
||||||
|
with Pool() as p:
|
||||||
|
results = list(p.map(lambda pkg: _update(pkg, target), packages))
|
||||||
|
|
||||||
|
logging.info("Finished updating packages.")
|
||||||
|
|
||||||
|
# Commits are created sequentially.
|
||||||
|
if args.commit:
|
||||||
|
logging.info("Committing updates...")
|
||||||
|
list(map(lambda x: _commit(**x), filter(bool, results)))
|
||||||
|
logging.info("Finished committing updates")
|
||||||
|
|
||||||
|
count = sum(map(bool, results))
|
||||||
|
logging.info("{} package(s) updated".format(count))
|
||||||
|
|
||||||
count = list(map(_update, packages))
|
|
||||||
|
|
||||||
logging.info("{} package(s) updated".format(sum(count)))
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
@ -23,10 +23,23 @@ networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
Note that TCP port 22 (ssh) is opened automatically if the SSH daemon
|
Note that TCP port 22 (ssh) is opened automatically if the SSH daemon
|
||||||
is enabled (<option>services.openssh.enable = true</option>). UDP
|
is enabled (<option>services.openssh.enable = true</option>). UDP
|
||||||
ports can be opened through
|
ports can be opened through
|
||||||
<option>networking.firewall.allowedUDPPorts</option>. Also of
|
<option>networking.firewall.allowedUDPPorts</option>.</para>
|
||||||
interest is
|
|
||||||
|
<para>To open ranges of TCP ports:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
networking.firewall.allowedTCPPortRanges = [
|
||||||
|
{ from = 4000; to = 4007; }
|
||||||
|
{ from = 8000; to = 8010; }
|
||||||
|
];
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
Similarly, UDP port ranges can be opened through
|
||||||
|
<option>networking.firewall.allowedUDPPortRanges</option>.</para>
|
||||||
|
|
||||||
|
<para>Also of interest is
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
networking.firewall.allowPing = true;
|
networking.firewall.allowPing = true;
|
||||||
|
@ -113,7 +113,8 @@ manual</link> for the rest.</para>
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>assert 1 + 1 == 2; "yes!"</literal></entry>
|
<entry><literal>assert 1 + 1 == 2; "yes!"</literal></entry>
|
||||||
<entry>Assertion check (evaluates to <literal>"yes!"</literal>)</entry>
|
<entry>Assertion check (evaluates to <literal>"yes!"</literal>). See <xref
|
||||||
|
linkend="sec-assertions"/> for using assertions in modules</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>let x = "foo"; y = "bar"; in x + y</literal></entry>
|
<entry><literal>let x = "foo"; y = "bar"; in x + y</literal></entry>
|
||||||
|
@ -12,7 +12,7 @@ management. In the declarative style, users are specified in
|
|||||||
states that a user account named <literal>alice</literal> shall exist:
|
states that a user account named <literal>alice</literal> shall exist:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
users.extraUsers.alice =
|
users.users.alice =
|
||||||
{ isNormalUser = true;
|
{ isNormalUser = true;
|
||||||
home = "/home/alice";
|
home = "/home/alice";
|
||||||
description = "Alice Foobar";
|
description = "Alice Foobar";
|
||||||
@ -34,7 +34,7 @@ to set a password, which is retained across invocations of
|
|||||||
|
|
||||||
<para>If you set users.mutableUsers to false, then the contents of /etc/passwd
|
<para>If you set users.mutableUsers to false, then the contents of /etc/passwd
|
||||||
and /etc/group will be congruent to your NixOS configuration. For instance,
|
and /etc/group will be congruent to your NixOS configuration. For instance,
|
||||||
if you remove a user from users.extraUsers and run nixos-rebuild, the user
|
if you remove a user from users.users and run nixos-rebuild, the user
|
||||||
account will cease to exist. Also, imperative commands for managing users
|
account will cease to exist. Also, imperative commands for managing users
|
||||||
and groups, such as useradd, are no longer available. Passwords may still be
|
and groups, such as useradd, are no longer available. Passwords may still be
|
||||||
assigned by setting the user's <literal>hashedPassword</literal> option. A
|
assigned by setting the user's <literal>hashedPassword</literal> option. A
|
||||||
@ -54,7 +54,7 @@ to the user specification.</para>
|
|||||||
group named <literal>students</literal> shall exist:
|
group named <literal>students</literal> shall exist:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
users.extraGroups.students.gid = 1000;
|
users.groups.students.gid = 1000;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
As with users, the group ID (gid) is optional and will be assigned
|
As with users, the group ID (gid) is optional and will be assigned
|
||||||
|
@ -115,13 +115,14 @@ hardware.opengl.driSupport32Bit = true;
|
|||||||
<para>Support for Synaptics touchpads (found in many laptops such as
|
<para>Support for Synaptics touchpads (found in many laptops such as
|
||||||
the Dell Latitude series) can be enabled as follows:
|
the Dell Latitude series) can be enabled as follows:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
services.xserver.synaptics.enable = true;
|
services.xserver.libinput.enable = true;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
The driver has many options (see <xref linkend="ch-options"/>). For
|
The driver has many options (see <xref linkend="ch-options"/>). For
|
||||||
instance, the following enables two-finger scrolling:
|
instance, the following disables tap-to-click behavior:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
services.xserver.synaptics.twoFingerScroll = true;
|
services.xserver.libinput.tapping = false;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
Note: the use of <literal>services.xserver.synaptics</literal> is deprecated since NixOS 17.09.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</simplesect>
|
</simplesect>
|
||||||
@ -129,7 +130,7 @@ services.xserver.synaptics.twoFingerScroll = true;
|
|||||||
<simplesect><title>GTK/Qt themes</title>
|
<simplesect><title>GTK/Qt themes</title>
|
||||||
|
|
||||||
<para>GTK themes can be installed either to user profile or system-wide (via
|
<para>GTK themes can be installed either to user profile or system-wide (via
|
||||||
<literal>system.environmentPackages</literal>). To make Qt 5 applications look similar
|
<literal>environment.systemPackages</literal>). To make Qt 5 applications look similar
|
||||||
to GTK2 ones, you can install <literal>qt5.qtbase.gtk</literal> package into your
|
to GTK2 ones, you can install <literal>qt5.qtbase.gtk</literal> package into your
|
||||||
system environment. It should work for all Qt 5 library versions.
|
system environment. It should work for all Qt 5 library versions.
|
||||||
</para>
|
</para>
|
||||||
|
@ -106,13 +106,43 @@ let
|
|||||||
xmllint --xinclude --noxincludenode \
|
xmllint --xinclude --noxincludenode \
|
||||||
--output ./man-pages-combined.xml ./man-pages.xml
|
--output ./man-pages-combined.xml ./man-pages.xml
|
||||||
|
|
||||||
xmllint --debug --noout --nonet \
|
# outputs the context of an xmllint error output
|
||||||
--relaxng ${docbook5}/xml/rng/docbook/docbook.rng \
|
# LEN lines around the failing line are printed
|
||||||
manual-combined.xml
|
function context {
|
||||||
xmllint --debug --noout --nonet \
|
# length of context
|
||||||
--relaxng ${docbook5}/xml/rng/docbook/docbook.rng \
|
local LEN=6
|
||||||
man-pages-combined.xml
|
# lines to print before error line
|
||||||
|
local BEFORE=4
|
||||||
|
|
||||||
|
# xmllint output lines are:
|
||||||
|
# file.xml:1234: there was an error on line 1234
|
||||||
|
while IFS=':' read -r file line rest; do
|
||||||
|
echo
|
||||||
|
if [[ -n "$rest" ]]; then
|
||||||
|
echo "$file:$line:$rest"
|
||||||
|
local FROM=$(($line>$BEFORE ? $line - $BEFORE : 1))
|
||||||
|
# number lines & filter context
|
||||||
|
nl --body-numbering=a "$file" | sed -n "$FROM,+$LEN p"
|
||||||
|
else
|
||||||
|
if [[ -n "$line" ]]; then
|
||||||
|
echo "$file:$line"
|
||||||
|
else
|
||||||
|
echo "$file"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function lintrng {
|
||||||
|
xmllint --debug --noout --nonet \
|
||||||
|
--relaxng ${docbook5}/xml/rng/docbook/docbook.rng \
|
||||||
|
"$1" \
|
||||||
|
2>&1 | context 1>&2
|
||||||
|
# ^ redirect assumes xmllint doesn’t print to stdout
|
||||||
|
}
|
||||||
|
|
||||||
|
lintrng manual-combined.xml
|
||||||
|
lintrng man-pages-combined.xml
|
||||||
|
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cp manual-combined.xml $out/
|
cp manual-combined.xml $out/
|
||||||
|
80
nixos/doc/manual/development/assertions.xml
Normal file
80
nixos/doc/manual/development/assertions.xml
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<section xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
|
version="5.0"
|
||||||
|
xml:id="sec-assertions">
|
||||||
|
|
||||||
|
<title>Warnings and Assertions</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
When configuration problems are detectable in a module, it is a good
|
||||||
|
idea to write an assertion or warning. Doing so provides clear
|
||||||
|
feedback to the user and prevents errors after the build.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Although Nix has the <literal>abort</literal> and
|
||||||
|
<literal>builtins.trace</literal> <link xlink:href="https://nixos.org/nix/manual/#ssec-builtins">functions</link> to perform such tasks,
|
||||||
|
they are not ideally suited for NixOS modules. Instead of these
|
||||||
|
functions, you can declare your warnings and assertions using the
|
||||||
|
NixOS module system.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<title>Warnings</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This is an example of using <literal>warnings</literal>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.services.foo.enable {
|
||||||
|
warnings =
|
||||||
|
if config.services.foo.bar
|
||||||
|
then [ ''You have enabled the bar feature of the foo service.
|
||||||
|
This is known to cause some specific problems in certain situations.
|
||||||
|
'' ]
|
||||||
|
else [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<title>Assertions</title>
|
||||||
|
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This example, extracted from the
|
||||||
|
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/release-17.09/nixos/modules/services/logging/syslogd.nix">
|
||||||
|
<literal>syslogd</literal> module
|
||||||
|
</link> shows how to use <literal>assertions</literal>. Since there
|
||||||
|
can only be one active syslog daemon at a time, an assertion is useful to
|
||||||
|
prevent such a broken system from being built.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.services.syslogd.enable {
|
||||||
|
assertions =
|
||||||
|
[ { assertion = !config.services.rsyslogd.enable;
|
||||||
|
message = "rsyslogd conflicts with syslogd";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</section>
|
@ -22,6 +22,15 @@ options = {
|
|||||||
};
|
};
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
|
The attribute names within the <replaceable>name</replaceable>
|
||||||
|
attribute path must be camel cased in general but should, as an
|
||||||
|
exception, match the
|
||||||
|
<link
|
||||||
|
xlink:href="https://nixos.org/nixpkgs/manual/#sec-package-naming">
|
||||||
|
package attribute name</link> when referencing a Nixpkgs package. For
|
||||||
|
example, the option <varname>services.nix-serve.bindAddress</varname>
|
||||||
|
references the <varname>nix-serve</varname> Nixpkgs package.
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>The function <varname>mkOption</varname> accepts the following arguments.
|
<para>The function <varname>mkOption</varname> accepts the following arguments.
|
||||||
@ -137,8 +146,8 @@ services.xserver.displayManager.enable = mkOption {
|
|||||||
};</screen></example>
|
};</screen></example>
|
||||||
|
|
||||||
<example xml:id='ex-option-declaration-eot-backend-sddm'><title>Extending
|
<example xml:id='ex-option-declaration-eot-backend-sddm'><title>Extending
|
||||||
<literal>services.foo.backend</literal> in the <literal>sddm</literal>
|
<literal>services.xserver.displayManager.enable</literal> in the
|
||||||
module</title>
|
<literal>sddm</literal> module</title>
|
||||||
<screen>
|
<screen>
|
||||||
services.xserver.displayManager.enable = mkOption {
|
services.xserver.displayManager.enable = mkOption {
|
||||||
type = with types; nullOr (enum [ "sddm" ]);
|
type = with types; nullOr (enum [ "sddm" ]);
|
||||||
|
@ -22,10 +22,6 @@
|
|||||||
<listitem><para>A boolean, its values can be <literal>true</literal> or
|
<listitem><para>A boolean, its values can be <literal>true</literal> or
|
||||||
<literal>false</literal>.</para></listitem>
|
<literal>false</literal>.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
|
||||||
<term><varname>types.int</varname></term>
|
|
||||||
<listitem><para>An integer.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>types.path</varname></term>
|
<term><varname>types.path</varname></term>
|
||||||
<listitem><para>A filesystem path, defined as anything that when coerced to
|
<listitem><para>A filesystem path, defined as anything that when coerced to
|
||||||
@ -39,7 +35,59 @@
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>String related types:</para>
|
<para>Integer-related types:</para>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>types.int</varname></term>
|
||||||
|
<listitem><para>A signed integer.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<varname>types.ints.{s8, s16, s32}</varname>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>Signed integers with a fixed length (8, 16 or 32 bits).
|
||||||
|
They go from
|
||||||
|
<inlineequation><mathphrase>−2<superscript>n</superscript>/2</mathphrase>
|
||||||
|
</inlineequation> to <inlineequation>
|
||||||
|
<mathphrase>2<superscript>n</superscript>/2−1</mathphrase>
|
||||||
|
</inlineequation>
|
||||||
|
respectively (e.g. <literal>−128</literal> to <literal>127</literal>
|
||||||
|
for 8 bits).
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<varname>types.ints.unsigned</varname>
|
||||||
|
</term>
|
||||||
|
<listitem><para>An unsigned integer (that is >= 0).
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<varname>types.ints.{u8, u16, u32}</varname>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>Unsigned integers with a fixed length (8, 16 or 32 bits).
|
||||||
|
They go from
|
||||||
|
<inlineequation><mathphrase>0</mathphrase></inlineequation> to <inlineequation>
|
||||||
|
<mathphrase>2<superscript>n</superscript>−1</mathphrase>
|
||||||
|
</inlineequation>
|
||||||
|
respectively (e.g. <literal>0</literal> to <literal>255</literal>
|
||||||
|
for 8 bits).
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<varname>types.ints.positive</varname>
|
||||||
|
</term>
|
||||||
|
<listitem><para>A positive integer (that is > 0).
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
<para>String-related types:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -62,13 +110,19 @@
|
|||||||
<listitem><para>A string. Multiple definitions are concatenated with a
|
<listitem><para>A string. Multiple definitions are concatenated with a
|
||||||
collon <literal>":"</literal>.</para></listitem>
|
collon <literal>":"</literal>.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>types.strMatching</varname></term>
|
||||||
|
<listitem><para>A string matching a specific regular expression. Multiple
|
||||||
|
definitions cannot be merged. The regular expression is processed using
|
||||||
|
<literal>builtins.match</literal>.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section><title>Value Types</title>
|
<section><title>Value Types</title>
|
||||||
|
|
||||||
<para>Value types are type that take a value parameter.</para>
|
<para>Value types are types that take a value parameter.</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -84,6 +138,17 @@
|
|||||||
<replaceable>sep</replaceable>, e.g. <literal>types.separatedString
|
<replaceable>sep</replaceable>, e.g. <literal>types.separatedString
|
||||||
"|"</literal>.</para></listitem>
|
"|"</literal>.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<varname>types.ints.between</varname>
|
||||||
|
<replaceable>lowest</replaceable>
|
||||||
|
<replaceable>highest</replaceable>
|
||||||
|
</term>
|
||||||
|
<listitem><para>An integer between <replaceable>lowest</replaceable>
|
||||||
|
and <replaceable>highest</replaceable> (both inclusive).
|
||||||
|
Useful for creating types like <literal>types.port</literal>.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>types.submodule</varname> <replaceable>o</replaceable></term>
|
<term><varname>types.submodule</varname> <replaceable>o</replaceable></term>
|
||||||
<listitem><para>A set of sub options <replaceable>o</replaceable>.
|
<listitem><para>A set of sub options <replaceable>o</replaceable>.
|
||||||
@ -157,27 +222,26 @@
|
|||||||
|
|
||||||
<section xml:id='section-option-types-submodule'><title>Submodule</title>
|
<section xml:id='section-option-types-submodule'><title>Submodule</title>
|
||||||
|
|
||||||
<para>Submodule is a very powerful type that defines a set of sub-options that
|
<para><literal>submodule</literal> is a very powerful type that defines a set
|
||||||
are handled like a separate module.
|
of sub-options that are handled like a separate module.</para>
|
||||||
It is especially interesting when used with composed types like
|
|
||||||
<literal>attrsOf</literal> or <literal>listOf</literal>.</para>
|
|
||||||
|
|
||||||
<para>The submodule type take a parameter <replaceable>o</replaceable>, that
|
<para>It takes a parameter <replaceable>o</replaceable>, that should be a set,
|
||||||
should be a set, or a function returning a set with an
|
or a function returning a set with an <literal>options</literal> key
|
||||||
<literal>options</literal> key defining the sub-options.
|
defining the sub-options.
|
||||||
The option set can be defined directly (<xref linkend='ex-submodule-direct'
|
Submodule option definitions are type-checked accordingly to the
|
||||||
/>) or as reference (<xref linkend='ex-submodule-reference' />).</para>
|
<literal>options</literal> declarations.
|
||||||
|
Of course, you can nest submodule option definitons for even higher
|
||||||
|
modularity.</para>
|
||||||
|
|
||||||
<para>Submodule option definitions are type-checked accordingly to the options
|
<para>The option set can be defined directly
|
||||||
declarations. It is possible to declare submodule options inside a submodule
|
(<xref linkend='ex-submodule-direct' />) or as reference
|
||||||
sub-options for even higher modularity.</para>
|
(<xref linkend='ex-submodule-reference' />).</para>
|
||||||
|
|
||||||
<example xml:id='ex-submodule-direct'><title>Directly defined submodule</title>
|
<example xml:id='ex-submodule-direct'><title>Directly defined submodule</title>
|
||||||
<screen>
|
<screen>
|
||||||
options.mod = mkOption {
|
options.mod = mkOption {
|
||||||
name = "mod";
|
|
||||||
description = "submodule example";
|
description = "submodule example";
|
||||||
type = with types; listOf (submodule {
|
type = with types; submodule {
|
||||||
options = {
|
options = {
|
||||||
foo = mkOption {
|
foo = mkOption {
|
||||||
type = int;
|
type = int;
|
||||||
@ -186,7 +250,7 @@ options.mod = mkOption {
|
|||||||
type = str;
|
type = str;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
};
|
||||||
};</screen></example>
|
};</screen></example>
|
||||||
|
|
||||||
<example xml:id='ex-submodule-reference'><title>Submodule defined as a
|
<example xml:id='ex-submodule-reference'><title>Submodule defined as a
|
||||||
@ -206,16 +270,20 @@ let
|
|||||||
in
|
in
|
||||||
options.mod = mkOption {
|
options.mod = mkOption {
|
||||||
description = "submodule example";
|
description = "submodule example";
|
||||||
type = with types; listOf (submodule modOptions);
|
type = with types; submodule modOptions;
|
||||||
};</screen></example>
|
};</screen></example>
|
||||||
|
|
||||||
<section><title>Composed with <literal>listOf</literal></title>
|
<para>The <literal>submodule</literal> type is especially interesting when
|
||||||
|
used with composed types like <literal>attrsOf</literal> or
|
||||||
|
<literal>listOf</literal>.
|
||||||
|
When composed with <literal>listOf</literal>
|
||||||
|
(<xref linkend='ex-submodule-listof-declaration' />),
|
||||||
|
<literal>submodule</literal> allows multiple definitions of the submodule
|
||||||
|
option set (<xref linkend='ex-submodule-listof-definition' />).</para>
|
||||||
|
|
||||||
<para>When composed with <literal>listOf</literal>, submodule allows multiple
|
|
||||||
definitions of the submodule option set.</para>
|
|
||||||
|
|
||||||
<example xml:id='ex-submodule-listof-declaration'><title>Declaration of a list
|
<example xml:id='ex-submodule-listof-declaration'><title>Declaration of a list
|
||||||
of submodules</title>
|
nof submodules</title>
|
||||||
<screen>
|
<screen>
|
||||||
options.mod = mkOption {
|
options.mod = mkOption {
|
||||||
description = "submodule example";
|
description = "submodule example";
|
||||||
@ -239,13 +307,11 @@ config.mod = [
|
|||||||
{ foo = 2; bar = "two"; }
|
{ foo = 2; bar = "two"; }
|
||||||
];</screen></example>
|
];</screen></example>
|
||||||
|
|
||||||
</section>
|
<para>When composed with <literal>attrsOf</literal>
|
||||||
|
(<xref linkend='ex-submodule-attrsof-declaration' />),
|
||||||
|
<literal>submodule</literal> allows multiple named definitions of the
|
||||||
<section><title>Composed with <literal>attrsOf</literal></title>
|
submodule option set (<xref linkend='ex-submodule-attrsof-definition' />).
|
||||||
|
</para>
|
||||||
<para>When composed with <literal>attrsOf</literal>, submodule allows multiple
|
|
||||||
named definitions of the submodule option set.</para>
|
|
||||||
|
|
||||||
<example xml:id='ex-submodule-attrsof-declaration'><title>Declaration of
|
<example xml:id='ex-submodule-attrsof-declaration'><title>Declaration of
|
||||||
attribute sets of submodules</title>
|
attribute sets of submodules</title>
|
||||||
@ -270,7 +336,6 @@ options.mod = mkOption {
|
|||||||
config.mod.one = { foo = 1; bar = "one"; };
|
config.mod.one = { foo = 1; bar = "one"; };
|
||||||
config.mod.two = { foo = 2; bar = "two"; };</screen></example>
|
config.mod.two = { foo = 2; bar = "two"; };</screen></example>
|
||||||
|
|
||||||
</section>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section><title>Extending types</title>
|
<section><title>Extending types</title>
|
||||||
|
@ -178,6 +178,7 @@ in {
|
|||||||
<xi:include href="option-declarations.xml" />
|
<xi:include href="option-declarations.xml" />
|
||||||
<xi:include href="option-types.xml" />
|
<xi:include href="option-types.xml" />
|
||||||
<xi:include href="option-def.xml" />
|
<xi:include href="option-def.xml" />
|
||||||
|
<xi:include href="assertions.xml" />
|
||||||
<xi:include href="meta-attributes.xml" />
|
<xi:include href="meta-attributes.xml" />
|
||||||
<xi:include href="replace-modules.xml" />
|
<xi:include href="replace-modules.xml" />
|
||||||
|
|
||||||
|
@ -262,8 +262,47 @@ startAll;
|
|||||||
<literal>waitForWindow(qr/Terminal/)</literal>.</para></listitem>
|
<literal>waitForWindow(qr/Terminal/)</literal>.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><methodname>copyFileFromHost</methodname></term>
|
||||||
|
<listitem><para>Copies a file from host to machine, e.g.,
|
||||||
|
<literal>copyFileFromHost("myfile", "/etc/my/important/file")</literal>.</para>
|
||||||
|
<para>The first argument is the file on the host. The file needs to be
|
||||||
|
accessible while building the nix derivation. The second argument is
|
||||||
|
the location of the file on the machine.</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><methodname>systemctl</methodname></term>
|
||||||
|
<listitem>
|
||||||
|
<para>Runs <literal>systemctl</literal> commands with optional support for
|
||||||
|
<literal>systemctl --user</literal></para>
|
||||||
|
<para>
|
||||||
|
<programlisting>
|
||||||
|
$machine->systemctl("list-jobs --no-pager"); // runs `systemctl list-jobs --no-pager`
|
||||||
|
$machine->systemctl("list-jobs --no-pager", "any-user"); // spawns a shell for `any-user` and runs `systemctl --user list-jobs --no-pager`
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To test user units declared by <literal>systemd.user.services</literal> the optional <literal>$user</literal>
|
||||||
|
argument can be used:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
$machine->start;
|
||||||
|
$machine->waitForX;
|
||||||
|
$machine->waitForUnit("xautolock.service", "x-session-user");
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
This applies to <literal>systemctl</literal>, <literal>getUnitInfo</literal>,
|
||||||
|
<literal>waitForUnit</literal>, <literal>startJob</literal>
|
||||||
|
and <literal>stopJob</literal>.
|
||||||
|
</para>
|
||||||
|
|
||||||
</section>
|
</section>
|
@ -1,48 +0,0 @@
|
|||||||
<section xmlns="http://docbook.org/ns/docbook"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
||||||
version="5.0"
|
|
||||||
xml:id="sec-uefi-installation">
|
|
||||||
|
|
||||||
<title>UEFI Installation</title>
|
|
||||||
|
|
||||||
<para>NixOS can also be installed on UEFI systems. The procedure
|
|
||||||
is by and large the same as a BIOS installation, with the following
|
|
||||||
changes:
|
|
||||||
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>You should boot the live CD in UEFI mode (consult your
|
|
||||||
specific hardware's documentation for instructions). You may find
|
|
||||||
the <link
|
|
||||||
xlink:href="http://www.rodsbooks.com/refind">rEFInd
|
|
||||||
boot manager</link> useful.</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>Instead of <command>fdisk</command>, you should use
|
|
||||||
<command>gdisk</command> to partition your disks. You will need to
|
|
||||||
have a separate partition for <filename>/boot</filename> with
|
|
||||||
partition code EF00, and it should be formatted as a
|
|
||||||
<literal>vfat</literal> filesystem.</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>Instead of <option>boot.loader.grub.device</option>,
|
|
||||||
you must set <option>boot.loader.systemd-boot.enable</option> to
|
|
||||||
<literal>true</literal>. <command>nixos-generate-config</command>
|
|
||||||
should do this automatically for new configurations when booted in
|
|
||||||
UEFI mode.</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>After having mounted your installation partition to
|
|
||||||
<code>/mnt</code>, you must mount the <code>boot</code> partition
|
|
||||||
to <code>/mnt/boot</code>.</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>You may want to look at the options starting with
|
|
||||||
<option>boot.loader.efi</option> and <option>boot.loader.systemd-boot</option>
|
|
||||||
as well.</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
</section>
|
|
@ -11,9 +11,23 @@ a USB stick. You can use the <command>dd</command> utility to write the image:
|
|||||||
<command>dd if=<replaceable>path-to-image</replaceable>
|
<command>dd if=<replaceable>path-to-image</replaceable>
|
||||||
of=<replaceable>/dev/sdb</replaceable></command>. Be careful about specifying the
|
of=<replaceable>/dev/sdb</replaceable></command>. Be careful about specifying the
|
||||||
correct drive; you can use the <command>lsblk</command> command to get a list of
|
correct drive; you can use the <command>lsblk</command> command to get a list of
|
||||||
block devices. If you're on macOS you can run <command>diskutil list</command>
|
block devices.</para>
|
||||||
to see the list of devices; the device you'll use for the USB must be ejected
|
|
||||||
before writing the image.</para>
|
<para>On macOS:
|
||||||
|
<programlisting>
|
||||||
|
$ diskutil list
|
||||||
|
[..]
|
||||||
|
/dev/diskN (external, physical):
|
||||||
|
#: TYPE NAME SIZE IDENTIFIER
|
||||||
|
[..]
|
||||||
|
$ diskutil unmountDisk diskN
|
||||||
|
Unmount of all volumes on diskN was successful
|
||||||
|
$ sudo dd bs=1m if=nix.iso of=/dev/rdiskN
|
||||||
|
</programlisting>
|
||||||
|
Using the 'raw' <command>rdiskN</command> device instead of <command>diskN</command>
|
||||||
|
completes in minutes instead of hours. After <command>dd</command> completes, a GUI
|
||||||
|
dialog "The disk you inserted was not readable by this computer" will pop up, which
|
||||||
|
can be ignored.</para>
|
||||||
|
|
||||||
<para>The <command>dd</command> utility will write the image verbatim to the drive,
|
<para>The <command>dd</command> utility will write the image verbatim to the drive,
|
||||||
making it the recommended option for both UEFI and non-UEFI installations. For
|
making it the recommended option for both UEFI and non-UEFI installations. For
|
||||||
@ -31,7 +45,7 @@ ISO, copy its contents verbatim to your drive, then either:
|
|||||||
<para>Edit <filename>loader/entries/nixos-livecd.conf</filename> on the drive
|
<para>Edit <filename>loader/entries/nixos-livecd.conf</filename> on the drive
|
||||||
and change the <literal>root=</literal> field in the <literal>options</literal>
|
and change the <literal>root=</literal> field in the <literal>options</literal>
|
||||||
line to point to your drive (see the documentation on <literal>root=</literal>
|
line to point to your drive (see the documentation on <literal>root=</literal>
|
||||||
in <link xlink:href="https://www.kernel.org/doc/Documentation/kernel-parameters.txt">
|
in <link xlink:href="https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt">
|
||||||
the kernel documentation</link> for more details).</para>
|
the kernel documentation</link> for more details).</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -6,9 +6,18 @@
|
|||||||
|
|
||||||
<title>Installing NixOS</title>
|
<title>Installing NixOS</title>
|
||||||
|
|
||||||
|
<para>NixOS can be installed on BIOS or UEFI systems. The procedure
|
||||||
|
for a UEFI installation is by and large the same as a BIOS installation. The differences are mentioned in the steps that follow.</para>
|
||||||
|
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
|
|
||||||
<listitem><para>Boot from the CD.</para></listitem>
|
<listitem><para>Boot from the CD.</para>
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term>UEFI systems</term>
|
||||||
|
<listitem><para>You should boot the live CD in UEFI mode
|
||||||
|
(consult your specific hardware's documentation for instructions).
|
||||||
|
You may find the <link xlink:href="http://www.rodsbooks.com/refind">rEFInd boot
|
||||||
|
manager</link> useful.</para></listitem></varlistentry></variablelist></listitem>
|
||||||
|
|
||||||
<listitem><para>The CD contains a basic NixOS installation. (It
|
<listitem><para>The CD contains a basic NixOS installation. (It
|
||||||
also contains Memtest86+, useful if you want to test new hardware).
|
also contains Memtest86+, useful if you want to test new hardware).
|
||||||
@ -16,7 +25,8 @@
|
|||||||
hardware.</para></listitem>
|
hardware.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>The NixOS manual is available on virtual console 8
|
<listitem><para>The NixOS manual is available on virtual console 8
|
||||||
(press Alt+F8 to access).</para></listitem>
|
(press Alt+F8 to access) or by running <command>nixos-help</command>.
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
<listitem><para>You get logged in as <literal>root</literal>
|
<listitem><para>You get logged in as <literal>root</literal>
|
||||||
(with empty password).</para></listitem>
|
(with empty password).</para></listitem>
|
||||||
@ -49,7 +59,31 @@
|
|||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
||||||
<listitem><para>For partitioning:
|
<listitem><para>For partitioning:
|
||||||
<command>fdisk</command>.</para></listitem>
|
<command>fdisk</command>.
|
||||||
|
<screen>
|
||||||
|
# fdisk /dev/sda # <lineannotation>(or whatever device you want to install on)</lineannotation>
|
||||||
|
-- for UEFI systems only
|
||||||
|
> n # <lineannotation>(create a new partition for /boot)</lineannotation>
|
||||||
|
> 3 # <lineannotation>(make it a partition number 3)</lineannotation>
|
||||||
|
> # <lineannotation>(press enter to accept the default)</lineannotation>
|
||||||
|
> +512M # <lineannotation>(the size of the UEFI boot partition)</lineannotation>
|
||||||
|
> t # <lineannotation>(change the partition type ...)</lineannotation>
|
||||||
|
> 3 # <lineannotation>(... of the boot partition ...)</lineannotation>
|
||||||
|
> 1 # <lineannotation>(... to 'UEFI System')</lineannotation>
|
||||||
|
-- for BIOS or UEFI systems
|
||||||
|
> n # <lineannotation>(create a new partition for /swap)</lineannotation>
|
||||||
|
> 2 # <lineannotation>(make it a partition number 2)</lineannotation>
|
||||||
|
> # <lineannotation>(press enter to accept the default)</lineannotation>
|
||||||
|
> +8G # <lineannotation>(the size of the swap partition, set to whatever you like)</lineannotation>
|
||||||
|
> n # <lineannotation>(create a new partition for /)</lineannotation>
|
||||||
|
> 1 # <lineannotation>(make it a partition number 1)</lineannotation>
|
||||||
|
> # <lineannotation>(press enter to accept the default)</lineannotation>
|
||||||
|
> # <lineannotation>(press enter to accept the default and use the rest of the remaining space)</lineannotation>
|
||||||
|
> a # <lineannotation>(make the partition bootable)</lineannotation>
|
||||||
|
> x # <lineannotation>(enter expert mode)</lineannotation>
|
||||||
|
> f # <lineannotation>(fix up the partition ordering)</lineannotation>
|
||||||
|
> r # <lineannotation>(exit expert mode)</lineannotation>
|
||||||
|
> w # <lineannotation>(write the partition table to disk and exit)</lineannotation></screen></para></listitem>
|
||||||
|
|
||||||
<listitem><para>For initialising Ext4 partitions:
|
<listitem><para>For initialising Ext4 partitions:
|
||||||
<command>mkfs.ext4</command>. It is recommended that you assign a
|
<command>mkfs.ext4</command>. It is recommended that you assign a
|
||||||
@ -66,7 +100,25 @@
|
|||||||
<listitem><para>For creating swap partitions:
|
<listitem><para>For creating swap partitions:
|
||||||
<command>mkswap</command>. Again it’s recommended to assign a
|
<command>mkswap</command>. Again it’s recommended to assign a
|
||||||
label to the swap partition: <option>-L
|
label to the swap partition: <option>-L
|
||||||
<replaceable>label</replaceable></option>.</para></listitem>
|
<replaceable>label</replaceable></option>. For example:
|
||||||
|
|
||||||
|
<screen>
|
||||||
|
# mkswap -L swap /dev/sda2</screen>
|
||||||
|
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term>UEFI systems</term>
|
||||||
|
<listitem><para>For creating boot partitions:
|
||||||
|
<command>mkfs.fat</command>. Again it’s recommended to assign a
|
||||||
|
label to the boot partition: <option>-L
|
||||||
|
<replaceable>label</replaceable></option>. For example:
|
||||||
|
|
||||||
|
<screen>
|
||||||
|
# mkfs.fat -F 32 -L boot /dev/sda3</screen>
|
||||||
|
|
||||||
|
</para></listitem></varlistentry></variablelist></listitem>
|
||||||
|
|
||||||
<listitem><para>For creating LVM volumes, the LVM commands, e.g.,
|
<listitem><para>For creating LVM volumes, the LVM commands, e.g.,
|
||||||
|
|
||||||
@ -94,11 +146,27 @@
|
|||||||
|
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term>UEFI systems</term>
|
||||||
|
<listitem><para>Mount the boot file system on <filename>/mnt/boot</filename>, e.g.
|
||||||
|
|
||||||
|
<screen>
|
||||||
|
# mount /dev/disk/by-label/boot /mnt/boot
|
||||||
|
</screen>
|
||||||
|
|
||||||
|
</para></listitem></varlistentry></variablelist></listitem>
|
||||||
|
|
||||||
<listitem><para>If your machine has a limited amount of memory, you
|
<listitem><para>If your machine has a limited amount of memory, you
|
||||||
may want to activate swap devices now (<command>swapon
|
may want to activate swap devices now (<command>swapon
|
||||||
<replaceable>device</replaceable></command>). The installer (or
|
<replaceable>device</replaceable></command>). The installer (or
|
||||||
rather, the build actions that it may spawn) may need quite a bit of
|
rather, the build actions that it may spawn) may need quite a bit of
|
||||||
RAM, depending on your configuration.</para></listitem>
|
RAM, depending on your configuration.
|
||||||
|
|
||||||
|
<screen>
|
||||||
|
# swapon /dev/sda2</screen>
|
||||||
|
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
||||||
@ -134,10 +202,30 @@
|
|||||||
install Emacs by running <literal>nix-env -i
|
install Emacs by running <literal>nix-env -i
|
||||||
emacs</literal>.</para>
|
emacs</literal>.</para>
|
||||||
|
|
||||||
<para>You <emphasis>must</emphasis> set the option
|
<variablelist>
|
||||||
|
|
||||||
|
<varlistentry><term>BIOS systems</term>
|
||||||
|
<listitem><para>You <emphasis>must</emphasis> set the option
|
||||||
<option>boot.loader.grub.device</option> to specify on which disk
|
<option>boot.loader.grub.device</option> to specify on which disk
|
||||||
the GRUB boot loader is to be installed. Without it, NixOS cannot
|
the GRUB boot loader is to be installed. Without it, NixOS cannot
|
||||||
boot.</para>
|
boot.</para></listitem></varlistentry>
|
||||||
|
|
||||||
|
<varlistentry><term>UEFI systems</term>
|
||||||
|
<listitem><para>You <emphasis>must</emphasis> set the option
|
||||||
|
<option>boot.loader.systemd-boot.enable</option> to <literal>true</literal>.
|
||||||
|
<command>nixos-generate-config</command> should do this automatically for new
|
||||||
|
configurations when booted in
|
||||||
|
UEFI mode.</para>
|
||||||
|
<para>You may want to look at the options starting with
|
||||||
|
<option>boot.loader.efi</option> and <option>boot.loader.systemd-boot</option>
|
||||||
|
as well.</para></listitem></varlistentry>
|
||||||
|
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
<para>If there are other operating systems running on the machine before
|
||||||
|
installing NixOS, the
|
||||||
|
<option>boot.loader.grub.useOSProber</option> option can be set to
|
||||||
|
<literal>true</literal> to automatically add them to the grub menu.</para>
|
||||||
|
|
||||||
<para>Another critical option is <option>fileSystems</option>,
|
<para>Another critical option is <option>fileSystems</option>,
|
||||||
specifying the file systems that need to be mounted by NixOS.
|
specifying the file systems that need to be mounted by NixOS.
|
||||||
@ -241,10 +329,34 @@ drive (here <filename>/dev/sda</filename>). <xref linkend="ex-config"
|
|||||||
<example xml:id='ex-install-sequence'><title>Commands for Installing NixOS on <filename>/dev/sda</filename></title>
|
<example xml:id='ex-install-sequence'><title>Commands for Installing NixOS on <filename>/dev/sda</filename></title>
|
||||||
<screen>
|
<screen>
|
||||||
# fdisk /dev/sda # <lineannotation>(or whatever device you want to install on)</lineannotation>
|
# fdisk /dev/sda # <lineannotation>(or whatever device you want to install on)</lineannotation>
|
||||||
|
-- for UEFI systems only
|
||||||
|
> n # <lineannotation>(create a new partition for /boot)</lineannotation>
|
||||||
|
> 3 # <lineannotation>(make it a partition number 3)</lineannotation>
|
||||||
|
> # <lineannotation>(press enter to accept the default)</lineannotation>
|
||||||
|
> +512M # <lineannotation>(the size of the UEFI boot partition)</lineannotation>
|
||||||
|
> t # <lineannotation>(change the partition type ...)</lineannotation>
|
||||||
|
> 3 # <lineannotation>(... of the boot partition ...)</lineannotation>
|
||||||
|
> 1 # <lineannotation>(... to 'UEFI System')</lineannotation>
|
||||||
|
-- for BIOS or UEFI systems
|
||||||
|
> n # <lineannotation>(create a new partition for /swap)</lineannotation>
|
||||||
|
> 2 # <lineannotation>(make it a partition number 2)</lineannotation>
|
||||||
|
> # <lineannotation>(press enter to accept the default)</lineannotation>
|
||||||
|
> +8G # <lineannotation>(the size of the swap partition)</lineannotation>
|
||||||
|
> n # <lineannotation>(create a new partition for /)</lineannotation>
|
||||||
|
> 1 # <lineannotation>(make it a partition number 1)</lineannotation>
|
||||||
|
> # <lineannotation>(press enter to accept the default)</lineannotation>
|
||||||
|
> # <lineannotation>(press enter to accept the default and use the rest of the remaining space)</lineannotation>
|
||||||
|
> a # <lineannotation>(make the partition bootable)</lineannotation>
|
||||||
|
> x # <lineannotation>(enter expert mode)</lineannotation>
|
||||||
|
> f # <lineannotation>(fix up the partition ordering)</lineannotation>
|
||||||
|
> r # <lineannotation>(exit expert mode)</lineannotation>
|
||||||
|
> w # <lineannotation>(write the partition table to disk and exit)</lineannotation>
|
||||||
# mkfs.ext4 -L nixos /dev/sda1
|
# mkfs.ext4 -L nixos /dev/sda1
|
||||||
# mkswap -L swap /dev/sda2
|
# mkswap -L swap /dev/sda2
|
||||||
# swapon /dev/sda2
|
# swapon /dev/sda2
|
||||||
|
# mkfs.fat -F 32 -L boot /dev/sda3 # <lineannotation>(for UEFI systems only)</lineannotation>
|
||||||
# mount /dev/disk/by-label/nixos /mnt
|
# mount /dev/disk/by-label/nixos /mnt
|
||||||
|
# mount /dev/disk/by-label/boot /mnt/boot # <lineannotation>(for UEFI systems only)</lineannotation>
|
||||||
# nixos-generate-config --root /mnt
|
# nixos-generate-config --root /mnt
|
||||||
# nano /mnt/etc/nixos/configuration.nix
|
# nano /mnt/etc/nixos/configuration.nix
|
||||||
# nixos-install
|
# nixos-install
|
||||||
@ -261,7 +373,8 @@ drive (here <filename>/dev/sda</filename>). <xref linkend="ex-config"
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.grub.device = "/dev/sda";
|
boot.loader.grub.device = "/dev/sda"; # <lineannotation>(for BIOS systems only)</lineannotation>
|
||||||
|
boot.loader.systemd-boot.enable = true; # <lineannotation>(for UEFI systems only)</lineannotation>
|
||||||
|
|
||||||
# Note: setting fileSystems is generally not
|
# Note: setting fileSystems is generally not
|
||||||
# necessary, since nixos-generate-config figures them out
|
# necessary, since nixos-generate-config figures them out
|
||||||
@ -273,7 +386,6 @@ drive (here <filename>/dev/sda</filename>). <xref linkend="ex-config"
|
|||||||
}</screen>
|
}</screen>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<xi:include href="installing-uefi.xml" />
|
|
||||||
<xi:include href="installing-usb.xml" />
|
<xi:include href="installing-usb.xml" />
|
||||||
<xi:include href="installing-pxe.xml" />
|
<xi:include href="installing-pxe.xml" />
|
||||||
<xi:include href="installing-virtualbox-guest.xml" />
|
<xi:include href="installing-virtualbox-guest.xml" />
|
||||||
|
@ -12,11 +12,10 @@ download page</link>. There are a number of installation options. If
|
|||||||
you happen to have an optical drive and a spare CD, burning the
|
you happen to have an optical drive and a spare CD, burning the
|
||||||
image to CD and booting from that is probably the easiest option.
|
image to CD and booting from that is probably the easiest option.
|
||||||
Most people will need to prepare a USB stick to boot from.
|
Most people will need to prepare a USB stick to boot from.
|
||||||
Unetbootin is recommended and the process is described in brief below.
|
<xref linkend="sec-booting-from-usb"/> describes the preferred method
|
||||||
Note that systems which use UEFI require some additional manual steps.
|
to prepare a USB stick.
|
||||||
If you run into difficulty a number of alternative methods are presented
|
A number of alternative methods are presented in the <link
|
||||||
in the <link
|
xlink:href="https://nixos.wiki/wiki/NixOS_Installation_Guide#Making_the_installation_media">NixOS
|
||||||
xlink:href="https://nixos.org/wiki/Installing_NixOS_from_a_USB_stick">NixOS
|
|
||||||
Wiki</link>.</para>
|
Wiki</link>.</para>
|
||||||
|
|
||||||
<para>As an alternative to installing NixOS yourself, you can get a
|
<para>As an alternative to installing NixOS yourself, you can get a
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
<para>This section lists the release notes for each stable version of NixOS
|
<para>This section lists the release notes for each stable version of NixOS
|
||||||
and current unstable revision.</para>
|
and current unstable revision.</para>
|
||||||
|
|
||||||
|
<xi:include href="rl-1803.xml" />
|
||||||
<xi:include href="rl-1709.xml" />
|
<xi:include href="rl-1709.xml" />
|
||||||
<xi:include href="rl-1703.xml" />
|
<xi:include href="rl-1703.xml" />
|
||||||
<xi:include href="rl-1609.xml" />
|
<xi:include href="rl-1609.xml" />
|
||||||
|
@ -13,7 +13,7 @@ the following highlights:
|
|||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
||||||
<listitem><para>Installation on UEFI systems is now supported. See
|
<listitem><para>Installation on UEFI systems is now supported. See
|
||||||
<xref linkend="sec-uefi-installation"/> for
|
<xref linkend="sec-installation"/> for
|
||||||
details.</para></listitem>
|
details.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Systemd has been updated to version 212, which has
|
<listitem><para>Systemd has been updated to version 212, which has
|
||||||
|
@ -6,13 +6,22 @@
|
|||||||
|
|
||||||
<title>Release 17.09 (“Hummingbird”, 2017/09/??)</title>
|
<title>Release 17.09 (“Hummingbird”, 2017/09/??)</title>
|
||||||
|
|
||||||
|
<section xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
|
version="5.0"
|
||||||
|
xml:id="sec-release-17.09-highlights">
|
||||||
|
|
||||||
|
<title>Highlights</title>
|
||||||
|
|
||||||
<para>In addition to numerous new and upgraded packages, this release
|
<para>In addition to numerous new and upgraded packages, this release
|
||||||
has the following highlights: </para>
|
has the following highlights: </para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The GNOME version is now 3.24.
|
The GNOME version is now 3.24. KDE Plasma was upgraded to 5.10,
|
||||||
|
KDE Applications to 17.08.1 and KDE Frameworks to 5.37.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -45,16 +54,130 @@ has the following highlights: </para>
|
|||||||
even though <literal>HDMI-0</literal> is the first head in the list.
|
even though <literal>HDMI-0</literal> is the first head in the list.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The handling of SSL in the <literal>services.nginx</literal> module has
|
||||||
|
been cleaned up, renaming the misnamed <literal>enableSSL</literal> to
|
||||||
|
<literal>onlySSL</literal> which reflects its original intention. This
|
||||||
|
is not to be used with the already existing <literal>forceSSL</literal>
|
||||||
|
which creates a second non-SSL virtual host redirecting to the SSL
|
||||||
|
virtual host. This by chance had worked earlier due to specific
|
||||||
|
implementation details. In case you had specified both please remove
|
||||||
|
the <literal>enableSSL</literal> option to keep the previous behaviour.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Another <literal>addSSL</literal> option has been introduced to configure
|
||||||
|
both a non-SSL virtual host and an SSL virtual host with the same
|
||||||
|
configuration.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Options to configure <literal>resolver</literal> options and
|
||||||
|
<literal>upstream</literal> blocks have been introduced. See their information
|
||||||
|
for further details.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The <literal>port</literal> option has been replaced by a more generic
|
||||||
|
<literal>listen</literal> option which makes it possible to specify
|
||||||
|
multiple addresses, ports and SSL configs dependant on the new SSL
|
||||||
|
handling mentioned above.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<section xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
|
version="5.0"
|
||||||
|
xml:id="sec-release-17.09-new-services">
|
||||||
|
|
||||||
|
<title>New Services</title>
|
||||||
|
|
||||||
<para>The following new services were added since the last release:</para>
|
<para>The following new services were added since the last release:</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem><para><literal>config/fonts/fontconfig-penultimate.nix</literal></para></listitem>
|
||||||
<para></para>
|
<listitem><para><literal>config/fonts/fontconfig-ultimate.nix</literal></para></listitem>
|
||||||
</listitem>
|
<listitem><para><literal>config/terminfo.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>hardware/sensor/iio.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>hardware/nitrokey.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>hardware/raid/hpsa.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>programs/browserpass.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>programs/gnupg.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>programs/qt5ct.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>programs/slock.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>programs/thefuck.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>security/auditd.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>security/lock-kernel-modules.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>service-managers/docker.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>service-managers/trivial.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/admin/salt/master.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/admin/salt/minion.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/audio/slimserver.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/cluster/kubernetes/default.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/cluster/kubernetes/dns.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/cluster/kubernetes/dashboard.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/continuous-integration/hail.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/databases/clickhouse.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/databases/postage.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/desktops/gnome3/gnome-disks.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/desktops/gnome3/gpaste.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/logging/SystemdJournal2Gelf.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/logging/heartbeat.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/logging/journalwatch.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/logging/syslogd.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/mail/mailhog.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/mail/nullmailer.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/misc/airsonic.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/misc/autorandr.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/misc/exhibitor.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/misc/fstrim.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/misc/gollum.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/misc/irkerd.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/misc/jackett.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/misc/radarr.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/misc/snapper.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/monitoring/osquery.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/monitoring/prometheus/collectd-exporter.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/monitoring/prometheus/fritzbox-exporter.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/network-filesystems/kbfs.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/networking/dnscache.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/networking/fireqos.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/networking/iwd.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/networking/keepalived/default.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/networking/keybase.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/networking/lldpd.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/networking/matterbridge.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/networking/squid.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/networking/tinydns.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/networking/xrdp.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/security/shibboleth-sp.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/security/sks.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/security/sshguard.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/security/torify.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/security/usbguard.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/security/vault.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/system/earlyoom.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/system/saslauthd.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/web-apps/nexus.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/web-apps/pgpkeyserver-lite.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/web-apps/piwik.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/web-servers/lighttpd/collectd.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/web-servers/minio.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/x11/display-managers/xpra.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>services/x11/xautolock.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>tasks/filesystems/bcachefs.nix</literal></para></listitem>
|
||||||
|
<listitem><para><literal>tasks/powertop.nix</literal></para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<section xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
|
version="5.0"
|
||||||
|
xml:id="sec-release-17.09-incompatibilities">
|
||||||
|
|
||||||
|
<title>Backward Incompatibilities</title>
|
||||||
|
|
||||||
<para>When upgrading from a previous release, please be aware of the
|
<para>When upgrading from a previous release, please be aware of the
|
||||||
following incompatible changes:</para>
|
following incompatible changes:</para>
|
||||||
@ -62,10 +185,97 @@ following incompatible changes:</para>
|
|||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<literal>aiccu</literal> package was removed. This is due to SixXS
|
<emphasis role="strong">
|
||||||
|
In an Qemu-based virtualization environment, the network interface
|
||||||
|
names changed from i.e. <literal>enp0s3</literal> to
|
||||||
|
<literal>ens3</literal>.
|
||||||
|
</emphasis>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This is due to a kernel configuration change. The new naming
|
||||||
|
is consistent with those of other Linux distributions with
|
||||||
|
systemd. See
|
||||||
|
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/29197">#29197</link>
|
||||||
|
for more information.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
A machine is affected if the <literal>virt-what</literal> tool
|
||||||
|
either returns <literal>qemu</literal> or
|
||||||
|
<literal>kvm</literal> <emphasis>and</emphasis> has
|
||||||
|
interface names used in any part of its NixOS configuration,
|
||||||
|
in particular if a static network configuration with
|
||||||
|
<literal>networking.interfaces</literal> is used.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Before rebooting affected machines, please ensure:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Change the interface names in your NixOS configuration.
|
||||||
|
The first interface will be called <literal>ens3</literal>,
|
||||||
|
the second one <literal>ens8</literal> and starting from there
|
||||||
|
incremented by 1.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
After changing the interface names, rebuild your system with
|
||||||
|
<literal>nixos-rebuild boot</literal> to activate the new
|
||||||
|
configuration after a reboot. If you switch to the new
|
||||||
|
configuration right away you might lose network connectivity!
|
||||||
|
If using <literal>nixops</literal>, deploy with
|
||||||
|
<literal>nixops deploy --force-reboot</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The following changes apply if the <literal>stateVersion</literal> is changed to 17.09 or higher.
|
||||||
|
For <literal>stateVersion = "17.03"</literal> or lower the old behavior is preserved.
|
||||||
|
</para>
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The <literal>postgres</literal> default version was changed from 9.5 to 9.6.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The <literal>postgres</literal> superuser name has changed from <literal>root</literal> to <literal>postgres</literal> to more closely follow what other Linux distributions are doing.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The <literal>postgres</literal> default <literal>dataDir</literal> has changed from <literal>/var/db/postgres</literal> to <literal>/var/lib/postgresql/$psqlSchema</literal> where $psqlSchema is 9.6 for example.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The <literal>mysql</literal> default <literal>dataDir</literal> has changed from <literal>/var/mysql</literal> to <literal>/var/lib/mysql</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Radicale's default package has changed from 1.x to 2.x. Instructions to migrate can be found <link xlink:href="http://radicale.org/1to2/"> here </link>. It is also possible to use the newer version by setting the <literal>package</literal> to <literal>radicale2</literal>, which is done automatically when <literal>stateVersion</literal> is 17.09 or higher. The <literal>extraArgs</literal> option has been added to allow passing the data migration arguments specified in the instructions; see the <filename xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/radicale.nix">radicale.nix</filename> NixOS test for an example migration.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The <literal>aiccu</literal> package was removed. This is due to SixXS
|
||||||
<link xlink:href="https://www.sixxs.net/main/"> sunsetting</link> its IPv6 tunnel.
|
<link xlink:href="https://www.sixxs.net/main/"> sunsetting</link> its IPv6 tunnel.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The <literal>fanctl</literal> package and <literal>fan</literal> module
|
||||||
|
have been removed due to the developers not upstreaming their iproute2
|
||||||
|
patches and lagging with compatibility to recent iproute2 versions.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Top-level <literal>idea</literal> package collection was renamed.
|
Top-level <literal>idea</literal> package collection was renamed.
|
||||||
@ -81,7 +291,7 @@ following incompatible changes:</para>
|
|||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The ipfs package now doesn't ignore the <literal>dataDir</literal> option anymore. If you've ever set this option to anything other than the default you'll have to either unset it (so the default gets used) or migrate the old data manually with
|
The <literal>ipfs</literal> service now doesn't ignore the <literal>dataDir</literal> option anymore. If you've ever set this option to anything other than the default you'll have to either unset it (so the default gets used) or migrate the old data manually with
|
||||||
<programlisting>
|
<programlisting>
|
||||||
dataDir=<valueOfDataDir>
|
dataDir=<valueOfDataDir>
|
||||||
mv /var/lib/ipfs/.ipfs/* $dataDir
|
mv /var/lib/ipfs/.ipfs/* $dataDir
|
||||||
@ -89,32 +299,11 @@ rmdir /var/lib/ipfs/.ipfs
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The following changes apply if the <literal>stateVersion</literal> is changed to 17.09 or higher.
|
|
||||||
For <literal>stateVersion = "17.03</literal> or lower the old behavior is preserved.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
The <literal>postgres</literal> default version was changed from 9.5 to 9.6.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
The <literal>postgres</literal> superuser name has changed from <literal>root</literal> to <literal>postgres</literal> to more closely follow what other Linux distributions are doing.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
The <literal>postgres</literal> default <literal>dataDir</literal> has changed from <literal>/var/db/postgres</literal> to <literal>/var/lib/postgresql/$psqlSchema</literal> where $psqlSchema is 9.6 for example.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
The <literal>mysql</literal> default <literal>dataDir</literal> has changed from <literal>/var/mysql</literal> to <literal>/var/lib/mysql</literal>.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Radicale's default package has changed from 1.x to 2.x. Instructions to migrate can be found <link xlink:href="http://radicale.org/1to2/"> here </link>. It is also possible to use the newer version by setting the <literal>package</literal> to <literal>radicale2</literal>, which is done automatically when <literal>stateVersion</literal> is 17.09 or higher.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The <literal>caddy</literal> service was previously using an extra
|
The <literal>caddy</literal> service was previously using an extra
|
||||||
<literal>.caddy</literal> in the data directory specified with the
|
<literal>.caddy</literal> directory in the data directory specified
|
||||||
<literal>dataDir</literal> option. The contents of the
|
with the <literal>dataDir</literal> option. The contents of the
|
||||||
<literal>.caddy</literal> directory are now expected to be in the
|
<literal>.caddy</literal> directory are now expected to be in the
|
||||||
<literal>dataDir</literal>.
|
<literal>dataDir</literal>.
|
||||||
</para>
|
</para>
|
||||||
@ -193,18 +382,114 @@ rmdir /var/lib/ipfs/.ipfs
|
|||||||
No complete replacement for grsecurity/PaX is available presently.
|
No complete replacement for grsecurity/PaX is available presently.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The <literal>gnupg</literal> package used to suffix its programs
|
<literal>services.mysql</literal> now has declarative
|
||||||
with <literal>2</literal>, like <command>gpg2</command> and
|
configuration of databases and users with the <literal>ensureDatabases</literal> and
|
||||||
<command>gpgv2</command>. This suffix has since been dropped,
|
<literal>ensureUsers</literal> options.
|
||||||
and the programs are now simply <command>gpg</command>,
|
</para>
|
||||||
<command>gpgv</command>, etc.
|
|
||||||
|
<para>
|
||||||
|
These options will never delete existing databases and users,
|
||||||
|
especially not when the value of the options are changed.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The MySQL users will be identified using
|
||||||
|
<link xlink:href="https://mariadb.com/kb/en/library/authentication-plugin-unix-socket/">
|
||||||
|
Unix socket authentication</link>. This authenticates the
|
||||||
|
Unix user with the same name only, and that without the need
|
||||||
|
for a password.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If you have previously created a MySQL <literal>root</literal>
|
||||||
|
user <emphasis>with a password</emphasis>, you will need to add
|
||||||
|
<literal>root</literal> user for unix socket authentication
|
||||||
|
before using the new options. This can be done by running the
|
||||||
|
following SQL script:
|
||||||
|
|
||||||
|
<programlisting language="sql">
|
||||||
|
CREATE USER 'root'@'%' IDENTIFIED BY '';
|
||||||
|
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
|
||||||
|
-- Optionally, delete the password-authenticated user:
|
||||||
|
-- DROP USER 'root'@'localhost';
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>services.mysqlBackup</literal> now works by default
|
||||||
|
without any user setup, including for users other than
|
||||||
|
<literal>mysql</literal>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
By default, the <literal>mysql</literal> user is no longer the
|
||||||
|
user which performs the backup. Instead a system account
|
||||||
|
<literal>mysqlbackup</literal> is used.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The <literal>mysqlBackup</literal> service is also now using
|
||||||
|
systemd timers instead of <literal>cron</literal>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Therefore, the <literal>services.mysqlBackup.period</literal>
|
||||||
|
option no longer exists, and has been replaced with
|
||||||
|
<literal>services.mysqlBackup.calendar</literal>, which is in
|
||||||
|
the format of <link
|
||||||
|
xlink:href="https://www.freedesktop.org/software/systemd/man/systemd.time.html#Calendar%20Events">systemd.time(7)</link>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If you expect to be sent an e-mail when the backup fails,
|
||||||
|
consider using a script which monitors the systemd journal for
|
||||||
|
errors. Regretfully, at present there is no built-in
|
||||||
|
functionality for this.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can check that backups still work by running
|
||||||
|
<command>systemctl start mysql-backup</command> then
|
||||||
|
<command>systemctl status mysql-backup</command>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Templated systemd services e.g <literal>container@name</literal> are
|
||||||
|
now handled currectly when switching to a new configuration, resulting
|
||||||
|
in them being reloaded.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Steam: the <literal>newStdcpp</literal> parameter
|
||||||
|
was removed and should not be needed anymore.</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Redis has been updated to version 4 which mandates a cluster
|
||||||
|
mass-restart, due to changes in the network handling, in order
|
||||||
|
to ensure compatibility with networks NATing traffic.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>Other notable improvements:</para>
|
</section>
|
||||||
|
<section xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
|
version="5.0"
|
||||||
|
xml:id="sec-release-17.09-notable-changes">
|
||||||
|
|
||||||
|
<title>Other Notable Changes</title>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
||||||
@ -249,13 +534,78 @@ rmdir /var/lib/ipfs/.ipfs
|
|||||||
Nixpkgs overlays may now be specified with a file as well as a directory. The
|
Nixpkgs overlays may now be specified with a file as well as a directory. The
|
||||||
value of <literal><nixpkgs-overlays></literal> may be a file, and
|
value of <literal><nixpkgs-overlays></literal> may be a file, and
|
||||||
<filename>~/.config/nixpkgs/overlays.nix</filename> can be used instead of the
|
<filename>~/.config/nixpkgs/overlays.nix</filename> can be used instead of the
|
||||||
<filename>~/.config/nixpkgs/overalys</filename> directory.
|
<filename>~/.config/nixpkgs/overlays</filename> directory.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
See the overlays chapter of the Nixpkgs manual for more details.
|
See the overlays chapter of the Nixpkgs manual for more details.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Definitions for <filename>/etc/hosts</filename> can now be specified
|
||||||
|
declaratively with <literal>networking.hosts</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Two new options have been added to the installer loader, in addition
|
||||||
|
to the default having changed. The kernel log verbosity has been lowered
|
||||||
|
to the upstream default for the default options, in order to not spam
|
||||||
|
the console when e.g. joining a network.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This therefore leads to adding a new <literal>debug</literal> option
|
||||||
|
to set the log level to the previous verbose mode, to make debugging
|
||||||
|
easier, but still accessible easily.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Additionally a <literal>copytoram</literal> option has been added,
|
||||||
|
which makes it possible to remove the install medium after booting.
|
||||||
|
This allows tethering from your phone after booting from it.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>services.gitlab-runner.configOptions</literal> has been added
|
||||||
|
to specify the configuration of gitlab-runners declaratively.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>services.jenkins.plugins</literal> has been added
|
||||||
|
to install plugins easily, this can be generated with jenkinsPlugins2nix.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>services.postfix.config</literal> has been added
|
||||||
|
to specify the main.cf with NixOS options. Additionally other options
|
||||||
|
have been added to the postfix module and has been improved further.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The GitLab package and module have been updated to the latest 10.0
|
||||||
|
release.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The <literal>systemd-boot</literal> boot loader now lists the NixOS
|
||||||
|
version, kernel version and build date of all bootable generations.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The dnscrypt-proxy service now defaults to using a random upstream resolver,
|
||||||
|
selected from the list of public non-logging resolvers with DNSSEC support.
|
||||||
|
Existing configurations can be migrated to this mode of operation by
|
||||||
|
omitting the <option>services.dnscrypt-proxy.resolverName</option> option
|
||||||
|
or setting it to <literal>"random"</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
</section>
|
||||||
|
@ -6,16 +6,49 @@
|
|||||||
|
|
||||||
<title>Release 18.03 (“Impala”, 2018/03/??)</title>
|
<title>Release 18.03 (“Impala”, 2018/03/??)</title>
|
||||||
|
|
||||||
|
<section xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
|
version="5.0"
|
||||||
|
xml:id="sec-release-18.03-highlights">
|
||||||
|
|
||||||
|
<title>Highlights</title>
|
||||||
|
|
||||||
<para>In addition to numerous new and upgraded packages, this release
|
<para>In addition to numerous new and upgraded packages, this release
|
||||||
has the following highlights: </para>
|
has the following highlights: </para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
MariaDB 10.2, updated from 10.1, is now the default MySQL implementation. While upgrading a few changes
|
||||||
|
have been made to the infrastructure involved:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>libmysql</literal> has been deprecated, please use <literal>mysql.connector-c</literal>
|
||||||
|
instead, a compatibility passthru has been added to the MySQL packages.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The <literal>mysql57</literal> package has a new <literal>static</literal> output containing
|
||||||
|
the static libraries including <literal>libmysqld.a</literal>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<section xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
|
version="5.0"
|
||||||
|
xml:id="sec-release-18.03-new-services">
|
||||||
|
|
||||||
|
<title>New Services</title>
|
||||||
|
|
||||||
<para>The following new services were added since the last release:</para>
|
<para>The following new services were added since the last release:</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
@ -24,23 +57,191 @@ has the following highlights: </para>
|
|||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<section xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
|
version="5.0"
|
||||||
|
xml:id="sec-release-18.03-incompatibilities">
|
||||||
|
|
||||||
|
<title>Backward Incompatibilities</title>
|
||||||
|
|
||||||
<para>When upgrading from a previous release, please be aware of the
|
<para>When upgrading from a previous release, please be aware of the
|
||||||
following incompatible changes:</para>
|
following incompatible changes:</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
Dollar signs in options under <option>services.postfix</option> are
|
||||||
|
passed verbatim to Postfix, which will interpret them as the beginning of
|
||||||
|
a parameter expression. This was already true for string-valued options
|
||||||
|
in the previous release, but not for list-valued options. If you need to
|
||||||
|
pass literal dollar signs through Postfix, double them.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
|
||||||
|
|
||||||
<para>Other notable improvements:</para>
|
|
||||||
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
The <literal>postage</literal> package (for web-based PostgreSQL
|
||||||
|
administration) has been renamed to <literal>pgmanage</literal>. The
|
||||||
|
corresponding module has also been renamed. To migrate please rename all
|
||||||
|
<option>services.postage</option> options to
|
||||||
|
<option>services.pgmanage</option>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<emphasis role="strong">
|
||||||
|
The OpenSSH service no longer enables support for DSA keys by default,
|
||||||
|
which could cause a system lock out. Update your keys or, unfavorably,
|
||||||
|
re-enable DSA support manually.
|
||||||
|
</emphasis>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
DSA support was
|
||||||
|
<link xlink:href="https://www.openssh.com/legacy.html">deprecated in OpenSSH 7.0</link>,
|
||||||
|
due to it being too weak. To re-enable support, add
|
||||||
|
<literal>PubkeyAcceptedKeyTypes +ssh-dss</literal> to the end of your
|
||||||
|
<option>services.openssh.extraConfig</option>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
After updating the keys to be stronger, anyone still on a pre-17.03
|
||||||
|
version is safe to jump to 17.03, as vetted
|
||||||
|
<link xlink:href="https://search.nix.gsc.io/?q=stateVersion">here</link>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>cc-wrapper</literal>has been split in two; there is now also a <literal>bintools-wrapper</literal>.
|
||||||
|
The most commonly used files in <filename>nix-support</filename> are now split between the two wrappers.
|
||||||
|
Some commonly used ones, like <filename>nix-support/dynamic-linker</filename>, are duplicated for backwards compatability, even though they rightly belong only in <literal>bintools-wrapper</literal>.
|
||||||
|
Other more obscure ones are just moved.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The propagation logic has been changed.
|
||||||
|
The new logic, along with new types of dependencies that go with, is thoroughly documented in the "Specifying dependencies" section of the "Standard Environment" chapter of the nixpkgs manual.
|
||||||
|
<!-- That's <xref linkend="ssec-stdenv-attributes"> were we to merge the manuals. -->
|
||||||
|
The old logic isn't but is easy to describe: dependencies were propagated as the same type of dependency no matter what.
|
||||||
|
In practice, that means that many <function>propagatedNativeBuildInputs</function> should instead be <function>propagatedBuildInputs</function>.
|
||||||
|
Thankfully, that was and is the least used type of dependency.
|
||||||
|
Also, it means that some <function>propagatedBuildInputs</function> should instead be <function>depsTargetTargetPropagated</function>.
|
||||||
|
Other types dependencies should be unaffected.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The <literal>memcached</literal> service no longer accept dynamic socket
|
||||||
|
paths via <option>services.memcached.socket</option>. Unix sockets can be
|
||||||
|
still enabled by <option>services.memcached.enableUnixSocket</option> and
|
||||||
|
will be accessible at <literal>/run/memcached/memcached.sock</literal>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
<section xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
|
version="5.0"
|
||||||
|
xml:id="sec-release-18.03-notable-changes">
|
||||||
|
|
||||||
|
<title>Other Notable Changes</title>
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
ZNC option <option>services.znc.mutable</option> now defaults to
|
||||||
|
<literal>true</literal>. That means that old configuration is not
|
||||||
|
overwritten by default when update to the znc options are made.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The option <option>networking.wireless.networks.<name>.auth</option>
|
||||||
|
has been added for wireless networks with WPA-Enterprise authentication.
|
||||||
|
There is also a new <option>extraConfig</option> option to directly
|
||||||
|
configure <literal>wpa_supplicant</literal> and <option>hidden</option>
|
||||||
|
to connect to hidden networks.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The option <option>services.xserver.desktopManager.default</option> is now <literal>none</literal> by default.
|
||||||
|
An assertion failure is thrown if WM's and DM's default are <literal>none</literal>.
|
||||||
|
To explicitly run a plain X session without and DM or WM, the newly introduced option <option>services.xserver.plainX</option>
|
||||||
|
must be set to true.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The option <option>services.logstash.listenAddress</option> is now <literal>127.0.0.1</literal> by default.
|
||||||
|
Previously the default behaviour was to listen on all interfaces.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>services.btrfs.autoScrub</literal> has been added, to
|
||||||
|
periodically check btrfs filesystems for data corruption.
|
||||||
|
If there's a correct copy available, it will automatically repair
|
||||||
|
corrupted blocks.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>displayManager.lightdm.greeters.gtk.clock-format.</literal>
|
||||||
|
has been added, the clock format string (as expected by
|
||||||
|
strftime, e.g. <literal>%H:%M</literal>) to use with the lightdm
|
||||||
|
gtk greeter panel.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
If set to null the default clock format is used.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>displayManager.lightdm.greeters.gtk.indicators</literal>
|
||||||
|
has been added, a list of allowed indicator modules to use with
|
||||||
|
the lightdm gtk greeter panel.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Built-in indicators include <literal>~a11y</literal>,
|
||||||
|
<literal>~language</literal>, <literal>~session</literal>,
|
||||||
|
<literal>~power</literal>, <literal>~clock</literal>,
|
||||||
|
<literal>~host</literal>, <literal>~spacer</literal>. Unity
|
||||||
|
indicators can be represented by short name
|
||||||
|
(e.g. <literal>sound</literal>, <literal>power</literal>),
|
||||||
|
service file name, or absolute path.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
If set to <literal>null</literal> the default indicators are
|
||||||
|
used.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
In order to have the previous default configuration add
|
||||||
|
<programlisting>
|
||||||
|
services.xserver.displayManager.lightdm.greeters.gtk.indicators = [
|
||||||
|
"~host" "~spacer"
|
||||||
|
"~clock" "~spacer"
|
||||||
|
"~session"
|
||||||
|
"~language"
|
||||||
|
"~a11y"
|
||||||
|
"~power"
|
||||||
|
];
|
||||||
|
</programlisting>
|
||||||
|
to your <literal>configuration.nix</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The NixOS test driver supports user services declared by <literal>systemd.user.services</literal>.
|
||||||
|
The methods <literal>waitForUnit</literal>, <literal>getUnitInfo</literal>, <literal>startJob</literal>
|
||||||
|
and <literal>stopJob</literal> provide an optional <literal>$user</literal> argument for that purpose.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
@ -33,19 +33,25 @@
|
|||||||
|
|
||||||
, name ? "nixos-disk-image"
|
, name ? "nixos-disk-image"
|
||||||
|
|
||||||
, format ? "raw"
|
, # Disk image format, one of qcow2, qcow2-compressed, vpc, raw.
|
||||||
|
format ? "raw"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let format' = format; in let
|
||||||
extensions = {
|
|
||||||
|
format = if (format' == "qcow2-compressed") then "qcow2" else format';
|
||||||
|
|
||||||
|
compress = optionalString (format' == "qcow2-compressed") "-c";
|
||||||
|
|
||||||
|
filename = "nixos." + {
|
||||||
qcow2 = "qcow2";
|
qcow2 = "qcow2";
|
||||||
vpc = "vhd";
|
vpc = "vhd";
|
||||||
raw = "img";
|
raw = "img";
|
||||||
};
|
}.${format};
|
||||||
|
|
||||||
nixpkgs = lib.cleanSource pkgs.path;
|
nixpkgs = cleanSource pkgs.path;
|
||||||
|
|
||||||
channelSources = pkgs.runCommand "nixos-${config.system.nixosVersion}" {} ''
|
channelSources = pkgs.runCommand "nixos-${config.system.nixosVersion}" {} ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
@ -73,14 +79,14 @@ let
|
|||||||
targets = map (x: x.target) contents;
|
targets = map (x: x.target) contents;
|
||||||
|
|
||||||
prepareImage = ''
|
prepareImage = ''
|
||||||
export PATH=${pkgs.lib.makeSearchPathOutput "bin" "bin" prepareImageInputs}
|
export PATH=${makeSearchPathOutput "bin" "bin" prepareImageInputs}
|
||||||
|
|
||||||
mkdir $out
|
mkdir $out
|
||||||
diskImage=nixos.raw
|
diskImage=nixos.raw
|
||||||
truncate -s ${toString diskSize}M $diskImage
|
truncate -s ${toString diskSize}M $diskImage
|
||||||
|
|
||||||
${if partitioned then ''
|
${if partitioned then ''
|
||||||
parted $diskImage -- mklabel msdos mkpart primary ext4 1M -1s
|
parted --script $diskImage -- mklabel msdos mkpart primary ext4 1M -1s
|
||||||
offset=$((2048*512))
|
offset=$((2048*512))
|
||||||
'' else ''
|
'' else ''
|
||||||
offset=0
|
offset=0
|
||||||
@ -123,8 +129,11 @@ let
|
|||||||
# TODO: Nix really likes to chown things it creates to its current user...
|
# TODO: Nix really likes to chown things it creates to its current user...
|
||||||
fakeroot nixos-prepare-root $root ${channelSources} ${config.system.build.toplevel} closure
|
fakeroot nixos-prepare-root $root ${channelSources} ${config.system.build.toplevel} closure
|
||||||
|
|
||||||
|
# fakeroot seems to always give the owner write permissions, which we do not want
|
||||||
|
find $root/nix/store -mindepth 1 -maxdepth 1 -type f -o -type d | xargs chmod -R a-w
|
||||||
|
|
||||||
echo "copying staging root to image..."
|
echo "copying staging root to image..."
|
||||||
cptofs ${pkgs.lib.optionalString partitioned "-P 1"} -t ${fsType} -i $diskImage $root/* /
|
cptofs ${optionalString partitioned "-P 1"} -t ${fsType} -i $diskImage $root/* /
|
||||||
'';
|
'';
|
||||||
in pkgs.vmTools.runInLinuxVM (
|
in pkgs.vmTools.runInLinuxVM (
|
||||||
pkgs.runCommand name
|
pkgs.runCommand name
|
||||||
@ -133,20 +142,17 @@ in pkgs.vmTools.runInLinuxVM (
|
|||||||
exportReferencesGraph = [ "closure" metaClosure ];
|
exportReferencesGraph = [ "closure" metaClosure ];
|
||||||
postVM = ''
|
postVM = ''
|
||||||
${if format == "raw" then ''
|
${if format == "raw" then ''
|
||||||
mv $diskImage $out/nixos.img
|
mv $diskImage $out/${filename}
|
||||||
diskImage=$out/nixos.img
|
|
||||||
'' else ''
|
'' else ''
|
||||||
${pkgs.qemu}/bin/qemu-img convert -f raw -O ${format} $diskImage $out/nixos.${extensions.${format}}
|
${pkgs.qemu}/bin/qemu-img convert -f raw -O ${format} ${compress} $diskImage $out/${filename}
|
||||||
diskImage=$out/nixos.${extensions.${format}}
|
|
||||||
''}
|
''}
|
||||||
|
diskImage=$out/${filename}
|
||||||
${postVM}
|
${postVM}
|
||||||
'';
|
'';
|
||||||
memSize = 1024;
|
memSize = 1024;
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
${if partitioned then ''
|
${if partitioned then ''
|
||||||
. /sys/class/block/vda1/uevent
|
|
||||||
mknod /dev/vda1 b $MAJOR $MINOR
|
|
||||||
rootDisk=/dev/vda1
|
rootDisk=/dev/vda1
|
||||||
'' else ''
|
'' else ''
|
||||||
rootDisk=/dev/vda
|
rootDisk=/dev/vda
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
pkgs.stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
name = "ext4-fs.img";
|
name = "ext4-fs.img";
|
||||||
|
|
||||||
buildInputs = with pkgs; [e2fsprogs libfaketime perl];
|
nativeBuildInputs = with pkgs; [e2fsprogs libfaketime perl];
|
||||||
|
|
||||||
# For obtaining the closure of `storePaths'.
|
# For obtaining the closure of `storePaths'.
|
||||||
exportReferencesGraph =
|
exportReferencesGraph =
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "squashfs.img";
|
name = "squashfs.img";
|
||||||
|
|
||||||
buildInputs = [perl squashfsTools];
|
nativeBuildInputs = [perl squashfsTools];
|
||||||
|
|
||||||
# For obtaining the closure of `storeContents'.
|
# For obtaining the closure of `storeContents'.
|
||||||
exportReferencesGraph =
|
exportReferencesGraph =
|
||||||
@ -19,6 +19,33 @@ stdenv.mkDerivation {
|
|||||||
# Add the closures of the top-level store objects.
|
# Add the closures of the top-level store objects.
|
||||||
storePaths=$(perl ${pathsFromGraph} closure-*)
|
storePaths=$(perl ${pathsFromGraph} closure-*)
|
||||||
|
|
||||||
|
# If a Hydra slave happens to have store paths with bad permissions/mtime,
|
||||||
|
# abort now so that they don't end up in ISO images in the channel.
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/32242
|
||||||
|
hasBadPaths=""
|
||||||
|
for path in $storePaths; do
|
||||||
|
if [ -h "$path" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
mtime=$(stat -c %Y "$path")
|
||||||
|
mode=$(stat -c %a "$path")
|
||||||
|
|
||||||
|
if [ "$mtime" != 1 ]; then
|
||||||
|
echo "Store path '$path' has an invalid mtime."
|
||||||
|
hasBadPaths=1
|
||||||
|
fi
|
||||||
|
if [ "$mode" != 444 ] && [ "$mode" != 555 ]; then
|
||||||
|
echo "Store path '$path' has invalid permissions ($mode)."
|
||||||
|
hasBadPaths=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$hasBadPaths" ]; then
|
||||||
|
echo "You have bad paths in your store, please fix them."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Also include a manifest of the closures in a format suitable
|
# Also include a manifest of the closures in a format suitable
|
||||||
# for nix-store --load-db.
|
# for nix-store --load-db.
|
||||||
printRegistration=1 perl ${pathsFromGraph} closure-* > nix-path-registration
|
printRegistration=1 perl ${pathsFromGraph} closure-* > nix-path-registration
|
||||||
|
@ -146,6 +146,7 @@ sub start {
|
|||||||
($self->{allowReboot} ? "" : "-no-reboot ") .
|
($self->{allowReboot} ? "" : "-no-reboot ") .
|
||||||
"-monitor unix:./monitor -chardev socket,id=shell,path=./shell " .
|
"-monitor unix:./monitor -chardev socket,id=shell,path=./shell " .
|
||||||
"-device virtio-serial -device virtconsole,chardev=shell " .
|
"-device virtio-serial -device virtconsole,chardev=shell " .
|
||||||
|
"-device virtio-rng-pci " .
|
||||||
($showGraphics ? "-serial stdio" : "-nographic") . " " . ($ENV{QEMU_OPTS} || "");
|
($showGraphics ? "-serial stdio" : "-nographic") . " " . ($ENV{QEMU_OPTS} || "");
|
||||||
chdir $self->{stateDir} or die;
|
chdir $self->{stateDir} or die;
|
||||||
exec $self->{startCommand};
|
exec $self->{startCommand};
|
||||||
@ -361,8 +362,8 @@ sub mustFail {
|
|||||||
|
|
||||||
|
|
||||||
sub getUnitInfo {
|
sub getUnitInfo {
|
||||||
my ($self, $unit) = @_;
|
my ($self, $unit, $user) = @_;
|
||||||
my ($status, $lines) = $self->execute("systemctl --no-pager show '$unit'");
|
my ($status, $lines) = $self->systemctl("--no-pager show \"$unit\"", $user);
|
||||||
return undef if $status != 0;
|
return undef if $status != 0;
|
||||||
my $info = {};
|
my $info = {};
|
||||||
foreach my $line (split '\n', $lines) {
|
foreach my $line (split '\n', $lines) {
|
||||||
@ -372,19 +373,40 @@ sub getUnitInfo {
|
|||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub systemctl {
|
||||||
|
my ($self, $q, $user) = @_;
|
||||||
|
if ($user) {
|
||||||
|
$q =~ s/'/\\'/g;
|
||||||
|
return $self->execute("su -l $user -c \$'XDG_RUNTIME_DIR=/run/user/`id -u` systemctl --user $q'");
|
||||||
|
}
|
||||||
|
|
||||||
|
return $self->execute("systemctl $q");
|
||||||
|
}
|
||||||
|
|
||||||
|
# Fail if the given systemd unit is not in the "active" state.
|
||||||
|
sub requireActiveUnit {
|
||||||
|
my ($self, $unit) = @_;
|
||||||
|
$self->nest("checking if unit ‘$unit’ has reached state 'active'", sub {
|
||||||
|
my $info = $self->getUnitInfo($unit);
|
||||||
|
my $state = $info->{ActiveState};
|
||||||
|
if ($state ne "active") {
|
||||||
|
die "Expected unit ‘$unit’ to to be in state 'active' but it is in state ‘$state’\n";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
# Wait for a systemd unit to reach the "active" state.
|
# Wait for a systemd unit to reach the "active" state.
|
||||||
sub waitForUnit {
|
sub waitForUnit {
|
||||||
my ($self, $unit) = @_;
|
my ($self, $unit, $user) = @_;
|
||||||
$self->nest("waiting for unit ‘$unit’", sub {
|
$self->nest("waiting for unit ‘$unit’", sub {
|
||||||
retry sub {
|
retry sub {
|
||||||
my $info = $self->getUnitInfo($unit);
|
my $info = $self->getUnitInfo($unit, $user);
|
||||||
my $state = $info->{ActiveState};
|
my $state = $info->{ActiveState};
|
||||||
die "unit ‘$unit’ reached state ‘$state’\n" if $state eq "failed";
|
die "unit ‘$unit’ reached state ‘$state’\n" if $state eq "failed";
|
||||||
if ($state eq "inactive") {
|
if ($state eq "inactive") {
|
||||||
# If there are no pending jobs, then assume this unit
|
# If there are no pending jobs, then assume this unit
|
||||||
# will never reach active state.
|
# will never reach active state.
|
||||||
my ($status, $jobs) = $self->execute("systemctl list-jobs --full 2>&1");
|
my ($status, $jobs) = $self->systemctl("list-jobs --full 2>&1", $user);
|
||||||
if ($jobs =~ /No jobs/) { # FIXME: fragile
|
if ($jobs =~ /No jobs/) { # FIXME: fragile
|
||||||
# Handle the case where the unit may have started
|
# Handle the case where the unit may have started
|
||||||
# between the previous getUnitInfo() and
|
# between the previous getUnitInfo() and
|
||||||
@ -418,14 +440,14 @@ sub waitForFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub startJob {
|
sub startJob {
|
||||||
my ($self, $jobName) = @_;
|
my ($self, $jobName, $user) = @_;
|
||||||
$self->execute("systemctl start $jobName");
|
$self->systemctl("start $jobName", $user);
|
||||||
# FIXME: check result
|
# FIXME: check result
|
||||||
}
|
}
|
||||||
|
|
||||||
sub stopJob {
|
sub stopJob {
|
||||||
my ($self, $jobName) = @_;
|
my ($self, $jobName, $user) = @_;
|
||||||
$self->execute("systemctl stop $jobName");
|
$self->systemctl("stop $jobName", $user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,8 +113,7 @@ rec {
|
|||||||
--add-flags "''${vms[*]}" \
|
--add-flags "''${vms[*]}" \
|
||||||
${lib.optionalString enableOCR
|
${lib.optionalString enableOCR
|
||||||
"--prefix PATH : '${ocrProg}/bin:${imagemagick}/bin'"} \
|
"--prefix PATH : '${ocrProg}/bin:${imagemagick}/bin'"} \
|
||||||
--run "testScript=\"\$(cat $out/test-script)\"" \
|
--run "export testScript=\"\$(cat $out/test-script)\"" \
|
||||||
--set testScript '$testScript' \
|
|
||||||
--set VLANS '${toString vlans}'
|
--set VLANS '${toString vlans}'
|
||||||
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
|
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
|
||||||
wrapProgram $out/bin/nixos-run-vms \
|
wrapProgram $out/bin/nixos-run-vms \
|
||||||
@ -149,6 +148,7 @@ rec {
|
|||||||
{ key = "run-in-machine";
|
{ key = "run-in-machine";
|
||||||
networking.hostName = "client";
|
networking.hostName = "client";
|
||||||
nix.readOnlyStore = false;
|
nix.readOnlyStore = false;
|
||||||
|
virtualisation.writableStore = false;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -77,7 +77,6 @@ let
|
|||||||
excludedOptions = [
|
excludedOptions = [
|
||||||
"boot.systemd.services"
|
"boot.systemd.services"
|
||||||
"systemd.services"
|
"systemd.services"
|
||||||
"environment.gnome3.packageSet"
|
|
||||||
"kde.extraPackages"
|
"kde.extraPackages"
|
||||||
];
|
];
|
||||||
excludeOptions = list:
|
excludeOptions = list:
|
||||||
|
@ -9,6 +9,12 @@ in {
|
|||||||
imports = [ ../../../modules/virtualisation/amazon-image.nix ];
|
imports = [ ../../../modules/virtualisation/amazon-image.nix ];
|
||||||
|
|
||||||
options.amazonImage = {
|
options.amazonImage = {
|
||||||
|
name = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "The name of the generated derivation";
|
||||||
|
default = "nixos-disk-image";
|
||||||
|
};
|
||||||
|
|
||||||
contents = mkOption {
|
contents = mkOption {
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
[ { source = pkgs.memtest86 + "/memtest.bin";
|
[ { source = pkgs.memtest86 + "/memtest.bin";
|
||||||
@ -38,7 +44,7 @@ in {
|
|||||||
|
|
||||||
config.system.build.amazonImage = import ../../../lib/make-disk-image.nix {
|
config.system.build.amazonImage = import ../../../lib/make-disk-image.nix {
|
||||||
inherit lib config;
|
inherit lib config;
|
||||||
inherit (cfg) contents format;
|
inherit (cfg) contents format name;
|
||||||
pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
|
pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
|
||||||
partitioned = config.ec2.hvm;
|
partitioned = config.ec2.hvm;
|
||||||
diskSize = cfg.sizeMB;
|
diskSize = cfg.sizeMB;
|
||||||
|
@ -17,8 +17,8 @@ mkdir -p $stateDir
|
|||||||
rm -f ec2-amis.nix
|
rm -f ec2-amis.nix
|
||||||
|
|
||||||
types="hvm"
|
types="hvm"
|
||||||
stores="ebs s3"
|
stores="ebs"
|
||||||
regions="eu-west-1 eu-west-2 eu-central-1 us-east-1 us-east-2 us-west-1 us-west-2 ca-central-1 ap-southeast-1 ap-southeast-2 ap-northeast-1 ap-northeast-2 sa-east-1 ap-south-1"
|
regions="eu-west-1 eu-west-2 eu-west-3 eu-central-1 us-east-1 us-east-2 us-west-1 us-west-2 ca-central-1 ap-southeast-1 ap-southeast-2 ap-northeast-1 ap-northeast-2 sa-east-1 ap-south-1"
|
||||||
|
|
||||||
for type in $types; do
|
for type in $types; do
|
||||||
link=$stateDir/$type
|
link=$stateDir/$type
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# nix-build '<nixpkgs/nixos>' -A config.system.build.novaImage --arg configuration "{ imports = [ ./nixos/maintainers/scripts/openstack/nova-image.nix ]; }"
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -30,14 +30,15 @@ with lib;
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
config = {
|
config = mkIf config.environment.enableDebugInfo {
|
||||||
|
|
||||||
# FIXME: currently disabled because /lib is already in
|
# FIXME: currently disabled because /lib is already in
|
||||||
# environment.pathsToLink, and we can't have both.
|
# environment.pathsToLink, and we can't have both.
|
||||||
#environment.pathsToLink = [ "/lib/debug/.build-id" ];
|
#environment.pathsToLink = [ "/lib/debug/.build-id" ];
|
||||||
|
|
||||||
environment.extraOutputsToInstall =
|
environment.extraOutputsToInstall = [ "debug" ];
|
||||||
optional config.environment.enableDebugInfo "debug";
|
|
||||||
|
environment.variables.NIX_DEBUG_INFO_DIRS = [ "/run/current-system/sw/lib/debug" ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -52,6 +52,8 @@ let
|
|||||||
</fontconfig>
|
</fontconfig>
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
localConf = pkgs.writeText "fc-local.conf" cfg.localConf;
|
||||||
|
|
||||||
# The configuration to be included in /etc/font/
|
# The configuration to be included in /etc/font/
|
||||||
penultimateConf = pkgs.runCommand "font-penultimate-conf" {} ''
|
penultimateConf = pkgs.runCommand "font-penultimate-conf" {} ''
|
||||||
support_folder=$out/etc/fonts/conf.d
|
support_folder=$out/etc/fonts/conf.d
|
||||||
@ -107,6 +109,12 @@ let
|
|||||||
$latest_folder/51-local.conf \
|
$latest_folder/51-local.conf \
|
||||||
--replace local.conf /etc/fonts/${latestVersion}/local.conf
|
--replace local.conf /etc/fonts/${latestVersion}/local.conf
|
||||||
|
|
||||||
|
# local.conf (indirect priority 51)
|
||||||
|
${optionalString (cfg.localConf != "") ''
|
||||||
|
ln -s ${localConf} $out/etc/fonts/local.conf
|
||||||
|
ln -s ${localConf} $out/etc/fonts/${latestVersion}/local.conf
|
||||||
|
''}
|
||||||
|
|
||||||
ln -s ${defaultFontsConf} $support_folder/52-default-fonts.conf
|
ln -s ${defaultFontsConf} $support_folder/52-default-fonts.conf
|
||||||
ln -s ${defaultFontsConf} $latest_folder/52-default-fonts.conf
|
ln -s ${defaultFontsConf} $latest_folder/52-default-fonts.conf
|
||||||
|
|
||||||
|
@ -1,206 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
cfg = config.krb5;
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
|
||||||
###### interface
|
|
||||||
|
|
||||||
options = {
|
|
||||||
|
|
||||||
krb5 = {
|
|
||||||
|
|
||||||
enable = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = "Whether to enable Kerberos V.";
|
|
||||||
};
|
|
||||||
|
|
||||||
defaultRealm = mkOption {
|
|
||||||
default = "ATENA.MIT.EDU";
|
|
||||||
description = "Default realm.";
|
|
||||||
};
|
|
||||||
|
|
||||||
domainRealm = mkOption {
|
|
||||||
default = "atena.mit.edu";
|
|
||||||
description = "Default domain realm.";
|
|
||||||
};
|
|
||||||
|
|
||||||
kdc = mkOption {
|
|
||||||
default = "kerberos.mit.edu";
|
|
||||||
description = "Key Distribution Center";
|
|
||||||
};
|
|
||||||
|
|
||||||
kerberosAdminServer = mkOption {
|
|
||||||
default = "kerberos.mit.edu";
|
|
||||||
description = "Kerberos Admin Server.";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
###### implementation
|
|
||||||
|
|
||||||
config = mkIf config.krb5.enable {
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.krb5Full ];
|
|
||||||
|
|
||||||
environment.etc."krb5.conf".text =
|
|
||||||
''
|
|
||||||
[libdefaults]
|
|
||||||
default_realm = ${cfg.defaultRealm}
|
|
||||||
encrypt = true
|
|
||||||
|
|
||||||
# The following krb5.conf variables are only for MIT Kerberos.
|
|
||||||
krb4_config = /etc/krb.conf
|
|
||||||
krb4_realms = /etc/krb.realms
|
|
||||||
kdc_timesync = 1
|
|
||||||
ccache_type = 4
|
|
||||||
forwardable = true
|
|
||||||
proxiable = true
|
|
||||||
|
|
||||||
# The following encryption type specification will be used by MIT Kerberos
|
|
||||||
# if uncommented. In general, the defaults in the MIT Kerberos code are
|
|
||||||
# correct and overriding these specifications only serves to disable new
|
|
||||||
# encryption types as they are added, creating interoperability problems.
|
|
||||||
|
|
||||||
# default_tgs_enctypes = aes256-cts arcfour-hmac-md5 des3-hmac-sha1 des-cbc-crc des-cbc-md5
|
|
||||||
# default_tkt_enctypes = aes256-cts arcfour-hmac-md5 des3-hmac-sha1 des-cbc-crc des-cbc-md5
|
|
||||||
# permitted_enctypes = aes256-cts arcfour-hmac-md5 des3-hmac-sha1 des-cbc-crc des-cbc-md5
|
|
||||||
|
|
||||||
# The following libdefaults parameters are only for Heimdal Kerberos.
|
|
||||||
v4_instance_resolve = false
|
|
||||||
v4_name_convert = {
|
|
||||||
host = {
|
|
||||||
rcmd = host
|
|
||||||
ftp = ftp
|
|
||||||
}
|
|
||||||
plain = {
|
|
||||||
something = something-else
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fcc-mit-ticketflags = true
|
|
||||||
|
|
||||||
[realms]
|
|
||||||
${cfg.defaultRealm} = {
|
|
||||||
kdc = ${cfg.kdc}
|
|
||||||
admin_server = ${cfg.kerberosAdminServer}
|
|
||||||
#kpasswd_server = ${cfg.kerberosAdminServer}
|
|
||||||
}
|
|
||||||
ATHENA.MIT.EDU = {
|
|
||||||
kdc = kerberos.mit.edu:88
|
|
||||||
kdc = kerberos-1.mit.edu:88
|
|
||||||
kdc = kerberos-2.mit.edu:88
|
|
||||||
admin_server = kerberos.mit.edu
|
|
||||||
default_domain = mit.edu
|
|
||||||
}
|
|
||||||
MEDIA-LAB.MIT.EDU = {
|
|
||||||
kdc = kerberos.media.mit.edu
|
|
||||||
admin_server = kerberos.media.mit.edu
|
|
||||||
}
|
|
||||||
ZONE.MIT.EDU = {
|
|
||||||
kdc = casio.mit.edu
|
|
||||||
kdc = seiko.mit.edu
|
|
||||||
admin_server = casio.mit.edu
|
|
||||||
}
|
|
||||||
MOOF.MIT.EDU = {
|
|
||||||
kdc = three-headed-dogcow.mit.edu:88
|
|
||||||
kdc = three-headed-dogcow-1.mit.edu:88
|
|
||||||
admin_server = three-headed-dogcow.mit.edu
|
|
||||||
}
|
|
||||||
CSAIL.MIT.EDU = {
|
|
||||||
kdc = kerberos-1.csail.mit.edu
|
|
||||||
kdc = kerberos-2.csail.mit.edu
|
|
||||||
admin_server = kerberos.csail.mit.edu
|
|
||||||
default_domain = csail.mit.edu
|
|
||||||
krb524_server = krb524.csail.mit.edu
|
|
||||||
}
|
|
||||||
IHTFP.ORG = {
|
|
||||||
kdc = kerberos.ihtfp.org
|
|
||||||
admin_server = kerberos.ihtfp.org
|
|
||||||
}
|
|
||||||
GNU.ORG = {
|
|
||||||
kdc = kerberos.gnu.org
|
|
||||||
kdc = kerberos-2.gnu.org
|
|
||||||
kdc = kerberos-3.gnu.org
|
|
||||||
admin_server = kerberos.gnu.org
|
|
||||||
}
|
|
||||||
1TS.ORG = {
|
|
||||||
kdc = kerberos.1ts.org
|
|
||||||
admin_server = kerberos.1ts.org
|
|
||||||
}
|
|
||||||
GRATUITOUS.ORG = {
|
|
||||||
kdc = kerberos.gratuitous.org
|
|
||||||
admin_server = kerberos.gratuitous.org
|
|
||||||
}
|
|
||||||
DOOMCOM.ORG = {
|
|
||||||
kdc = kerberos.doomcom.org
|
|
||||||
admin_server = kerberos.doomcom.org
|
|
||||||
}
|
|
||||||
ANDREW.CMU.EDU = {
|
|
||||||
kdc = vice28.fs.andrew.cmu.edu
|
|
||||||
kdc = vice2.fs.andrew.cmu.edu
|
|
||||||
kdc = vice11.fs.andrew.cmu.edu
|
|
||||||
kdc = vice12.fs.andrew.cmu.edu
|
|
||||||
admin_server = vice28.fs.andrew.cmu.edu
|
|
||||||
default_domain = andrew.cmu.edu
|
|
||||||
}
|
|
||||||
CS.CMU.EDU = {
|
|
||||||
kdc = kerberos.cs.cmu.edu
|
|
||||||
kdc = kerberos-2.srv.cs.cmu.edu
|
|
||||||
admin_server = kerberos.cs.cmu.edu
|
|
||||||
}
|
|
||||||
DEMENTIA.ORG = {
|
|
||||||
kdc = kerberos.dementia.org
|
|
||||||
kdc = kerberos2.dementia.org
|
|
||||||
admin_server = kerberos.dementia.org
|
|
||||||
}
|
|
||||||
stanford.edu = {
|
|
||||||
kdc = krb5auth1.stanford.edu
|
|
||||||
kdc = krb5auth2.stanford.edu
|
|
||||||
kdc = krb5auth3.stanford.edu
|
|
||||||
admin_server = krb5-admin.stanford.edu
|
|
||||||
default_domain = stanford.edu
|
|
||||||
}
|
|
||||||
|
|
||||||
[domain_realm]
|
|
||||||
.${cfg.domainRealm} = ${cfg.defaultRealm}
|
|
||||||
${cfg.domainRealm} = ${cfg.defaultRealm}
|
|
||||||
.mit.edu = ATHENA.MIT.EDU
|
|
||||||
mit.edu = ATHENA.MIT.EDU
|
|
||||||
.exchange.mit.edu = EXCHANGE.MIT.EDU
|
|
||||||
exchange.mit.edu = EXCHANGE.MIT.EDU
|
|
||||||
.media.mit.edu = MEDIA-LAB.MIT.EDU
|
|
||||||
media.mit.edu = MEDIA-LAB.MIT.EDU
|
|
||||||
.csail.mit.edu = CSAIL.MIT.EDU
|
|
||||||
csail.mit.edu = CSAIL.MIT.EDU
|
|
||||||
.whoi.edu = ATHENA.MIT.EDU
|
|
||||||
whoi.edu = ATHENA.MIT.EDU
|
|
||||||
.stanford.edu = stanford.edu
|
|
||||||
|
|
||||||
[logging]
|
|
||||||
kdc = SYSLOG:INFO:DAEMON
|
|
||||||
admin_server = SYSLOG:INFO:DAEMON
|
|
||||||
default = SYSLOG:INFO:DAEMON
|
|
||||||
krb4_convert = true
|
|
||||||
krb4_get_tickets = false
|
|
||||||
|
|
||||||
[appdefaults]
|
|
||||||
pam = {
|
|
||||||
debug = false
|
|
||||||
ticket_lifetime = 36000
|
|
||||||
renew_lifetime = 36000
|
|
||||||
max_timeout = 30
|
|
||||||
timeout_shift = 2
|
|
||||||
initial_timeout = 1
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
367
nixos/modules/config/krb5/default.nix
Normal file
367
nixos/modules/config/krb5/default.nix
Normal file
@ -0,0 +1,367 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.krb5;
|
||||||
|
|
||||||
|
# This is to provide support for old configuration options (as much as is
|
||||||
|
# reasonable). This can be removed after 18.03 was released.
|
||||||
|
defaultConfig = {
|
||||||
|
libdefaults = optionalAttrs (cfg.defaultRealm != null)
|
||||||
|
{ default_realm = cfg.defaultRealm; };
|
||||||
|
|
||||||
|
realms = optionalAttrs (lib.all (value: value != null) [
|
||||||
|
cfg.defaultRealm cfg.kdc cfg.kerberosAdminServer
|
||||||
|
]) {
|
||||||
|
"${cfg.defaultRealm}" = {
|
||||||
|
kdc = cfg.kdc;
|
||||||
|
admin_server = cfg.kerberosAdminServer;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
domain_realm = optionalAttrs (lib.all (value: value != null) [
|
||||||
|
cfg.domainRealm cfg.defaultRealm
|
||||||
|
]) {
|
||||||
|
".${cfg.domainRealm}" = cfg.defaultRealm;
|
||||||
|
"${cfg.domainRealm}" = cfg.defaultRealm;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mergedConfig = (recursiveUpdate defaultConfig {
|
||||||
|
inherit (config.krb5)
|
||||||
|
kerberos libdefaults realms domain_realm capaths appdefaults plugins
|
||||||
|
extraConfig config;
|
||||||
|
});
|
||||||
|
|
||||||
|
filterEmbeddedMetadata = value: if isAttrs value then
|
||||||
|
(filterAttrs
|
||||||
|
(attrName: attrValue: attrName != "_module" && attrValue != null)
|
||||||
|
value)
|
||||||
|
else value;
|
||||||
|
|
||||||
|
mkIndent = depth: concatStrings (builtins.genList (_: " ") (2 * depth));
|
||||||
|
|
||||||
|
mkRelation = name: value: "${name} = ${mkVal { inherit value; }}";
|
||||||
|
|
||||||
|
mkVal = { value, depth ? 0 }:
|
||||||
|
if (value == true) then "true"
|
||||||
|
else if (value == false) then "false"
|
||||||
|
else if (isInt value) then (toString value)
|
||||||
|
else if (isList value) then
|
||||||
|
concatMapStringsSep " " mkVal { inherit value depth; }
|
||||||
|
else if (isAttrs value) then
|
||||||
|
(concatStringsSep "\n${mkIndent (depth + 1)}"
|
||||||
|
([ "{" ] ++ (mapAttrsToList
|
||||||
|
(attrName: attrValue: let
|
||||||
|
mappedAttrValue = mkVal {
|
||||||
|
value = attrValue;
|
||||||
|
depth = depth + 1;
|
||||||
|
};
|
||||||
|
in "${attrName} = ${mappedAttrValue}")
|
||||||
|
value))) + "\n${mkIndent depth}}"
|
||||||
|
else value;
|
||||||
|
|
||||||
|
mkMappedAttrsOrString = value: concatMapStringsSep "\n"
|
||||||
|
(line: if builtins.stringLength line > 0
|
||||||
|
then "${mkIndent 1}${line}"
|
||||||
|
else line)
|
||||||
|
(splitString "\n"
|
||||||
|
(if isAttrs value then
|
||||||
|
concatStringsSep "\n"
|
||||||
|
(mapAttrsToList mkRelation value)
|
||||||
|
else value));
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
###### interface
|
||||||
|
|
||||||
|
options = {
|
||||||
|
krb5 = {
|
||||||
|
enable = mkEnableOption "Whether to enable Kerberos V.";
|
||||||
|
|
||||||
|
kerberos = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.krb5Full;
|
||||||
|
defaultText = "pkgs.krb5Full";
|
||||||
|
example = literalExample "pkgs.heimdalFull";
|
||||||
|
description = ''
|
||||||
|
The Kerberos implementation that will be present in
|
||||||
|
<literal>environment.systemPackages</literal> after enabling this
|
||||||
|
service.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
libdefaults = mkOption {
|
||||||
|
type = with types; either attrs lines;
|
||||||
|
default = {};
|
||||||
|
apply = attrs: filterEmbeddedMetadata attrs;
|
||||||
|
example = literalExample ''
|
||||||
|
{
|
||||||
|
default_realm = "ATHENA.MIT.EDU";
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Settings used by the Kerberos V5 library.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
realms = mkOption {
|
||||||
|
type = with types; either attrs lines;
|
||||||
|
default = {};
|
||||||
|
example = literalExample ''
|
||||||
|
{
|
||||||
|
"ATHENA.MIT.EDU" = {
|
||||||
|
admin_server = "athena.mit.edu";
|
||||||
|
kdc = "athena.mit.edu";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
apply = attrs: filterEmbeddedMetadata attrs;
|
||||||
|
description = "Realm-specific contact information and settings.";
|
||||||
|
};
|
||||||
|
|
||||||
|
domain_realm = mkOption {
|
||||||
|
type = with types; either attrs lines;
|
||||||
|
default = {};
|
||||||
|
example = literalExample ''
|
||||||
|
{
|
||||||
|
"example.com" = "EXAMPLE.COM";
|
||||||
|
".example.com" = "EXAMPLE.COM";
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
apply = attrs: filterEmbeddedMetadata attrs;
|
||||||
|
description = ''
|
||||||
|
Map of server hostnames to Kerberos realms.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
capaths = mkOption {
|
||||||
|
type = with types; either attrs lines;
|
||||||
|
default = {};
|
||||||
|
example = literalExample ''
|
||||||
|
{
|
||||||
|
"ATHENA.MIT.EDU" = {
|
||||||
|
"EXAMPLE.COM" = ".";
|
||||||
|
};
|
||||||
|
"EXAMPLE.COM" = {
|
||||||
|
"ATHENA.MIT.EDU" = ".";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
apply = attrs: filterEmbeddedMetadata attrs;
|
||||||
|
description = ''
|
||||||
|
Authentication paths for non-hierarchical cross-realm authentication.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
appdefaults = mkOption {
|
||||||
|
type = with types; either attrs lines;
|
||||||
|
default = {};
|
||||||
|
example = literalExample ''
|
||||||
|
{
|
||||||
|
pam = {
|
||||||
|
debug = false;
|
||||||
|
ticket_lifetime = 36000;
|
||||||
|
renew_lifetime = 36000;
|
||||||
|
max_timeout = 30;
|
||||||
|
timeout_shift = 2;
|
||||||
|
initial_timeout = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
apply = attrs: filterEmbeddedMetadata attrs;
|
||||||
|
description = ''
|
||||||
|
Settings used by some Kerberos V5 applications.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins = mkOption {
|
||||||
|
type = with types; either attrs lines;
|
||||||
|
default = {};
|
||||||
|
example = literalExample ''
|
||||||
|
{
|
||||||
|
ccselect = {
|
||||||
|
disable = "k5identity";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
apply = attrs: filterEmbeddedMetadata attrs;
|
||||||
|
description = ''
|
||||||
|
Controls plugin module registration.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = with types; nullOr lines;
|
||||||
|
default = null;
|
||||||
|
example = ''
|
||||||
|
[logging]
|
||||||
|
kdc = SYSLOG:NOTICE
|
||||||
|
admin_server = SYSLOG:NOTICE
|
||||||
|
default = SYSLOG:NOTICE
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
These lines go to the end of <literal>krb5.conf</literal> verbatim.
|
||||||
|
<literal>krb5.conf</literal> may include any of the relations that are
|
||||||
|
valid for <literal>kdc.conf</literal> (see <literal>man
|
||||||
|
kdc.conf</literal>), but it is not a recommended practice.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkOption {
|
||||||
|
type = with types; nullOr lines;
|
||||||
|
default = null;
|
||||||
|
example = ''
|
||||||
|
[libdefaults]
|
||||||
|
default_realm = EXAMPLE.COM
|
||||||
|
|
||||||
|
[realms]
|
||||||
|
EXAMPLE.COM = {
|
||||||
|
admin_server = kerberos.example.com
|
||||||
|
kdc = kerberos.example.com
|
||||||
|
default_principal_flags = +preauth
|
||||||
|
}
|
||||||
|
|
||||||
|
[domain_realm]
|
||||||
|
example.com = EXAMPLE.COM
|
||||||
|
.example.com = EXAMPLE.COM
|
||||||
|
|
||||||
|
[logging]
|
||||||
|
kdc = SYSLOG:NOTICE
|
||||||
|
admin_server = SYSLOG:NOTICE
|
||||||
|
default = SYSLOG:NOTICE
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Verbatim <literal>krb5.conf</literal> configuration. Note that this
|
||||||
|
is mutually exclusive with configuration via
|
||||||
|
<literal>libdefaults</literal>, <literal>realms</literal>,
|
||||||
|
<literal>domain_realm</literal>, <literal>capaths</literal>,
|
||||||
|
<literal>appdefaults</literal>, <literal>plugins</literal> and
|
||||||
|
<literal>extraConfig</literal> configuration options. Consult
|
||||||
|
<literal>man krb5.conf</literal> for documentation.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
defaultRealm = mkOption {
|
||||||
|
type = with types; nullOr str;
|
||||||
|
default = null;
|
||||||
|
example = "ATHENA.MIT.EDU";
|
||||||
|
description = ''
|
||||||
|
DEPRECATED, please use
|
||||||
|
<literal>krb5.libdefaults.default_realm</literal>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
domainRealm = mkOption {
|
||||||
|
type = with types; nullOr str;
|
||||||
|
default = null;
|
||||||
|
example = "athena.mit.edu";
|
||||||
|
description = ''
|
||||||
|
DEPRECATED, please create a map of server hostnames to Kerberos realms
|
||||||
|
in <literal>krb5.domain_realm</literal>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
kdc = mkOption {
|
||||||
|
type = with types; nullOr str;
|
||||||
|
default = null;
|
||||||
|
example = "kerberos.mit.edu";
|
||||||
|
description = ''
|
||||||
|
DEPRECATED, please pass a <literal>kdc</literal> attribute to a realm
|
||||||
|
in <literal>krb5.realms</literal>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
kerberosAdminServer = mkOption {
|
||||||
|
type = with types; nullOr str;
|
||||||
|
default = null;
|
||||||
|
example = "kerberos.mit.edu";
|
||||||
|
description = ''
|
||||||
|
DEPRECATED, please pass an <literal>admin_server</literal> attribute
|
||||||
|
to a realm in <literal>krb5.realms</literal>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
environment.systemPackages = [ cfg.kerberos ];
|
||||||
|
|
||||||
|
environment.etc."krb5.conf".text = if isString cfg.config
|
||||||
|
then cfg.config
|
||||||
|
else (''
|
||||||
|
[libdefaults]
|
||||||
|
${mkMappedAttrsOrString mergedConfig.libdefaults}
|
||||||
|
|
||||||
|
[realms]
|
||||||
|
${mkMappedAttrsOrString mergedConfig.realms}
|
||||||
|
|
||||||
|
[domain_realm]
|
||||||
|
${mkMappedAttrsOrString mergedConfig.domain_realm}
|
||||||
|
|
||||||
|
[capaths]
|
||||||
|
${mkMappedAttrsOrString mergedConfig.capaths}
|
||||||
|
|
||||||
|
[appdefaults]
|
||||||
|
${mkMappedAttrsOrString mergedConfig.appdefaults}
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
${mkMappedAttrsOrString mergedConfig.plugins}
|
||||||
|
'' + optionalString (mergedConfig.extraConfig != null)
|
||||||
|
("\n" + mergedConfig.extraConfig));
|
||||||
|
|
||||||
|
warnings = flatten [
|
||||||
|
(optional (cfg.defaultRealm != null) ''
|
||||||
|
The option krb5.defaultRealm is deprecated, please use
|
||||||
|
krb5.libdefaults.default_realm.
|
||||||
|
'')
|
||||||
|
(optional (cfg.domainRealm != null) ''
|
||||||
|
The option krb5.domainRealm is deprecated, please use krb5.domain_realm.
|
||||||
|
'')
|
||||||
|
(optional (cfg.kdc != null) ''
|
||||||
|
The option krb5.kdc is deprecated, please pass a kdc attribute to a
|
||||||
|
realm in krb5.realms.
|
||||||
|
'')
|
||||||
|
(optional (cfg.kerberosAdminServer != null) ''
|
||||||
|
The option krb5.kerberosAdminServer is deprecated, please pass an
|
||||||
|
admin_server attribute to a realm in krb5.realms.
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
assertions = [
|
||||||
|
{ assertion = !((builtins.any (value: value != null) [
|
||||||
|
cfg.defaultRealm cfg.domainRealm cfg.kdc cfg.kerberosAdminServer
|
||||||
|
]) && ((builtins.any (value: value != {}) [
|
||||||
|
cfg.libdefaults cfg.realms cfg.domain_realm cfg.capaths
|
||||||
|
cfg.appdefaults cfg.plugins
|
||||||
|
]) || (builtins.any (value: value != null) [
|
||||||
|
cfg.config cfg.extraConfig
|
||||||
|
])));
|
||||||
|
message = ''
|
||||||
|
Configuration of krb5.conf by deprecated options is mutually exclusive
|
||||||
|
with configuration by section. Please migrate your config using the
|
||||||
|
attributes suggested in the warnings.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{ assertion = !(cfg.config != null
|
||||||
|
&& ((builtins.any (value: value != {}) [
|
||||||
|
cfg.libdefaults cfg.realms cfg.domain_realm cfg.capaths
|
||||||
|
cfg.appdefaults cfg.plugins
|
||||||
|
]) || (builtins.any (value: value != null) [
|
||||||
|
cfg.extraConfig cfg.defaultRealm cfg.domainRealm cfg.kdc
|
||||||
|
cfg.kerberosAdminServer
|
||||||
|
])));
|
||||||
|
message = ''
|
||||||
|
Configuration of krb5.conf using krb.config is mutually exclusive with
|
||||||
|
configuration by section. If you want to mix the two, you can pass
|
||||||
|
lines to any configuration section or lines to krb5.extraConfig.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
@ -290,8 +290,8 @@ in
|
|||||||
ln -s /run/systemd/resolve/resolv.conf /run/resolvconf/interfaces/systemd
|
ln -s /run/systemd/resolve/resolv.conf /run/resolvconf/interfaces/systemd
|
||||||
''}
|
''}
|
||||||
|
|
||||||
# Make sure resolv.conf is up to date if not managed by systemd
|
# Make sure resolv.conf is up to date if not managed manually or by systemd
|
||||||
${optionalString (!config.services.resolved.enable) ''
|
${optionalString (!config.environment.etc?"resolv.conf") ''
|
||||||
${pkgs.openresolv}/bin/resolvconf -u
|
${pkgs.openresolv}/bin/resolvconf -u
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
|
@ -35,7 +35,7 @@ with lib;
|
|||||||
networkmanager_pptp = pkgs.networkmanager_pptp.override { withGnome = false; };
|
networkmanager_pptp = pkgs.networkmanager_pptp.override { withGnome = false; };
|
||||||
networkmanager_vpnc = pkgs.networkmanager_vpnc.override { withGnome = false; };
|
networkmanager_vpnc = pkgs.networkmanager_vpnc.override { withGnome = false; };
|
||||||
networkmanager_iodine = pkgs.networkmanager_iodine.override { withGnome = false; };
|
networkmanager_iodine = pkgs.networkmanager_iodine.override { withGnome = false; };
|
||||||
pinentry = pkgs.pinentry.override { gtk2 = null; qt4 = null; };
|
pinentry = pkgs.pinentry_ncurses;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ let
|
|||||||
|
|
||||||
hostArray = [ "files" ]
|
hostArray = [ "files" ]
|
||||||
++ optionals mymachines [ "mymachines" ]
|
++ optionals mymachines [ "mymachines" ]
|
||||||
++ optionals nssmdns [ "mdns_minimal [!UNAVAIL=return]" ]
|
++ optionals nssmdns [ "mdns_minimal [NOTFOUND=return]" ]
|
||||||
++ optionals nsswins [ "wins" ]
|
++ optionals nsswins [ "wins" ]
|
||||||
++ optionals resolved ["resolve [!UNAVAIL=return]"]
|
++ optionals resolved ["resolve [!UNAVAIL=return]"]
|
||||||
++ [ "dns" ]
|
++ [ "dns" ]
|
||||||
|
@ -45,7 +45,7 @@ let
|
|||||||
uid = ids.uids.pulseaudio;
|
uid = ids.uids.pulseaudio;
|
||||||
gid = ids.gids.pulseaudio;
|
gid = ids.gids.pulseaudio;
|
||||||
|
|
||||||
stateDir = "/var/run/pulse";
|
stateDir = "/run/pulse";
|
||||||
|
|
||||||
# Create pulse/client.conf even if PulseAudio is disabled so
|
# Create pulse/client.conf even if PulseAudio is disabled so
|
||||||
# that we can disable the autospawn feature in programs that
|
# that we can disable the autospawn feature in programs that
|
||||||
@ -101,7 +101,8 @@ in {
|
|||||||
each user that tries to use the sound system. The server runs
|
each user that tries to use the sound system. The server runs
|
||||||
with user privileges. This is the recommended and most secure
|
with user privileges. This is the recommended and most secure
|
||||||
way to use PulseAudio. If true, one system-wide PulseAudio
|
way to use PulseAudio. If true, one system-wide PulseAudio
|
||||||
server is launched on boot, running as the user "pulse".
|
server is launched on boot, running as the user "pulse", and
|
||||||
|
only users in the "audio" group will have access to the server.
|
||||||
Please read the PulseAudio documentation for more details.
|
Please read the PulseAudio documentation for more details.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
@ -219,6 +220,12 @@ in {
|
|||||||
|
|
||||||
{ target = "pulse/daemon.conf";
|
{ target = "pulse/daemon.conf";
|
||||||
source = writeText "daemon.conf" (lib.generators.toKeyValue {} cfg.daemon.config); }
|
source = writeText "daemon.conf" (lib.generators.toKeyValue {} cfg.daemon.config); }
|
||||||
|
|
||||||
|
{ target = "openal/alsoft.conf";
|
||||||
|
source = writeText "alsoft.conf" "drivers=pulse"; }
|
||||||
|
|
||||||
|
{ target = "libao.conf";
|
||||||
|
source = writeText "libao.conf" "default_driver=pulse"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
# Allow PulseAudio to get realtime priority using rtkit.
|
# Allow PulseAudio to get realtime priority using rtkit.
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user