Merge remote-tracking branch 'origin/master' into haskell-updates.
This commit is contained in:
commit
3aae69103b
2
.github/workflows/editorconfig.yml
vendored
2
.github/workflows/editorconfig.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
- name: Fetch editorconfig-checker
|
- name: Fetch editorconfig-checker
|
||||||
if: env.PR_DIFF
|
if: env.PR_DIFF
|
||||||
env:
|
env:
|
||||||
ECC_VERSION: "2.2.0"
|
ECC_VERSION: "2.3.1"
|
||||||
ECC_URL: "https://github.com/editorconfig-checker/editorconfig-checker/releases/download"
|
ECC_URL: "https://github.com/editorconfig-checker/editorconfig-checker/releases/download"
|
||||||
run: |
|
run: |
|
||||||
curl -sSf -O -L -C - "$ECC_URL/$ECC_VERSION/ec-linux-amd64.tar.gz" && \
|
curl -sSf -O -L -C - "$ECC_URL/$ECC_VERSION/ec-linux-amd64.tar.gz" && \
|
||||||
|
50
doc/builders/packages/fish.section.md
Normal file
50
doc/builders/packages/fish.section.md
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# Fish {#sec-fish}
|
||||||
|
|
||||||
|
Fish is a "smart and user-friendly command line shell" with support for plugins.
|
||||||
|
|
||||||
|
|
||||||
|
## Vendor Fish scripts {#sec-fish-vendor}
|
||||||
|
|
||||||
|
Any package may ship its own Fish completions, configuration snippets, and
|
||||||
|
functions. Those should be installed to
|
||||||
|
`$out/share/fish/vendor_{completions,conf,functions}.d` respectively.
|
||||||
|
|
||||||
|
When the `programs.fish.enable` and
|
||||||
|
`programs.fish.vendor.{completions,config,functions}.enable` options from the
|
||||||
|
NixOS Fish module are set to true, those paths are symlinked in the current
|
||||||
|
system environment and automatically loaded by Fish.
|
||||||
|
|
||||||
|
|
||||||
|
## Packaging Fish plugins {#sec-fish-plugins-pkg}
|
||||||
|
|
||||||
|
While packages providing standalone executables belong to the top level,
|
||||||
|
packages which have the sole purpose of extending Fish belong to the
|
||||||
|
`fishPlugins` scope and should be registered in
|
||||||
|
`pkgs/shells/fish/plugins/default.nix`.
|
||||||
|
|
||||||
|
The `buildFishPlugin` utility function can be used to automatically copy Fish
|
||||||
|
scripts from `$src/{completions,conf,conf.d,functions}` to the standard vendor
|
||||||
|
installation paths. It also sets up the test environment so that the optional
|
||||||
|
`checkPhase` is executed in a Fish shell with other already packaged plugins
|
||||||
|
and package-local Fish functions specified in `checkPlugins` and
|
||||||
|
`checkFunctionDirs` respectively.
|
||||||
|
|
||||||
|
See `pkgs/shells/fish/plugins/pure.nix` for an example of Fish plugin package
|
||||||
|
using `buildFishPlugin` and running unit tests with the `fishtape` test runner.
|
||||||
|
|
||||||
|
|
||||||
|
## Fish wrapper {#sec-fish-wrapper}
|
||||||
|
|
||||||
|
The `wrapFish` package is a wrapper around Fish which can be used to create
|
||||||
|
Fish shells initialised with some plugins as well as completions, configuration
|
||||||
|
snippets and functions sourced from the given paths. This provides a convenient
|
||||||
|
way to test Fish plugins and scripts without having to alter the environment.
|
||||||
|
|
||||||
|
```nix
|
||||||
|
wrapFish {
|
||||||
|
pluginPkgs = with fishPlugins; [ pure foreign-env ];
|
||||||
|
completionDirs = [];
|
||||||
|
functionDirs = [];
|
||||||
|
confDirs = [ "/path/to/some/fish/init/dir/" ];
|
||||||
|
}
|
||||||
|
```
|
@ -11,6 +11,7 @@
|
|||||||
<xi:include href="elm.xml" />
|
<xi:include href="elm.xml" />
|
||||||
<xi:include href="emacs.section.xml" />
|
<xi:include href="emacs.section.xml" />
|
||||||
<xi:include href="firefox.section.xml" />
|
<xi:include href="firefox.section.xml" />
|
||||||
|
<xi:include href="fish.section.xml" />
|
||||||
<xi:include href="ibus.xml" />
|
<xi:include href="ibus.xml" />
|
||||||
<xi:include href="kakoune.section.xml" />
|
<xi:include href="kakoune.section.xml" />
|
||||||
<xi:include href="linux.section.xml" />
|
<xi:include href="linux.section.xml" />
|
||||||
|
@ -178,6 +178,15 @@ args.stdenv.mkDerivation (args // {
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Prefer using the top-level <varname>lib</varname> over its alias
|
||||||
|
<literal>stdenv.lib</literal>. <varname>lib</varname> is unrelated to
|
||||||
|
<varname>stdenv</varname>, and so <literal>stdenv.lib</literal> should only
|
||||||
|
be used as a convenience alias when developing to avoid having to modify
|
||||||
|
the function inputs just to test something out.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
<section xml:id="sec-package-naming">
|
<section xml:id="sec-package-naming">
|
||||||
|
@ -13,21 +13,19 @@ with import <nixpkgs> {};
|
|||||||
|
|
||||||
let
|
let
|
||||||
androidComposition = androidenv.composeAndroidPackages {
|
androidComposition = androidenv.composeAndroidPackages {
|
||||||
toolsVersion = "25.2.5";
|
toolsVersion = "26.1.1";
|
||||||
platformToolsVersion = "27.0.1";
|
platformToolsVersion = "30.0.5";
|
||||||
buildToolsVersions = [ "27.0.3" ];
|
buildToolsVersions = [ "30.0.3" ];
|
||||||
includeEmulator = false;
|
includeEmulator = false;
|
||||||
emulatorVersion = "27.2.0";
|
emulatorVersion = "30.3.4";
|
||||||
platformVersions = [ "24" ];
|
platformVersions = [ "28" "29" "30" ];
|
||||||
includeSources = false;
|
includeSources = false;
|
||||||
includeDocs = false;
|
|
||||||
includeSystemImages = false;
|
includeSystemImages = false;
|
||||||
systemImageTypes = [ "default" ];
|
systemImageTypes = [ "google_apis_playstore" ];
|
||||||
abiVersions = [ "armeabi-v7a" ];
|
abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
|
||||||
lldbVersions = [ "2.0.2558144" ];
|
cmakeVersions = [ "3.10.2" ];
|
||||||
cmakeVersions = [ "3.6.4111459" ];
|
includeNDK = true;
|
||||||
includeNDK = false;
|
ndkVersion = "22.0.7026061";
|
||||||
ndkVersion = "16.1.4479499";
|
|
||||||
useGoogleAPIs = false;
|
useGoogleAPIs = false;
|
||||||
useGoogleTVAddOns = false;
|
useGoogleTVAddOns = false;
|
||||||
includeExtras = [
|
includeExtras = [
|
||||||
@ -46,13 +44,11 @@ The following parameters are supported:
|
|||||||
|
|
||||||
* `toolsVersion`, specifies the version of the tools package to use
|
* `toolsVersion`, specifies the version of the tools package to use
|
||||||
* `platformsToolsVersion` specifies the version of the `platform-tools` plugin
|
* `platformsToolsVersion` specifies the version of the `platform-tools` plugin
|
||||||
* `buildToolsVersion` specifies the versions of the `build-tools` plugins to
|
* `buildToolsVersions` specifies the versions of the `build-tools` plugins to
|
||||||
use.
|
use.
|
||||||
* `includeEmulator` specifies whether to deploy the emulator package (`false`
|
* `includeEmulator` specifies whether to deploy the emulator package (`false`
|
||||||
by default). When enabled, the version of the emulator to deploy can be
|
by default). When enabled, the version of the emulator to deploy can be
|
||||||
specified by setting the `emulatorVersion` parameter.
|
specified by setting the `emulatorVersion` parameter.
|
||||||
* `includeDocs` specifies whether the documentation catalog should be included.
|
|
||||||
* `lldbVersions` specifies what LLDB versions should be deployed.
|
|
||||||
* `cmakeVersions` specifies which CMake versions should be deployed.
|
* `cmakeVersions` specifies which CMake versions should be deployed.
|
||||||
* `includeNDK` specifies that the Android NDK bundle should be included.
|
* `includeNDK` specifies that the Android NDK bundle should be included.
|
||||||
Defaults to: `false`.
|
Defaults to: `false`.
|
||||||
@ -82,6 +78,38 @@ For each requested system image we can specify the following options:
|
|||||||
|
|
||||||
Most of the function arguments have reasonable default settings.
|
Most of the function arguments have reasonable default settings.
|
||||||
|
|
||||||
|
You can specify license names:
|
||||||
|
|
||||||
|
* `extraLicenses` is a list of of license names.
|
||||||
|
You can get these names from repo.json or `querypackages.sh licenses`. The SDK
|
||||||
|
license (`android-sdk-license`) is accepted for you if you set accept_license
|
||||||
|
to true. If you are doing something like working with preview SDKs, you will
|
||||||
|
want to add `android-sdk-preview-license` or whichever license applies here.
|
||||||
|
|
||||||
|
Additionally, you can override the repositories that composeAndroidPackages will
|
||||||
|
pull from:
|
||||||
|
|
||||||
|
* `repoJson` specifies a path to a generated repo.json file. You can generate this
|
||||||
|
by running `generate.sh`, which in turn will call into `mkrepo.rb`.
|
||||||
|
* `repoXmls` is an attribute set containing paths to repo XML files. If specified,
|
||||||
|
it takes priority over `repoJson`, and will trigger a local build writing out a
|
||||||
|
repo.json to the Nix store based on the given repository XMLs.
|
||||||
|
|
||||||
|
```nix
|
||||||
|
repoXmls = {
|
||||||
|
packages = [ ./xml/repository2-1.xml ];
|
||||||
|
images = [
|
||||||
|
./xml/android-sys-img2-1.xml
|
||||||
|
./xml/android-tv-sys-img2-1.xml
|
||||||
|
./xml/android-wear-sys-img2-1.xml
|
||||||
|
./xml/android-wear-cn-sys-img2-1.xml
|
||||||
|
./xml/google_apis-sys-img2-1.xml
|
||||||
|
./xml/google_apis_playstore-sys-img2-1.xml
|
||||||
|
];
|
||||||
|
addons = [ ./xml/addon2-1.xml ];
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
When building the above expression with:
|
When building the above expression with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -104,8 +132,8 @@ in
|
|||||||
androidComposition.platform-tools
|
androidComposition.platform-tools
|
||||||
```
|
```
|
||||||
|
|
||||||
Using predefine Android package compositions
|
Using predefined Android package compositions
|
||||||
--------------------------------------------
|
---------------------------------------------
|
||||||
In addition to composing an Android package set manually, it is also possible
|
In addition to composing an Android package set manually, it is also possible
|
||||||
to use a predefined composition that contains all basic packages for a specific
|
to use a predefined composition that contains all basic packages for a specific
|
||||||
Android version, such as version 9.0 (API-level 28).
|
Android version, such as version 9.0 (API-level 28).
|
||||||
@ -209,27 +237,104 @@ androidenv.emulateApp {
|
|||||||
In addition to prebuilt APKs, you can also bind the APK parameter to a
|
In addition to prebuilt APKs, you can also bind the APK parameter to a
|
||||||
`buildApp {}` function invocation shown in the previous example.
|
`buildApp {}` function invocation shown in the previous example.
|
||||||
|
|
||||||
|
Notes on environment variables in Android projects
|
||||||
|
--------------------------------------------------
|
||||||
|
* `ANDROID_SDK_ROOT` should point to the Android SDK. In your Nix expressions, this should be
|
||||||
|
`${androidComposition.androidsdk}/libexec/android-sdk`. Note that `ANDROID_HOME` is deprecated,
|
||||||
|
but if you rely on tools that need it, you can export it too.
|
||||||
|
* `ANDROID_NDK_ROOT` should point to the Android NDK, if you're doing NDK development.
|
||||||
|
In your Nix expressions, this should be `${ANDROID_SDK_ROOT}/ndk-bundle`.
|
||||||
|
|
||||||
|
If you are running the Android Gradle plugin, you need to export GRADLE_OPTS to override aapt2
|
||||||
|
to point to the aapt2 binary in the Nix store as well, or use a FHS environment so the packaged
|
||||||
|
aapt2 can run. If you don't want to use a FHS environment, something like this should work:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
let
|
||||||
|
buildToolsVersion = "30.0.3";
|
||||||
|
|
||||||
|
# Use buildToolsVersion when you define androidComposition
|
||||||
|
androidComposition = <...>;
|
||||||
|
in
|
||||||
|
pkgs.mkShell rec {
|
||||||
|
ANDROID_SDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk";
|
||||||
|
ANDROID_NDK_ROOT = "${ANDROID_SDK_ROOT}/ndk-bundle";
|
||||||
|
|
||||||
|
# Use the same buildToolsVersion here
|
||||||
|
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROID_SDK_ROOT}/build-tools/${buildToolsVersion}/aapt2";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are using cmake, you need to add it to PATH in a shell hook or FHS env profile.
|
||||||
|
The path is suffixed with a build number, but properly prefixed with the version.
|
||||||
|
So, something like this should suffice:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
let
|
||||||
|
cmakeVersion = "3.10.2";
|
||||||
|
|
||||||
|
# Use cmakeVersion when you define androidComposition
|
||||||
|
androidComposition = <...>;
|
||||||
|
in
|
||||||
|
pkgs.mkShell rec {
|
||||||
|
ANDROID_SDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk";
|
||||||
|
ANDROID_NDK_ROOT = "${ANDROID_SDK_ROOT}/ndk-bundle";
|
||||||
|
|
||||||
|
# Use the same cmakeVersion here
|
||||||
|
shellHook = ''
|
||||||
|
export PATH="$(echo "$ANDROID_SDK_ROOT/cmake/${cmakeVersion}".*/bin):$PATH"
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that running Android Studio with ANDROID_SDK_ROOT set will automatically write a
|
||||||
|
`local.properties` file with `sdk.dir` set to $ANDROID_SDK_ROOT if one does not already
|
||||||
|
exist. If you are using the NDK as well, you may have to add `ndk.dir` to this file.
|
||||||
|
|
||||||
|
An example shell.nix that does all this for you is provided in examples/shell.nix.
|
||||||
|
This shell.nix includes a shell hook that overwrites local.properties with the correct
|
||||||
|
sdk.dir and ndk.dir values. This will ensure that the SDK and NDK directories will
|
||||||
|
both be correct when you run Android Studio inside nix-shell.
|
||||||
|
|
||||||
|
Notes on improving build.gradle compatibility
|
||||||
|
---------------------------------------------
|
||||||
|
Ensure that your buildToolsVersion and ndkVersion match what is declared in androidenv.
|
||||||
|
If you are using cmake, make sure its declared version is correct too.
|
||||||
|
|
||||||
|
Otherwise, you may get cryptic errors from aapt2 and the Android Gradle plugin warning
|
||||||
|
that it cannot install the build tools because the SDK directory is not writeable.
|
||||||
|
|
||||||
|
```gradle
|
||||||
|
android {
|
||||||
|
buildToolsVersion "30.0.3"
|
||||||
|
ndkVersion = "22.0.7026061"
|
||||||
|
externalNativeBuild {
|
||||||
|
cmake {
|
||||||
|
version "3.10.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
Querying the available versions of each plugin
|
Querying the available versions of each plugin
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
When using any of the previously shown functions, it may be a bit inconvenient
|
repo.json provides all the options in one file now.
|
||||||
to find out what options are supported, since the Android SDK provides many
|
|
||||||
plugins.
|
|
||||||
|
|
||||||
A shell script in the `pkgs/development/mobile/androidenv/` sub directory can be used to retrieve all
|
A shell script in the `pkgs/development/mobile/androidenv/` subdirectory can be used to retrieve all
|
||||||
possible options:
|
possible options:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sh ./querypackages.sh packages build-tools
|
./querypackages.sh packages
|
||||||
```
|
```
|
||||||
|
|
||||||
The above command-line instruction queries all build-tools versions in the
|
The above command-line instruction queries all package versions in repo.json.
|
||||||
generated `packages.nix` expression.
|
|
||||||
|
|
||||||
Updating the generated expressions
|
Updating the generated expressions
|
||||||
----------------------------------
|
----------------------------------
|
||||||
Most of the Nix expressions are generated from XML files that the Android
|
repo.json is generated from XML files that the Android Studio package manager uses.
|
||||||
package manager uses. To update the expressions run the `generate.sh` script
|
To update the expressions run the `generate.sh` script that is stored in the
|
||||||
that is stored in the `pkgs/development/mobile/androidenv/` sub directory:
|
`pkgs/development/mobile/androidenv/` subdirectory:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./generate.sh
|
./generate.sh
|
||||||
|
@ -1,40 +1,79 @@
|
|||||||
# Coq {#sec-language-coq}
|
# Coq and coq packages {#sec-language-coq}
|
||||||
|
|
||||||
Coq libraries should be installed in `$(out)/lib/coq/${coq.coq-version}/user-contrib/`. Such directories are automatically added to the `$COQPATH` environment variable by the hook defined in the Coq derivation.
|
## Coq derivation: `coq`
|
||||||
|
|
||||||
Some extensions (plugins) might require OCaml and sometimes other OCaml packages. The `coq.ocamlPackages` attribute can be used to depend on the same package set Coq was built against.
|
The Coq derivation is overridable through the `coq.override overrides`, where overrides is an attribute set which contains the arguments to override. We recommend overriding either of the following
|
||||||
|
|
||||||
Coq libraries may be compatible with some specific versions of Coq only. The `compatibleCoqVersions` attribute is used to precisely select those versions of Coq that are compatible with this derivation.
|
* `version` (optional, defaults to the latest version of Coq selected for nixpkgs, see `pkgs/top-level/coq-packages` to witness this choice), which follows the conventions explained in the `coqPackages` section below,
|
||||||
|
* `customOCamlPackage` (optional, defaults to `null`, which lets Coq choose a version automatically), which can be set to any of the ocaml packages attribute of `ocaml-ng` (such as `ocaml-ng.ocamlPackages_4_10` which is the default for Coq 8.11 for example).
|
||||||
|
* `coq-version` (optional, defaults to the short version e.g. "8.10"), is a version number of the form "x.y" that indicates which Coq's version build behavior to mimic when using a source which is not a release. E.g. `coq.override { version = "d370a9d1328a4e1cdb9d02ee032f605a9d94ec7a"; coq-version = "8.10"; }`.
|
||||||
|
|
||||||
Here is a simple package example. It is a pure Coq library, thus it depends on Coq. It builds on the Mathematical Components library, thus it also takes `mathcomp` as `buildInputs`. Its `Makefile` has been generated using `coq_makefile` so we only have to set the `$COQLIB` variable at install time.
|
## Coq packages attribute sets: `coqPackages`
|
||||||
|
|
||||||
|
The recommended way of defining a derivation for a Coq library, is to use the `coqPackages.mkCoqDerivation` function, which is essentially a specialization of `mkDerivation` taking into account most of the specifics of Coq libraries. The following attributes are supported:
|
||||||
|
|
||||||
|
* `pname` (required) is the name of the package,
|
||||||
|
* `version` (optional, defaults to `null`), is the version to fetch and build,
|
||||||
|
this attribute is interpreted in several ways depending on its type and pattern:
|
||||||
|
* if it is a known released version string, i.e. from the `release` attribute below, the according release is picked, and the `version` attribute of the resulting derivation is set to this release string,
|
||||||
|
* if it is a majorMinor `"x.y"` prefix of a known released version (as defined above), then the latest `"x.y.z"` known released version is selected (for the ordering given by `versionAtLeast`),
|
||||||
|
* if it is a path or a string representing an absolute path (i.e. starting with `"/"`), the provided path is selected as a source, and the `version` attribute of the resulting derivation is set to `"dev"`,
|
||||||
|
* if it is a string of the form `owner:branch` then it tries to download the `branch` of owner `owner` for a project of the same name using the same vcs, and the `version` attribute of the resulting derivation is set to `"dev"`, additionally if the owner is not provided (i.e. if the `owner:` prefix is missing), it defaults to the original owner of the package (see below),
|
||||||
|
* if it is a string of the form `"#N"`, and the domain is github, then it tries to download the current head of the pull request `#N` from github,
|
||||||
|
* `defaultVersion` (optional). Coq libraries may be compatible with some specific versions of Coq only. The `defaultVersion` attribute is used when no `version` is provided (or if `version = null`) to select the version of the library to use by default, depending on the context. This selection will mainly depend on a `coq` version number but also possibly on other packages versions (e.g. `mathcomp`). If its value ends up to be `null`, the package is marked for removal in end-user `coqPackages` attribute set.
|
||||||
|
* `release` (optional, defaults to `{}`), lists all the known releases of the library and for each of them provides an attribute set with at least a `sha256` attribute (you may use the shell command `nix-prefetch-url --unpack <archive-url>` to find it, where `<archive-url>` is for example `https://github.com/owner/repo/archive/version.tar.gz`), each attribute set of the list of releases also takes optional overloading arguments for the fetcher as below (i.e.`domain`, `owner`, `repo`, `rev` assuming the default fetcher is used) and optional overrides for the result of the fetcher (i.e. `version` and `src`).
|
||||||
|
* `fetcher` (optional, default to a generic fetching mechanism supporting github or gitlab based infrastructures), is a function that takes at least an `owner`, a `repo`, a `rev`, and a `sha256` and returns an attribute set with a `version` and `src`.
|
||||||
|
* `repo` (optional, defaults to the value of `pname`),
|
||||||
|
* `owner` (optional, defaults to `"coq-community"`).
|
||||||
|
* `domain` (optional, defaults to `"github.com"`), domains including the strings `"github"` or `"gitlab"` in their names are automatically supported, otherwise, one must change the `fetcher` argument to support them (cf `pkgs/development/coq-modules/heq/default.nix` for an example),
|
||||||
|
* `releaseRev` (optional, defaults to `(v: v)`), provides a default mapping from release names to revision hashes/branch names/tags,
|
||||||
|
* `displayVersion` (optional), provides a way to alter the computation of `name` from `pname`, by explaining how to display version numbers,
|
||||||
|
* `namePrefix` (optional), provides a way to alter the computation of `name` from `pname`, by explaining which dependencies must occur in `name`,
|
||||||
|
* `extraBuildInputs` (optional), by default `buildInputs` just contains `coq`, this allows to add more build inputs,
|
||||||
|
* `mlPlugin` (optional, defaults to `false`). Some extensions (plugins) might require OCaml and sometimes other OCaml packages. Standard dependencies can be added by setting the current option to `true`. For a finer grain control, the `coq.ocamlPackages` attribute can be used in `extraBuildInputs` to depend on the same package set Coq was built against.
|
||||||
|
* `enableParallelBuilding` (optional, defaults to `true`), since it is activated by default, we provide a way to disable it.
|
||||||
|
* `extraInstallFlags` (optional), allows to extend `installFlags` which initializes the variable `COQMF_COQLIB` so as to install in the proper subdirectory. Indeed Coq libraries should be installed in `$(out)/lib/coq/${coq.coq-version}/user-contrib/`. Such directories are automatically added to the `$COQPATH` environment variable by the hook defined in the Coq derivation.
|
||||||
|
* `setCOQBIN` (optional, defaults to `true`), by default, the environment variable `$COQBIN` is set to the current Coq's binary, but one can disable this behavior by setting it to `false`,
|
||||||
|
* `useMelquiondRemake` (optional, default to `null`) is an attribute set, which, if given, overloads the `preConfigurePhases`, `configureFlags`, `buildPhase`, and `installPhase` attributes of the derivation for a specific use in libraries using `remake` as set up by Guillaume Melquiond for `flocq`, `gappalib`, `interval`, and `coquelicot` (see the corresponding derivation for concrete examples of use of this option). For backward compatibility, the attribute `useMelquiondRemake.logpath` must be set to the logical root of the library (otherwise, one can pass `useMelquiondRemake = {}` to activate this without backward compatibility).
|
||||||
|
* `dropAttrs`, `keepAttrs`, `dropDerivationAttrs` are all optional and allow to tune which attribute is added or removed from the final call to `mkDerivation`.
|
||||||
|
|
||||||
|
It also takes other standard `mkDerivation` attributes, they are added as such, except for `meta` which extends an automatically computed `meta` (where the `platform` is the same as `coq` and the homepage is automatically computed).
|
||||||
|
|
||||||
|
Here is a simple package example. It is a pure Coq library, thus it depends on Coq. It builds on the Mathematical Components library, thus it also takes some `mathcomp` derivations as `extraBuildInputs`.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ stdenv, fetchFromGitHub, coq, mathcomp }:
|
{ coq, mkCoqDerivation, mathcomp, mathcomp-finmap, mathcomp-bigenough,
|
||||||
|
lib, version ? null }:
|
||||||
stdenv.mkDerivation rec {
|
with lib; mkCoqDerivation {
|
||||||
name = "coq${coq.coq-version}-multinomials-${version}";
|
/* namePrefix leads to e.g. `name = coq8.11-mathcomp1.11-multinomials-1.5.2` */
|
||||||
version = "1.0";
|
namePrefix = [ "coq" "mathcomp" ];
|
||||||
src = fetchFromGitHub {
|
pname = "multinomials";
|
||||||
owner = "math-comp";
|
owner = "math-comp";
|
||||||
repo = "multinomials";
|
inherit version;
|
||||||
rev = version;
|
defaultVersion = with versions; switch [ coq.version mathcomp.version ] [
|
||||||
sha256 = "1qmbxp1h81cy3imh627pznmng0kvv37k4hrwi2faa101s6bcx55m";
|
{ cases = [ (range "8.7" "8.12") "1.11.0" ]; out = "1.5.2"; }
|
||||||
|
{ cases = [ (range "8.7" "8.11") (range "1.8" "1.10") ]; out = "1.5.0"; }
|
||||||
|
{ cases = [ (range "8.7" "8.10") (range "1.8" "1.10") ]; out = "1.4"; }
|
||||||
|
{ cases = [ "8.6" (range "1.6" "1.7") ]; out = "1.1"; }
|
||||||
|
] null;
|
||||||
|
release = {
|
||||||
|
"1.5.2".sha256 = "15aspf3jfykp1xgsxf8knqkxv8aav2p39c2fyirw7pwsfbsv2c4s";
|
||||||
|
"1.5.1".sha256 = "13nlfm2wqripaq671gakz5mn4r0xwm0646araxv0nh455p9ndjs3";
|
||||||
|
"1.5.0".sha256 = "064rvc0x5g7y1a0nip6ic91vzmq52alf6in2bc2dmss6dmzv90hw";
|
||||||
|
"1.5.0".rev = "1.5";
|
||||||
|
"1.4".sha256 = "0vnkirs8iqsv8s59yx1fvg1nkwnzydl42z3scya1xp1b48qkgn0p";
|
||||||
|
"1.3".sha256 = "0l3vi5n094nx3qmy66hsv867fnqm196r8v605kpk24gl0aa57wh4";
|
||||||
|
"1.2".sha256 = "1mh1w339dslgv4f810xr1b8v2w7rpx6fgk9pz96q0fyq49fw2xcq";
|
||||||
|
"1.1".sha256 = "1q8alsm89wkc0lhcvxlyn0pd8rbl2nnxg81zyrabpz610qqjqc3s";
|
||||||
|
"1.0".sha256 = "1qmbxp1h81cy3imh627pznmng0kvv37k4hrwi2faa101s6bcx55m";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ coq ];
|
propagatedBuildInputs =
|
||||||
propagatedBuildInputs = [ mathcomp ];
|
[ mathcomp.ssreflect mathcomp.algebra mathcomp-finmap mathcomp-bigenough ];
|
||||||
|
|
||||||
installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/";
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A Coq/SSReflect Library for Monoidal Rings and Multinomials";
|
description = "A Coq/SSReflect Library for Monoidal Rings and Multinomials";
|
||||||
inherit (src.meta) homepage;
|
license = licenses.cecill-c;
|
||||||
license = stdenv.lib.licenses.cecill-b;
|
|
||||||
inherit (coq.meta) platforms;
|
|
||||||
};
|
|
||||||
|
|
||||||
passthru = {
|
|
||||||
compatibleCoqVersions = v: builtins.elem v [ "8.5" "8.6" "8.7" ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -102,7 +102,7 @@ See the `zlib` example:
|
|||||||
echo "================= /testing zlib using node ================="
|
echo "================= /testing zlib using node ================="
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postPatch = pkgs.stdenv.lib.optionalString pkgs.stdenv.isDarwin ''
|
postPatch = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
|
||||||
substituteInPlace configure \
|
substituteInPlace configure \
|
||||||
--replace '/usr/bin/libtool' 'ar' \
|
--replace '/usr/bin/libtool' 'ar' \
|
||||||
--replace 'AR="libtool"' 'AR="ar"' \
|
--replace 'AR="libtool"' 'AR="ar"' \
|
||||||
|
@ -181,7 +181,7 @@ luaposix = buildLuarocksPackage {
|
|||||||
disabled = (luaOlder "5.1") || (luaAtLeast "5.4");
|
disabled = (luaOlder "5.1") || (luaAtLeast "5.4");
|
||||||
propagatedBuildInputs = [ bit32 lua std_normalize ];
|
propagatedBuildInputs = [ bit32 lua std_normalize ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/luaposix/luaposix/";
|
homepage = "https://github.com/luaposix/luaposix/";
|
||||||
description = "Lua bindings for POSIX";
|
description = "Lua bindings for POSIX";
|
||||||
maintainers = with maintainers; [ vyp lblasc ];
|
maintainers = with maintainers; [ vyp lblasc ];
|
||||||
@ -243,4 +243,3 @@ Following rules should be respected:
|
|||||||
|
|
||||||
* Make sure libraries build for all Lua interpreters.
|
* Make sure libraries build for all Lua interpreters.
|
||||||
* Commit names of Lua libraries should reflect that they are Lua libraries, so write for example `luaPackages.luafilesystem: 1.11 -> 1.12`.
|
* Commit names of Lua libraries should reflect that they are Lua libraries, so write for example `luaPackages.luafilesystem: 1.11 -> 1.12`.
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ The first step will be to build the Maven project as a fixed-output derivation i
|
|||||||
> Traditionally the Maven repository is at `~/.m2/repository`. We will override this to be the `$out` directory.
|
> Traditionally the Maven repository is at `~/.m2/repository`. We will override this to be the `$out` directory.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ stdenv, maven }:
|
{ stdenv, lib, maven }:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "maven-repository";
|
name = "maven-repository";
|
||||||
buildInputs = [ maven ];
|
buildInputs = [ maven ];
|
||||||
@ -139,7 +139,7 @@ stdenv.mkDerivation {
|
|||||||
outputHashAlgo = "sha256";
|
outputHashAlgo = "sha256";
|
||||||
outputHashMode = "recursive";
|
outputHashMode = "recursive";
|
||||||
# replace this with the correct SHA256
|
# replace this with the correct SHA256
|
||||||
outputHash = stdenv.lib.fakeSha256;
|
outputHash = lib.fakeSha256;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ Given that most of the OCaml ecosystem is now built with dune, nixpkgs includes
|
|||||||
Here is a simple package example. It defines an (optional) attribute `minimumOCamlVersion` that will be used to throw a descriptive evaluation error if building with an older OCaml is attempted. It uses the `fetchFromGitHub` fetcher to get its source. It sets the `doCheck` (optional) attribute to `true` which means that tests will be run with `dune runtest -p angstrom` after the build (`dune build -p angstrom`) is complete. It uses `alcotest` as a build input (because it is needed to run the tests) and `bigstringaf` and `result` as propagated build inputs (thus they will also be available to libraries depending on this library). The library will be installed using the `angstrom.install` file that dune generates.
|
Here is a simple package example. It defines an (optional) attribute `minimumOCamlVersion` that will be used to throw a descriptive evaluation error if building with an older OCaml is attempted. It uses the `fetchFromGitHub` fetcher to get its source. It sets the `doCheck` (optional) attribute to `true` which means that tests will be run with `dune runtest -p angstrom` after the build (`dune build -p angstrom`) is complete. It uses `alcotest` as a build input (because it is needed to run the tests) and `bigstringaf` and `result` as propagated build inputs (thus they will also be available to libraries depending on this library). The library will be installed using the `angstrom.install` file that dune generates.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ stdenv
|
{ lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, buildDunePackage
|
, buildDunePackage
|
||||||
, alcotest
|
, alcotest
|
||||||
@ -35,8 +35,8 @@ buildDunePackage rec {
|
|||||||
meta = {
|
meta = {
|
||||||
homepage = "https://github.com/inhabitedtype/angstrom";
|
homepage = "https://github.com/inhabitedtype/angstrom";
|
||||||
description = "OCaml parser combinators built for speed and memory efficiency";
|
description = "OCaml parser combinators built for speed and memory efficiency";
|
||||||
license = stdenv.lib.licenses.bsd3;
|
license = lib.licenses.bsd3;
|
||||||
maintainers = with stdenv.lib.maintainers; [ sternenseemann ];
|
maintainers = with lib.maintainers; [ sternenseemann ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -44,7 +44,7 @@ buildDunePackage rec {
|
|||||||
Here is a second example, this time using a source archive generated with `dune-release`. It is a good idea to use this archive when it is available as it will usually contain substituted variables such as a `%%VERSION%%` field. This library does not depend on any other OCaml library and no tests are run after building it.
|
Here is a second example, this time using a source archive generated with `dune-release`. It is a good idea to use this archive when it is available as it will usually contain substituted variables such as a `%%VERSION%%` field. This library does not depend on any other OCaml library and no tests are run after building it.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ stdenv
|
{ lib
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, buildDunePackage
|
, buildDunePackage
|
||||||
}:
|
}:
|
||||||
@ -60,7 +60,7 @@ buildDunePackage rec {
|
|||||||
sha256 = "1msg3vycd3k8qqj61sc23qks541cxpb97vrnrvrhjnqxsqnh6ygq";
|
sha256 = "1msg3vycd3k8qqj61sc23qks541cxpb97vrnrvrhjnqxsqnh6ygq";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/flowtype/ocaml-wtf8";
|
homepage = "https://github.com/flowtype/ocaml-wtf8";
|
||||||
description = "WTF-8 is a superset of UTF-8 that allows unpaired surrogates.";
|
description = "WTF-8 is a superset of UTF-8 that allows unpaired surrogates.";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
@ -110,7 +110,7 @@ ClassC3Componentised = buildPerlPackage rec {
|
|||||||
On Darwin, if a script has too many `-Idir` flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the `shortenPerlShebang` function from the `postInstall` phase:
|
On Darwin, if a script has too many `-Idir` flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the `shortenPerlShebang` function from the `postInstall` phase:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
|
{ stdenv, lib, buildPerlPackage, fetchurl, shortenPerlShebang }:
|
||||||
|
|
||||||
ImageExifTool = buildPerlPackage {
|
ImageExifTool = buildPerlPackage {
|
||||||
pname = "Image-ExifTool";
|
pname = "Image-ExifTool";
|
||||||
@ -121,8 +121,8 @@ ImageExifTool = buildPerlPackage {
|
|||||||
sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
|
sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
|
buildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
|
||||||
postInstall = stdenv.lib.optional stdenv.isDarwin ''
|
postInstall = lib.optional stdenv.isDarwin ''
|
||||||
shortenPerlShebang $out/bin/exiftool
|
shortenPerlShebang $out/bin/exiftool
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
@ -151,7 +151,7 @@ $ nix-generate-from-cpan XML::Simple
|
|||||||
propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ];
|
propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ];
|
||||||
meta = {
|
meta = {
|
||||||
description = "An API for simple XML files";
|
description = "An API for simple XML files";
|
||||||
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
|
license = with lib.licenses; [ artistic1 gpl1Plus ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
@ -105,6 +105,12 @@ mv cran-packages.nix.new cran-packages.nix
|
|||||||
|
|
||||||
Rscript generate-r-packages.R bioc > bioc-packages.nix.new
|
Rscript generate-r-packages.R bioc > bioc-packages.nix.new
|
||||||
mv bioc-packages.nix.new bioc-packages.nix
|
mv bioc-packages.nix.new bioc-packages.nix
|
||||||
|
|
||||||
|
Rscript generate-r-packages.R bioc-annotation > bioc-annotation-packages.nix.new
|
||||||
|
mv bioc-annotation-packages.nix.new bioc-annotation-packages.nix
|
||||||
|
|
||||||
|
Rscript generate-r-packages.R bioc-experiment > bioc-experiment-packages.nix.new
|
||||||
|
mv bioc-experiment-packages.nix.new bioc-experiment-packages.nix
|
||||||
```
|
```
|
||||||
|
|
||||||
`generate-r-packages.R <repo>` reads `<repo>-packages.nix`, therefor the renaming.
|
`generate-r-packages.R <repo>` reads `<repo>-packages.nix`, therefor the renaming.
|
||||||
|
@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
cargoSha256 = "03wf9r2csi6jpa7v5sw5lpxkrk4wfzwmzx7k3991q3bdjzcwnnwp";
|
cargoSha256 = "03wf9r2csi6jpa7v5sw5lpxkrk4wfzwmzx7k3991q3bdjzcwnnwp";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "A fast line-oriented regex search tool, similar to ag and ack";
|
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 = licenses.unlicense;
|
license = licenses.unlicense;
|
||||||
@ -58,13 +58,13 @@ then be taken from the failed build. A fake hash can be used for
|
|||||||
`cargoSha256` as follows:
|
`cargoSha256` as follows:
|
||||||
|
|
||||||
```
|
```
|
||||||
cargoSha256 = stdenv.lib.fakeSha256;
|
cargoSha256 = lib.fakeSha256;
|
||||||
```
|
```
|
||||||
|
|
||||||
For `cargoHash` you can use:
|
For `cargoHash` you can use:
|
||||||
|
|
||||||
```
|
```
|
||||||
cargoHash = stdenv.lib.fakeHash;
|
cargoHash = lib.fakeHash;
|
||||||
```
|
```
|
||||||
|
|
||||||
Per the instructions in the [Cargo Book](https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html)
|
Per the instructions in the [Cargo Book](https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<para>
|
<para>
|
||||||
Nix packages can declare <emphasis>meta-attributes</emphasis> that contain information about a package such as a description, its homepage, its license, and so on. For instance, the GNU Hello package has a <varname>meta</varname> declaration like this:
|
Nix packages can declare <emphasis>meta-attributes</emphasis> that contain information about a package such as a description, its homepage, its license, and so on. For instance, the GNU Hello package has a <varname>meta</varname> declaration like this:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "A program that produces a familiar, friendly greeting";
|
description = "A program that produces a familiar, friendly greeting";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
GNU Hello is a program that prints "Hello, world!" when you run it.
|
GNU Hello is a program that prints "Hello, world!" when you run it.
|
||||||
@ -155,7 +155,7 @@ hello-2.3 A program that produces a familiar, friendly greeting
|
|||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Single license referenced by attribute (preferred) <literal>stdenv.lib.licenses.gpl3Only</literal>.
|
Single license referenced by attribute (preferred) <literal>lib.licenses.gpl3Only</literal>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -170,7 +170,7 @@ hello-2.3 A program that produces a familiar, friendly greeting
|
|||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Multiple licenses referenced by attribute (preferred) <literal>with stdenv.lib.licenses; [ asl20 free ofl ]</literal>.
|
Multiple licenses referenced by attribute (preferred) <literal>with lib.licenses; [ asl20 free ofl ]</literal>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -211,9 +211,9 @@ hello-2.3 A program that produces a familiar, friendly greeting
|
|||||||
<para>
|
<para>
|
||||||
The list of Nix platform types on which the package is supported. Hydra builds packages according to the platform specified. If no platform is specified, the package does not have prebuilt binaries. An example is:
|
The list of Nix platform types on which the package is supported. Hydra builds packages according to the platform specified. If no platform is specified, the package does not have prebuilt binaries. An example is:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
meta.platforms = stdenv.lib.platforms.linux;
|
meta.platforms = lib.platforms.linux;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
Attribute Set <varname>stdenv.lib.platforms</varname> defines <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/systems/doubles.nix"> various common lists</link> of platforms types.
|
Attribute Set <varname>lib.platforms</varname> defines <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/systems/doubles.nix"> various common lists</link> of platforms types.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -262,7 +262,7 @@ meta.platforms = stdenv.lib.platforms.linux;
|
|||||||
<para>
|
<para>
|
||||||
The list of Nix platform types for which the Hydra instance at <literal>hydra.nixos.org</literal> will build the package. (Hydra is the Nix-based continuous build system.) It defaults to the value of <varname>meta.platforms</varname>. Thus, the only reason to set <varname>meta.hydraPlatforms</varname> is if you want <literal>hydra.nixos.org</literal> to build the package on a subset of <varname>meta.platforms</varname>, or not at all, e.g.
|
The list of Nix platform types for which the Hydra instance at <literal>hydra.nixos.org</literal> will build the package. (Hydra is the Nix-based continuous build system.) It defaults to the value of <varname>meta.platforms</varname>. Thus, the only reason to set <varname>meta.hydraPlatforms</varname> is if you want <literal>hydra.nixos.org</literal> to build the package on a subset of <varname>meta.platforms</varname>, or not at all, e.g.
|
||||||
<programlisting>
|
<programlisting>
|
||||||
meta.platforms = stdenv.lib.platforms.linux;
|
meta.platforms = lib.platforms.linux;
|
||||||
meta.hydraPlatforms = [];
|
meta.hydraPlatforms = [];
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
@ -294,7 +294,7 @@ meta.hydraPlatforms = [];
|
|||||||
<title>Licenses</title>
|
<title>Licenses</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <varname>meta.license</varname> attribute should preferrably contain a value from <varname>stdenv.lib.licenses</varname> defined in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix"> <filename>nixpkgs/lib/licenses.nix</filename></link>, or in-place license description of the same format if the license is unlikely to be useful in another expression.
|
The <varname>meta.license</varname> attribute should preferrably contain a value from <varname>lib.licenses</varname> defined in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix"> <filename>nixpkgs/lib/licenses.nix</filename></link>, or in-place license description of the same format if the license is unlikely to be useful in another expression.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -302,7 +302,7 @@ meta.hydraPlatforms = [];
|
|||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<varname>stdenv.lib.licenses.free</varname>, <varname>"free"</varname>
|
<varname>lib.licenses.free</varname>, <varname>"free"</varname>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
@ -312,7 +312,7 @@ meta.hydraPlatforms = [];
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<varname>stdenv.lib.licenses.unfreeRedistributable</varname>, <varname>"unfree-redistributable"</varname>
|
<varname>lib.licenses.unfreeRedistributable</varname>, <varname>"unfree-redistributable"</varname>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
@ -325,7 +325,7 @@ meta.hydraPlatforms = [];
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<varname>stdenv.lib.licenses.unfree</varname>, <varname>"unfree"</varname>
|
<varname>lib.licenses.unfree</varname>, <varname>"unfree"</varname>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
@ -335,7 +335,7 @@ meta.hydraPlatforms = [];
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<varname>stdenv.lib.licenses.unfreeRedistributableFirmware</varname>, <varname>"unfree-redistributable-firmware"</varname>
|
<varname>lib.licenses.unfreeRedistributableFirmware</varname>, <varname>"unfree-redistributable-firmware"</varname>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
@ -32,7 +32,7 @@ stdenv.mkDerivation {
|
|||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "libfoo-1.2.3";
|
name = "libfoo-1.2.3";
|
||||||
# ...
|
# ...
|
||||||
makeFlags = stdenv.lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libfoo.dylib";
|
makeFlags = lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libfoo.dylib";
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -157,7 +157,7 @@
|
|||||||
The following example configuration whitelists the licenses <literal>amd</literal> and <literal>wtfpl</literal>:
|
The following example configuration whitelists the licenses <literal>amd</literal> and <literal>wtfpl</literal>:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{
|
{
|
||||||
whitelistedLicenses = with stdenv.lib.licenses; [ amd wtfpl ];
|
whitelistedLicenses = with lib.licenses; [ amd wtfpl ];
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
@ -165,7 +165,7 @@
|
|||||||
The following example configuration blacklists the <literal>gpl3Only</literal> and <literal>agpl3Only</literal> licenses:
|
The following example configuration blacklists the <literal>gpl3Only</literal> and <literal>agpl3Only</literal> licenses:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{
|
{
|
||||||
blacklistedLicenses = with stdenv.lib.licenses; [ agpl3Only gpl3Only ];
|
blacklistedLicenses = with lib.licenses; [ agpl3Only gpl3Only ];
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
@ -5490,6 +5490,12 @@
|
|||||||
githubId = 346094;
|
githubId = 346094;
|
||||||
name = "Michael Alyn Miller";
|
name = "Michael Alyn Miller";
|
||||||
};
|
};
|
||||||
|
manojkarthick = {
|
||||||
|
email = "smanojkarthick@gmail.com";
|
||||||
|
github = "manojkarthick";
|
||||||
|
githubId = 7802795;
|
||||||
|
name = "Manoj Karthick";
|
||||||
|
};
|
||||||
manveru = {
|
manveru = {
|
||||||
email = "m.fellinger@gmail.com";
|
email = "m.fellinger@gmail.com";
|
||||||
github = "manveru";
|
github = "manveru";
|
||||||
@ -5911,6 +5917,12 @@
|
|||||||
githubId = 1387206;
|
githubId = 1387206;
|
||||||
name = "Mike Sperber";
|
name = "Mike Sperber";
|
||||||
};
|
};
|
||||||
|
milesbreslin = {
|
||||||
|
email = "milesbreslin@gmail.com";
|
||||||
|
github = "milesbreslin";
|
||||||
|
githubId = 38543128;
|
||||||
|
name = "Miles Breslin";
|
||||||
|
};
|
||||||
millerjason = {
|
millerjason = {
|
||||||
email = "mailings-github@millerjason.com";
|
email = "mailings-github@millerjason.com";
|
||||||
github = "millerjason";
|
github = "millerjason";
|
||||||
|
@ -309,7 +309,7 @@ sub render_license {
|
|||||||
# "GPL v2" or to "GPL v2 or later".
|
# "GPL v2" or to "GPL v2 or later".
|
||||||
my $amb = 0;
|
my $amb = 0;
|
||||||
|
|
||||||
# Whether the license is available inside `stdenv.lib.licenses`.
|
# Whether the license is available inside `lib.licenses`.
|
||||||
my $in_set = 1;
|
my $in_set = 1;
|
||||||
|
|
||||||
my $nix_license = $LICENSE_MAP{$cpan_license};
|
my $nix_license = $LICENSE_MAP{$cpan_license};
|
||||||
@ -331,7 +331,7 @@ sub render_license {
|
|||||||
# Avoid defining the license line.
|
# Avoid defining the license line.
|
||||||
}
|
}
|
||||||
elsif ($in_set) {
|
elsif ($in_set) {
|
||||||
my $lic = 'stdenv.lib.licenses';
|
my $lic = 'lib.licenses';
|
||||||
if ( @$licenses == 1 ) {
|
if ( @$licenses == 1 ) {
|
||||||
$license_line = "$lic.$licenses->[0]";
|
$license_line = "$lic.$licenses->[0]";
|
||||||
}
|
}
|
||||||
@ -449,7 +449,7 @@ print <<EOF;
|
|||||||
meta = {
|
meta = {
|
||||||
EOF
|
EOF
|
||||||
print <<EOF if defined $homepage;
|
print <<EOF if defined $homepage;
|
||||||
homepage = $homepage;
|
homepage = "$homepage";
|
||||||
EOF
|
EOF
|
||||||
print <<EOF if defined $description && $description ne "Unknown";
|
print <<EOF if defined $description && $description ne "Unknown";
|
||||||
description = "$description";
|
description = "$description";
|
||||||
|
@ -1343,6 +1343,14 @@ CREATE ROLE postgres LOGIN SUPERUSER;
|
|||||||
It was chosen to do this as it has a usability breaking issue (see issue <link xlink:href="https://github.com/NixOS/nixpkgs/issues/98819">#98819</link>)
|
It was chosen to do this as it has a usability breaking issue (see issue <link xlink:href="https://github.com/NixOS/nixpkgs/issues/98819">#98819</link>)
|
||||||
that makes it unsuitable to be a default app.
|
that makes it unsuitable to be a default app.
|
||||||
</para>
|
</para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
Issue <link
|
||||||
|
xlink:href="https://github.com/NixOS/nixpkgs/issues/98819">#98819</link>
|
||||||
|
is now fixed and <package>gnome3.epiphany</package> is once
|
||||||
|
again installed by default.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
@ -107,6 +107,15 @@
|
|||||||
user D-Bus session available also for non-graphical logins.
|
user D-Bus session available also for non-graphical logins.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The <varname>networking.wireless.iwd</varname> module now installs
|
||||||
|
the upstream-provided 80-iwd.link file, which sets the NamePolicy=
|
||||||
|
for all wlan devices to "keep kernel", to avoid race conditions
|
||||||
|
between iwd and networkd. If you don't want this, you can set
|
||||||
|
<literal>systemd.network.links."80-iwd" = lib.mkForce {}</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<literal>rubyMinimal</literal> was removed due to being unused and
|
<literal>rubyMinimal</literal> was removed due to being unused and
|
||||||
@ -176,6 +185,30 @@
|
|||||||
with <literal>mkfs.xfs -m reflink=0</literal>.
|
with <literal>mkfs.xfs -m reflink=0</literal>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The uWSGI server is now built with POSIX capabilities. As a consequence,
|
||||||
|
root is no longer required in emperor mode and the service defaults to
|
||||||
|
running as the unprivileged <literal>uwsgi</literal> user. Any additional
|
||||||
|
capability can be added via the new option
|
||||||
|
<xref linkend="opt-services.uwsgi.capabilities"/>.
|
||||||
|
The previous behaviour can be restored by setting:
|
||||||
|
<programlisting>
|
||||||
|
<xref linkend="opt-services.uwsgi.user"/> = "root";
|
||||||
|
<xref linkend="opt-services.uwsgi.group"/> = "root";
|
||||||
|
<xref linkend="opt-services.uwsgi.instance"/> =
|
||||||
|
{
|
||||||
|
uid = "uwsgi";
|
||||||
|
gid = "uwsgi";
|
||||||
|
};
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Another incompatibility from the previous release is that vassals running under a
|
||||||
|
different user or group need to use <literal>immediate-{uid,gid}</literal>
|
||||||
|
instead of the usual <literal>uid,gid</literal> options.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<package>btc1</package> has been abandoned upstream, and removed.
|
<package>btc1</package> has been abandoned upstream, and removed.
|
||||||
@ -321,8 +354,8 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<package>fish-foreign-env</package> is now an alias for the
|
The <package>fish-foreign-env</package> package has been replaced with
|
||||||
<package>fishPlugins.foreign-env</package> package, in which the fish
|
<package>fishPlugins.foreign-env</package>, in which the fish
|
||||||
functions have been relocated to the
|
functions have been relocated to the
|
||||||
<literal>vendor_functions.d</literal> directory to be loaded automatically.
|
<literal>vendor_functions.d</literal> directory to be loaded automatically.
|
||||||
</para>
|
</para>
|
||||||
@ -353,6 +386,22 @@ http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/e
|
|||||||
official documentation</link> of the json_exporter.
|
official documentation</link> of the json_exporter.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Androidenv was updated, removing the <literal>includeDocs</literal> and <literal>lldbVersions</literal>
|
||||||
|
arguments. Docs only covered a single version of the Android SDK, LLDB is now bundled with the NDK,
|
||||||
|
and both are no longer available to download from the Android package repositories. Additionally, since
|
||||||
|
the package lists have been updated, some older versions of Android packages may not be bundled. If you
|
||||||
|
depend on older versions of Android packages, we recommend overriding the repo.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Android packages are now loaded from a repo.json file created by parsing Android repo XML files. The arguments
|
||||||
|
<literal>repoJson</literal> and <literal>repoXmls</literal> have been added to allow overriding the built-in
|
||||||
|
androidenv repo.json with your own. Additionally, license files are now written to allow compatibility
|
||||||
|
with Gradle-based tools, and the <literal>extraLicenses</literal> argument has been added to accept more
|
||||||
|
SDK licenses if your project requires it. See the androidenv documentation for more details.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -504,6 +553,17 @@ http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/e
|
|||||||
The option's description was incorrect regarding ownership management and has been simplified greatly.
|
The option's description was incorrect regarding ownership management and has been simplified greatly.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The GNOME desktop manager once again installs <package>gnome3.epiphany</package> by default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
NixOS now generates empty <literal>/etc/netgroup</literal>.
|
||||||
|
<literal>/etc/netgroup</literal> defines network-wide groups and may affect to setups using NIS.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
@ -193,6 +193,10 @@ in
|
|||||||
cat ${escapeShellArgs cfg.hostFiles} > $out
|
cat ${escapeShellArgs cfg.hostFiles} > $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# /etc/netgroup: Network-wide groups.
|
||||||
|
netgroup.text = mkDefault ''
|
||||||
|
'';
|
||||||
|
|
||||||
# /etc/host.conf: resolver configuration file
|
# /etc/host.conf: resolver configuration file
|
||||||
"host.conf".text = ''
|
"host.conf".text = ''
|
||||||
multi on
|
multi on
|
||||||
|
@ -5,6 +5,8 @@ let
|
|||||||
cfg = config.hardware.opentabletdriver;
|
cfg = config.hardware.opentabletdriver;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
meta.maintainers = with lib.maintainers; [ thiagokokada ];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
hardware.opentabletdriver = {
|
hardware.opentabletdriver = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
@ -29,7 +29,7 @@ in
|
|||||||
options.i18n = {
|
options.i18n = {
|
||||||
inputMethod = {
|
inputMethod = {
|
||||||
enabled = mkOption {
|
enabled = mkOption {
|
||||||
type = types.nullOr (types.enum [ "ibus" "fcitx" "nabi" "uim" "hime" ]);
|
type = types.nullOr (types.enum [ "ibus" "fcitx" "fcitx5" "nabi" "uim" "hime" ]);
|
||||||
default = null;
|
default = null;
|
||||||
example = "fcitx";
|
example = "fcitx";
|
||||||
description = ''
|
description = ''
|
||||||
|
33
nixos/modules/i18n/input-method/fcitx5.nix
Normal file
33
nixos/modules/i18n/input-method/fcitx5.nix
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
im = config.i18n.inputMethod;
|
||||||
|
cfg = im.fcitx5;
|
||||||
|
fcitx5Package = pkgs.fcitx5-with-addons.override { inherit (cfg) addons; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
i18n.inputMethod.fcitx5 = {
|
||||||
|
addons = mkOption {
|
||||||
|
type = with types; listOf package;
|
||||||
|
default = [];
|
||||||
|
example = with pkgs; [ fcitx5-rime ];
|
||||||
|
description = ''
|
||||||
|
Enabled Fcitx5 addons.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf (im.enabled == "fcitx5") {
|
||||||
|
i18n.inputMethod.package = fcitx5Package;
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
GTK_IM_MODULE = "fcitx";
|
||||||
|
QT_IM_MODULE = "fcitx";
|
||||||
|
XMODIFIERS = "@im=fcitx";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -82,6 +82,7 @@
|
|||||||
./hardware/xpadneo.nix
|
./hardware/xpadneo.nix
|
||||||
./i18n/input-method/default.nix
|
./i18n/input-method/default.nix
|
||||||
./i18n/input-method/fcitx.nix
|
./i18n/input-method/fcitx.nix
|
||||||
|
./i18n/input-method/fcitx5.nix
|
||||||
./i18n/input-method/hime.nix
|
./i18n/input-method/hime.nix
|
||||||
./i18n/input-method/ibus.nix
|
./i18n/input-method/ibus.nix
|
||||||
./i18n/input-method/nabi.nix
|
./i18n/input-method/nabi.nix
|
||||||
@ -101,6 +102,7 @@
|
|||||||
./misc/version.nix
|
./misc/version.nix
|
||||||
./misc/nixops-autoluks.nix
|
./misc/nixops-autoluks.nix
|
||||||
./programs/adb.nix
|
./programs/adb.nix
|
||||||
|
./programs/appgate-sdp.nix
|
||||||
./programs/atop.nix
|
./programs/atop.nix
|
||||||
./programs/autojump.nix
|
./programs/autojump.nix
|
||||||
./programs/bandwhich.nix
|
./programs/bandwhich.nix
|
||||||
@ -226,6 +228,7 @@
|
|||||||
./services/audio/icecast.nix
|
./services/audio/icecast.nix
|
||||||
./services/audio/liquidsoap.nix
|
./services/audio/liquidsoap.nix
|
||||||
./services/audio/mpd.nix
|
./services/audio/mpd.nix
|
||||||
|
./services/audio/mpdscribble.nix
|
||||||
./services/audio/mopidy.nix
|
./services/audio/mopidy.nix
|
||||||
./services/audio/roon-server.nix
|
./services/audio/roon-server.nix
|
||||||
./services/audio/slimserver.nix
|
./services/audio/slimserver.nix
|
||||||
@ -492,6 +495,7 @@
|
|||||||
./services/misc/nix-ssh-serve.nix
|
./services/misc/nix-ssh-serve.nix
|
||||||
./services/misc/novacomd.nix
|
./services/misc/novacomd.nix
|
||||||
./services/misc/nzbget.nix
|
./services/misc/nzbget.nix
|
||||||
|
./services/misc/nzbhydra2.nix
|
||||||
./services/misc/octoprint.nix
|
./services/misc/octoprint.nix
|
||||||
./services/misc/osrm.nix
|
./services/misc/osrm.nix
|
||||||
./services/misc/packagekit.nix
|
./services/misc/packagekit.nix
|
||||||
|
@ -10,6 +10,14 @@ let
|
|||||||
gid = config.ids.gids.mpd;
|
gid = config.ids.gids.mpd;
|
||||||
cfg = config.services.mpd;
|
cfg = config.services.mpd;
|
||||||
|
|
||||||
|
credentialsPlaceholder = (creds:
|
||||||
|
let
|
||||||
|
placeholders = (imap0
|
||||||
|
(i: c: ''password "{{password-${toString i}}}@${concatStringsSep "," c.permissions}"'')
|
||||||
|
creds);
|
||||||
|
in
|
||||||
|
concatStringsSep "\n" placeholders);
|
||||||
|
|
||||||
mpdConf = pkgs.writeText "mpd.conf" ''
|
mpdConf = pkgs.writeText "mpd.conf" ''
|
||||||
# This file was automatically generated by NixOS. Edit mpd's configuration
|
# This file was automatically generated by NixOS. Edit mpd's configuration
|
||||||
# via NixOS' configuration.nix, as this file will be rewritten upon mpd's
|
# via NixOS' configuration.nix, as this file will be rewritten upon mpd's
|
||||||
@ -32,6 +40,8 @@ let
|
|||||||
}
|
}
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
${optionalString (cfg.credentials != []) (credentialsPlaceholder cfg.credentials)}
|
||||||
|
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -152,16 +162,35 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
credentialsFile = mkOption {
|
credentials = mkOption {
|
||||||
type = types.path;
|
type = types.listOf (types.submodule {
|
||||||
|
options = {
|
||||||
|
passwordFile = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
description = ''
|
||||||
|
Path to file containing the password.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
permissions = let
|
||||||
|
perms = ["read" "add" "control" "admin"];
|
||||||
|
in mkOption {
|
||||||
|
type = types.listOf (types.enum perms);
|
||||||
|
default = [ "read" ];
|
||||||
|
description = ''
|
||||||
|
List of permissions that are granted with this password.
|
||||||
|
Permissions can be "${concatStringsSep "\", \"" perms}".
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
description = ''
|
description = ''
|
||||||
Path to a file to be merged with the settings during the service startup.
|
Credentials and permissions for accessing the mpd server.
|
||||||
Useful to merge a file which is better kept out of the Nix store
|
|
||||||
because it contains sensible data like MPD's password. Example may look like this:
|
|
||||||
<literal>password "myMpdPassword@read,add,control,admin"</literal>
|
|
||||||
'';
|
'';
|
||||||
default = "/dev/null";
|
default = [];
|
||||||
example = "/var/lib/secrets/mpd.conf";
|
example = [
|
||||||
|
{passwordFile = "/var/lib/secrets/mpd_readonly_password"; permissions = [ "read" ];}
|
||||||
|
{passwordFile = "/var/lib/secrets/mpd_admin_password"; permissions = ["read" "add" "control" "admin"];}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fluidsynth = mkOption {
|
fluidsynth = mkOption {
|
||||||
@ -201,12 +230,16 @@ in {
|
|||||||
serviceConfig = mkMerge [
|
serviceConfig = mkMerge [
|
||||||
{
|
{
|
||||||
User = "${cfg.user}";
|
User = "${cfg.user}";
|
||||||
ExecStart = "${pkgs.mpd}/bin/mpd --no-daemon /etc/mpd.conf";
|
ExecStart = "${pkgs.mpd}/bin/mpd --no-daemon /run/mpd/mpd.conf";
|
||||||
ExecStartPre = pkgs.writeScript "mpd-start-pre" ''
|
ExecStartPre = pkgs.writeShellScript "mpd-start-pre" ''
|
||||||
#!${pkgs.runtimeShell}
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
cat ${mpdConf} ${cfg.credentialsFile} > /etc/mpd.conf
|
install -m 600 ${mpdConf} /run/mpd/mpd.conf
|
||||||
|
${optionalString (cfg.credentials != [])
|
||||||
|
"${pkgs.replace}/bin/replace-literal -fe ${
|
||||||
|
concatStringsSep " -a " (imap0 (i: c: "\"{{password-${toString i}}}\" \"$(cat ${c.passwordFile})\"") cfg.credentials)
|
||||||
|
} /run/mpd/mpd.conf"}
|
||||||
'';
|
'';
|
||||||
|
RuntimeDirectory = "mpd";
|
||||||
Type = "notify";
|
Type = "notify";
|
||||||
LimitRTPRIO = 50;
|
LimitRTPRIO = 50;
|
||||||
LimitRTTIME = "infinity";
|
LimitRTTIME = "infinity";
|
||||||
@ -230,14 +263,6 @@ in {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
environment.etc."mpd.conf" = {
|
|
||||||
mode = "0640";
|
|
||||||
group = cfg.group;
|
|
||||||
user = cfg.user;
|
|
||||||
# To be modified by the service' ExecStartPre
|
|
||||||
text = ''
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users = optionalAttrs (cfg.user == name) {
|
users.users = optionalAttrs (cfg.user == name) {
|
||||||
${name} = {
|
${name} = {
|
||||||
|
202
nixos/modules/services/audio/mpdscribble.nix
Normal file
202
nixos/modules/services/audio/mpdscribble.nix
Normal file
@ -0,0 +1,202 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.mpdscribble;
|
||||||
|
mpdCfg = config.services.mpd;
|
||||||
|
|
||||||
|
endpointUrls = {
|
||||||
|
"last.fm" = "http://post.audioscrobbler.com";
|
||||||
|
"libre.fm" = "http://turtle.libre.fm";
|
||||||
|
"jamendo" = "http://postaudioscrobbler.jamendo.com";
|
||||||
|
"listenbrainz" = "http://proxy.listenbrainz.org";
|
||||||
|
};
|
||||||
|
|
||||||
|
mkSection = secname: secCfg: ''
|
||||||
|
[${secname}]
|
||||||
|
url = ${secCfg.url}
|
||||||
|
username = ${secCfg.username}
|
||||||
|
password = {{${secname}_PASSWORD}}
|
||||||
|
journal = /var/lib/mpdscribble/${secname}.journal
|
||||||
|
'';
|
||||||
|
|
||||||
|
endpoints = concatStringsSep "\n" (mapAttrsToList mkSection cfg.endpoints);
|
||||||
|
cfgTemplate = pkgs.writeText "mpdscribble.conf" ''
|
||||||
|
## This file was automatically genenrated by NixOS and will be overwritten.
|
||||||
|
## Do not edit. Edit your NixOS configuration instead.
|
||||||
|
|
||||||
|
## mpdscribble - an audioscrobbler for the Music Player Daemon.
|
||||||
|
## http://mpd.wikia.com/wiki/Client:mpdscribble
|
||||||
|
|
||||||
|
# HTTP proxy URL.
|
||||||
|
${optionalString (cfg.proxy != null) "proxy = ${cfg.proxy}"}
|
||||||
|
|
||||||
|
# The location of the mpdscribble log file. The special value
|
||||||
|
# "syslog" makes mpdscribble use the local syslog daemon. On most
|
||||||
|
# systems, log messages will appear in /var/log/daemon.log then.
|
||||||
|
# "-" means log to stderr (the current terminal).
|
||||||
|
log = -
|
||||||
|
|
||||||
|
# How verbose mpdscribble's logging should be. Default is 1.
|
||||||
|
verbose = ${toString cfg.verbose}
|
||||||
|
|
||||||
|
# How often should mpdscribble save the journal file? [seconds]
|
||||||
|
journal_interval = ${toString cfg.journalInterval}
|
||||||
|
|
||||||
|
# The host running MPD, possibly protected by a password
|
||||||
|
# ([PASSWORD@]HOSTNAME).
|
||||||
|
host = ${(optionalString (cfg.passwordFile != null) "{{MPD_PASSWORD}}@") + cfg.host}
|
||||||
|
|
||||||
|
# The port that the MPD listens on and mpdscribble should try to
|
||||||
|
# connect to.
|
||||||
|
port = ${toString cfg.port}
|
||||||
|
|
||||||
|
${endpoints}
|
||||||
|
'';
|
||||||
|
|
||||||
|
cfgFile = "/run/mpdscribble/mpdscribble.conf";
|
||||||
|
|
||||||
|
replaceSecret = secretFile: placeholder: targetFile:
|
||||||
|
optionalString (secretFile != null) ''
|
||||||
|
${pkgs.replace}/bin/replace-literal -ef ${placeholder} "$(cat ${secretFile})" ${targetFile}'';
|
||||||
|
|
||||||
|
preStart = pkgs.writeShellScript "mpdscribble-pre-start" ''
|
||||||
|
cp -f "${cfgTemplate}" "${cfgFile}"
|
||||||
|
${replaceSecret cfg.passwordFile "{{MPD_PASSWORD}}" cfgFile}
|
||||||
|
${concatStringsSep "\n" (mapAttrsToList (secname: cfg:
|
||||||
|
replaceSecret cfg.passwordFile "{{${secname}_PASSWORD}}" cfgFile)
|
||||||
|
cfg.endpoints)}
|
||||||
|
'';
|
||||||
|
|
||||||
|
localMpd = (cfg.host == "localhost" || cfg.host == "127.0.0.1");
|
||||||
|
|
||||||
|
in {
|
||||||
|
###### interface
|
||||||
|
|
||||||
|
options.services.mpdscribble = {
|
||||||
|
|
||||||
|
enable = mkEnableOption "mpdscribble";
|
||||||
|
|
||||||
|
proxy = mkOption {
|
||||||
|
default = null;
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = ''
|
||||||
|
HTTP proxy URL.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
verbose = mkOption {
|
||||||
|
default = 1;
|
||||||
|
type = types.int;
|
||||||
|
description = ''
|
||||||
|
Log level for the mpdscribble daemon.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
journalInterval = mkOption {
|
||||||
|
default = 600;
|
||||||
|
example = 60;
|
||||||
|
type = types.int;
|
||||||
|
description = ''
|
||||||
|
How often should mpdscribble save the journal file? [seconds]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
host = mkOption {
|
||||||
|
default = (if mpdCfg.network.listenAddress != "any" then
|
||||||
|
mpdCfg.network.listenAddress
|
||||||
|
else
|
||||||
|
"localhost");
|
||||||
|
type = types.str;
|
||||||
|
description = ''
|
||||||
|
Host for the mpdscribble daemon to search for a mpd daemon on.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
passwordFile = mkOption {
|
||||||
|
default = if localMpd then
|
||||||
|
(findFirst
|
||||||
|
(c: any (x: x == "read") c.permissions)
|
||||||
|
{ passwordFile = null; }
|
||||||
|
mpdCfg.credentials).passwordFile
|
||||||
|
else
|
||||||
|
null;
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = ''
|
||||||
|
File containing the password for the mpd daemon.
|
||||||
|
If there is a local mpd configured using <option>services.mpd.credentials</option>
|
||||||
|
the default is automatically set to a matching passwordFile of the local mpd.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
port = mkOption {
|
||||||
|
default = mpdCfg.network.port;
|
||||||
|
type = types.port;
|
||||||
|
description = ''
|
||||||
|
Port for the mpdscribble daemon to search for a mpd daemon on.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
endpoints = mkOption {
|
||||||
|
type = (let
|
||||||
|
endpoint = { name, ... }: {
|
||||||
|
options = {
|
||||||
|
url = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = endpointUrls.${name} or "";
|
||||||
|
description =
|
||||||
|
"The url endpoint where the scrobble API is listening.";
|
||||||
|
};
|
||||||
|
username = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = ''
|
||||||
|
Username for the scrobble service.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
passwordFile = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description =
|
||||||
|
"File containing the password, either as MD5SUM or cleartext.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in types.attrsOf (types.submodule endpoint));
|
||||||
|
default = { };
|
||||||
|
example = {
|
||||||
|
"last.fm" = {
|
||||||
|
username = "foo";
|
||||||
|
passwordFile = "/run/secrets/lastfm_password";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
description = ''
|
||||||
|
Endpoints to scrobble to.
|
||||||
|
If the endpoint is one of "${
|
||||||
|
concatStringsSep "\", \"" (attrNames endpointUrls)
|
||||||
|
}" the url is set automatically.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.services.mpdscribble = {
|
||||||
|
after = [ "network.target" ] ++ (optional localMpd "mpd.service");
|
||||||
|
description = "mpdscribble mpd scrobble client";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
DynamicUser = true;
|
||||||
|
StateDirectory = "mpdscribble";
|
||||||
|
RuntimeDirectory = "mpdscribble";
|
||||||
|
RuntimeDirectoryMode = "700";
|
||||||
|
# TODO use LoadCredential= instead of running preStart with full privileges?
|
||||||
|
ExecStartPre = "+${preStart}";
|
||||||
|
ExecStart =
|
||||||
|
"${pkgs.mpdscribble}/bin/mpdscribble --no-daemon --conf ${cfgFile}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -29,13 +29,7 @@ in
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.tarsnap = {
|
services.tarsnap = {
|
||||||
enable = mkOption {
|
enable = mkEnableOption "periodic tarsnap backups";
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Enable periodic tarsnap backups.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
keyfile = mkOption {
|
keyfile = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
@ -279,7 +273,8 @@ in
|
|||||||
Tarsnap archive configurations. Each attribute names an archive
|
Tarsnap archive configurations. Each attribute names an archive
|
||||||
to be created at a given time interval, according to the options
|
to be created at a given time interval, according to the options
|
||||||
associated with it. When uploading to the tarsnap server,
|
associated with it. When uploading to the tarsnap server,
|
||||||
archive names are suffixed by a 1 second resolution timestamp.
|
archive names are suffixed by a 1 second resolution timestamp,
|
||||||
|
with the format <literal>%Y%m%d%H%M%S</literal>.
|
||||||
|
|
||||||
For each member of the set is created a timer which triggers the
|
For each member of the set is created a timer which triggers the
|
||||||
instanced <literal>tarsnap-archive-name</literal> service unit. You may use
|
instanced <literal>tarsnap-archive-name</literal> service unit. You may use
|
||||||
|
@ -605,5 +605,5 @@ in
|
|||||||
timerConfig.OnCalendar = cfg.dump.interval;
|
timerConfig.OnCalendar = cfg.dump.interval;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
meta.maintainers = with lib.maintainers; [ srhb ];
|
meta.maintainers = with lib.maintainers; [ srhb ma27 ];
|
||||||
}
|
}
|
||||||
|
78
nixos/modules/services/misc/nzbhydra2.nix
Normal file
78
nixos/modules/services/misc/nzbhydra2.nix
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let cfg = config.services.nzbhydra2;
|
||||||
|
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
services.nzbhydra2 = {
|
||||||
|
enable = mkEnableOption "NZBHydra2";
|
||||||
|
|
||||||
|
dataDir = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/var/lib/nzbhydra2";
|
||||||
|
description = "The directory where NZBHydra2 stores its data files.";
|
||||||
|
};
|
||||||
|
|
||||||
|
openFirewall = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description =
|
||||||
|
"Open ports in the firewall for the NZBHydra2 web interface.";
|
||||||
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.nzbhydra2;
|
||||||
|
defaultText = "pkgs.nzbhydra2";
|
||||||
|
description = "NZBHydra2 package to use.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.tmpfiles.rules =
|
||||||
|
[ "d '${cfg.dataDir}' 0700 nzbhydra2 nzbhydra2 - -" ];
|
||||||
|
|
||||||
|
systemd.services.nzbhydra2 = {
|
||||||
|
description = "NZBHydra2";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
User = "nzbhydra2";
|
||||||
|
Group = "nzbhydra2";
|
||||||
|
ExecStart =
|
||||||
|
"${cfg.package}/bin/nzbhydra2 --nobrowser --datafolder '${cfg.dataDir}'";
|
||||||
|
Restart = "on-failure";
|
||||||
|
# Hardening
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
PrivateTmp = true;
|
||||||
|
PrivateDevices = true;
|
||||||
|
DevicePolicy = "closed";
|
||||||
|
ProtectSystem = "strict";
|
||||||
|
ReadWritePaths = cfg.dataDir;
|
||||||
|
ProtectHome = "read-only";
|
||||||
|
ProtectControlGroups = true;
|
||||||
|
ProtectKernelModules = true;
|
||||||
|
ProtectKernelTunables = true;
|
||||||
|
RestrictAddressFamilies ="AF_UNIX AF_INET AF_INET6 AF_NETLINK";
|
||||||
|
RestrictNamespaces = true;
|
||||||
|
RestrictRealtime = true;
|
||||||
|
RestrictSUIDSGID = true;
|
||||||
|
LockPersonality = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall = mkIf cfg.openFirewall { allowedTCPPorts = [ 5076 ]; };
|
||||||
|
|
||||||
|
users.users.nzbhydra2 = {
|
||||||
|
group = "nzbhydra2";
|
||||||
|
isSystemUser = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.nzbhydra2 = {};
|
||||||
|
};
|
||||||
|
}
|
@ -370,6 +370,14 @@ let
|
|||||||
List of file service discovery configurations.
|
List of file service discovery configurations.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
gce_sd_configs = mkOpt (types.listOf promTypes.gce_sd_config) ''
|
||||||
|
List of Google Compute Engine service discovery configurations.
|
||||||
|
|
||||||
|
See <link
|
||||||
|
xlink:href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/#gce_sd_config">the
|
||||||
|
relevant Prometheus configuration docs</link> for more detail.
|
||||||
|
'';
|
||||||
|
|
||||||
static_configs = mkOpt (types.listOf promTypes.static_config) ''
|
static_configs = mkOpt (types.listOf promTypes.static_config) ''
|
||||||
List of labeled target groups for this job.
|
List of labeled target groups for this job.
|
||||||
'';
|
'';
|
||||||
@ -555,6 +563,52 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
promTypes.gce_sd_config = types.submodule {
|
||||||
|
options = {
|
||||||
|
# Use `mkOption` instead of `mkOpt` for project and zone because they are
|
||||||
|
# required configuration values for `gce_sd_config`.
|
||||||
|
project = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = ''
|
||||||
|
The GCP Project.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
zone = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = ''
|
||||||
|
The zone of the scrape targets. If you need multiple zones use multiple
|
||||||
|
gce_sd_configs.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
filter = mkOpt types.str ''
|
||||||
|
Filter can be used optionally to filter the instance list by other
|
||||||
|
criteria Syntax of this filter string is described here in the filter
|
||||||
|
query parameter section: <link
|
||||||
|
xlink:href="https://cloud.google.com/compute/docs/reference/latest/instances/list"
|
||||||
|
/>.
|
||||||
|
'';
|
||||||
|
|
||||||
|
refresh_interval = mkDefOpt types.str "60s" ''
|
||||||
|
Refresh interval to re-read the cloud instance list.
|
||||||
|
'';
|
||||||
|
|
||||||
|
port = mkDefOpt types.port "80" ''
|
||||||
|
The port to scrape metrics from. If using the public IP address, this
|
||||||
|
must instead be specified in the relabeling rule.
|
||||||
|
'';
|
||||||
|
|
||||||
|
tag_separator = mkDefOpt types.str "," ''
|
||||||
|
The tag separator used to separate concatenated GCE instance network tags.
|
||||||
|
|
||||||
|
See the GCP documentation on network tags for more information: <link
|
||||||
|
xlink:href="https://cloud.google.com/vpc/docs/add-remove-network-tags"
|
||||||
|
/>
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
promTypes.relabel_config = types.submodule {
|
promTypes.relabel_config = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
source_labels = mkOpt (types.listOf types.str) ''
|
source_labels = mkOpt (types.listOf types.str) ''
|
||||||
|
@ -22,6 +22,11 @@ in {
|
|||||||
|
|
||||||
systemd.packages = [ pkgs.iwd ];
|
systemd.packages = [ pkgs.iwd ];
|
||||||
|
|
||||||
|
systemd.network.links."80-iwd" = {
|
||||||
|
matchConfig.Type = "wlan";
|
||||||
|
linkConfig.NamePolicy = "keep kernel";
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.iwd.wantedBy = [ "multi-user.target" ];
|
systemd.services.iwd.wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43,9 +43,9 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
services.dbus.packages = [ pkgs.fprintd ];
|
services.dbus.packages = [ cfg.package ];
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.fprintd ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
systemd.packages = [ cfg.package ];
|
systemd.packages = [ cfg.package ];
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.services.ihatemoney = {
|
options.services.ihatemoney = {
|
||||||
enable = mkEnableOption "ihatemoney webapp. Note that this will set uwsgi to emperor mode running as root";
|
enable = mkEnableOption "ihatemoney webapp. Note that this will set uwsgi to emperor mode";
|
||||||
backend = mkOption {
|
backend = mkOption {
|
||||||
type = types.enum [ "sqlite" "postgresql" ];
|
type = types.enum [ "sqlite" "postgresql" ];
|
||||||
default = "sqlite";
|
default = "sqlite";
|
||||||
@ -116,16 +116,13 @@ in
|
|||||||
services.uwsgi = {
|
services.uwsgi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [ "python3" ];
|
plugins = [ "python3" ];
|
||||||
# the vassal needs to be able to setuid
|
|
||||||
user = "root";
|
|
||||||
group = "root";
|
|
||||||
instance = {
|
instance = {
|
||||||
type = "emperor";
|
type = "emperor";
|
||||||
vassals.ihatemoney = {
|
vassals.ihatemoney = {
|
||||||
type = "normal";
|
type = "normal";
|
||||||
strict = true;
|
strict = true;
|
||||||
uid = user;
|
immediate-uid = user;
|
||||||
gid = group;
|
immediate-gid = group;
|
||||||
# apparently flask uses threads: https://github.com/spiral-project/ihatemoney/commit/c7815e48781b6d3a457eaff1808d179402558f8c
|
# apparently flask uses threads: https://github.com/spiral-project/ihatemoney/commit/c7815e48781b6d3a457eaff1808d179402558f8c
|
||||||
enable-threads = true;
|
enable-threads = true;
|
||||||
module = "wsgi:application";
|
module = "wsgi:application";
|
||||||
|
@ -5,11 +5,24 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.uwsgi;
|
cfg = config.services.uwsgi;
|
||||||
|
|
||||||
|
isEmperor = cfg.instance.type == "emperor";
|
||||||
|
|
||||||
|
imperialPowers =
|
||||||
|
[
|
||||||
|
# spawn other user processes
|
||||||
|
"CAP_SETUID" "CAP_SETGID"
|
||||||
|
"CAP_SYS_CHROOT"
|
||||||
|
# transfer capabilities
|
||||||
|
"CAP_SETPCAP"
|
||||||
|
# create other user sockets
|
||||||
|
"CAP_CHOWN"
|
||||||
|
];
|
||||||
|
|
||||||
buildCfg = name: c:
|
buildCfg = name: c:
|
||||||
let
|
let
|
||||||
plugins =
|
plugins =
|
||||||
if any (n: !any (m: m == n) cfg.plugins) (c.plugins or [])
|
if any (n: !any (m: m == n) cfg.plugins) (c.plugins or [])
|
||||||
then throw "`plugins` attribute in UWSGI configuration contains plugins not in config.services.uwsgi.plugins"
|
then throw "`plugins` attribute in uWSGI configuration contains plugins not in config.services.uwsgi.plugins"
|
||||||
else c.plugins or cfg.plugins;
|
else c.plugins or cfg.plugins;
|
||||||
|
|
||||||
hasPython = v: filter (n: n == "python${v}") plugins != [];
|
hasPython = v: filter (n: n == "python${v}") plugins != [];
|
||||||
@ -18,7 +31,7 @@ let
|
|||||||
|
|
||||||
python =
|
python =
|
||||||
if hasPython2 && hasPython3 then
|
if hasPython2 && hasPython3 then
|
||||||
throw "`plugins` attribute in UWSGI configuration shouldn't contain both python2 and python3"
|
throw "`plugins` attribute in uWSGI configuration shouldn't contain both python2 and python3"
|
||||||
else if hasPython2 then cfg.package.python2
|
else if hasPython2 then cfg.package.python2
|
||||||
else if hasPython3 then cfg.package.python3
|
else if hasPython3 then cfg.package.python3
|
||||||
else null;
|
else null;
|
||||||
@ -43,7 +56,7 @@ let
|
|||||||
oldPaths = filter (x: x != null) (map getPath env');
|
oldPaths = filter (x: x != null) (map getPath env');
|
||||||
in env' ++ [ "PATH=${optionalString (oldPaths != []) "${last oldPaths}:"}${pythonEnv}/bin" ];
|
in env' ++ [ "PATH=${optionalString (oldPaths != []) "${last oldPaths}:"}${pythonEnv}/bin" ];
|
||||||
}
|
}
|
||||||
else if c.type == "emperor"
|
else if isEmperor
|
||||||
then {
|
then {
|
||||||
emperor = if builtins.typeOf c.vassals != "set" then c.vassals
|
emperor = if builtins.typeOf c.vassals != "set" then c.vassals
|
||||||
else pkgs.buildEnv {
|
else pkgs.buildEnv {
|
||||||
@ -51,7 +64,7 @@ let
|
|||||||
paths = mapAttrsToList buildCfg c.vassals;
|
paths = mapAttrsToList buildCfg c.vassals;
|
||||||
};
|
};
|
||||||
} // removeAttrs c [ "type" "vassals" ]
|
} // removeAttrs c [ "type" "vassals" ]
|
||||||
else throw "`type` attribute in UWSGI configuration should be either 'normal' or 'emperor'";
|
else throw "`type` attribute in uWSGI configuration should be either 'normal' or 'emperor'";
|
||||||
};
|
};
|
||||||
|
|
||||||
in pkgs.writeTextDir "${name}.json" (builtins.toJSON uwsgiCfg);
|
in pkgs.writeTextDir "${name}.json" (builtins.toJSON uwsgiCfg);
|
||||||
@ -79,7 +92,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
instance = mkOption {
|
instance = mkOption {
|
||||||
type = with lib.types; let
|
type = with types; let
|
||||||
valueType = nullOr (oneOf [
|
valueType = nullOr (oneOf [
|
||||||
bool
|
bool
|
||||||
int
|
int
|
||||||
@ -137,31 +150,65 @@ in {
|
|||||||
user = mkOption {
|
user = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "uwsgi";
|
default = "uwsgi";
|
||||||
description = "User account under which uwsgi runs.";
|
description = "User account under which uWSGI runs.";
|
||||||
};
|
};
|
||||||
|
|
||||||
group = mkOption {
|
group = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "uwsgi";
|
default = "uwsgi";
|
||||||
description = "Group account under which uwsgi runs.";
|
description = "Group account under which uWSGI runs.";
|
||||||
|
};
|
||||||
|
|
||||||
|
capabilities = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
apply = caps: caps ++ optionals isEmperor imperialPowers;
|
||||||
|
default = [ ];
|
||||||
|
example = literalExample ''
|
||||||
|
[
|
||||||
|
"CAP_NET_BIND_SERVICE" # bind on ports <1024
|
||||||
|
"CAP_NET_RAW" # open raw sockets
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Grant capabilities to the uWSGI instance. See the
|
||||||
|
<literal>capabilities(7)</literal> for available values.
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
uWSGI runs as an unprivileged user (even as Emperor) with the minimal
|
||||||
|
capabilities required. This option can be used to add fine-grained
|
||||||
|
permissions without running the service as root.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
When in Emperor mode, any capability to be inherited by a vassal must
|
||||||
|
be specified again in the vassal configuration using <literal>cap</literal>.
|
||||||
|
See the uWSGI <link
|
||||||
|
xlink:href="https://uwsgi-docs.readthedocs.io/en/latest/Capabilities.html">docs</link>
|
||||||
|
for more information.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
systemd.tmpfiles.rules = optional (cfg.runDir != "/run/uwsgi") ''
|
||||||
|
d ${cfg.runDir} 775 ${cfg.user} ${cfg.group}
|
||||||
|
'';
|
||||||
|
|
||||||
systemd.services.uwsgi = {
|
systemd.services.uwsgi = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
preStart = ''
|
|
||||||
mkdir -p ${cfg.runDir}
|
|
||||||
chown ${cfg.user}:${cfg.group} ${cfg.runDir}
|
|
||||||
'';
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
User = cfg.user;
|
||||||
|
Group = cfg.group;
|
||||||
Type = "notify";
|
Type = "notify";
|
||||||
ExecStart = "${cfg.package}/bin/uwsgi --uid ${cfg.user} --gid ${cfg.group} --json ${buildCfg "server" cfg.instance}/server.json";
|
ExecStart = "${cfg.package}/bin/uwsgi --json ${buildCfg "server" cfg.instance}/server.json";
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID";
|
ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID";
|
||||||
NotifyAccess = "main";
|
NotifyAccess = "main";
|
||||||
KillSignal = "SIGQUIT";
|
KillSignal = "SIGQUIT";
|
||||||
|
AmbientCapabilities = cfg.capabilities;
|
||||||
|
CapabilityBoundingSet = cfg.capabilities;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ let
|
|||||||
|
|
||||||
defaultFavoriteAppsOverride = ''
|
defaultFavoriteAppsOverride = ''
|
||||||
[org.gnome.shell]
|
[org.gnome.shell]
|
||||||
favorite-apps=[ 'org.gnome.Geary.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop' ]
|
favorite-apps=[ 'org.gnome.Epiphany.desktop', 'org.gnome.Geary.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop' ]
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nixos-gsettings-desktop-schemas = let
|
nixos-gsettings-desktop-schemas = let
|
||||||
@ -409,9 +409,7 @@ in
|
|||||||
baobab
|
baobab
|
||||||
cheese
|
cheese
|
||||||
eog
|
eog
|
||||||
/* Not in good standing on nixos:
|
epiphany
|
||||||
* https://github.com/NixOS/nixpkgs/issues/98819
|
|
||||||
/* epiphany */
|
|
||||||
gedit
|
gedit
|
||||||
gnome-calculator
|
gnome-calculator
|
||||||
gnome-calendar
|
gnome-calendar
|
||||||
|
@ -20,7 +20,7 @@ let
|
|||||||
timeoutStr = if blCfg.timeout == null then "-1" else toString blCfg.timeout;
|
timeoutStr = if blCfg.timeout == null then "-1" else toString blCfg.timeout;
|
||||||
|
|
||||||
isAarch64 = pkgs.stdenv.hostPlatform.isAarch64;
|
isAarch64 = pkgs.stdenv.hostPlatform.isAarch64;
|
||||||
optional = pkgs.stdenv.lib.optionalString;
|
optional = pkgs.lib.optionalString;
|
||||||
|
|
||||||
configTxt =
|
configTxt =
|
||||||
pkgs.writeText "config.txt" (''
|
pkgs.writeText "config.txt" (''
|
||||||
|
@ -513,7 +513,12 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.compressor = mkOption {
|
boot.initrd.compressor = mkOption {
|
||||||
default = "gzip";
|
default = (
|
||||||
|
if lib.versionAtLeast config.boot.kernelPackages.kernel.version "5.9"
|
||||||
|
then "zstd"
|
||||||
|
else "gzip"
|
||||||
|
);
|
||||||
|
defaultText = "zstd if the kernel supports it (5.9+), gzip if not.";
|
||||||
type = types.unspecified; # We don't have a function type...
|
type = types.unspecified; # We don't have a function type...
|
||||||
description = ''
|
description = ''
|
||||||
The compressor to use on the initrd image. May be any of:
|
The compressor to use on the initrd image. May be any of:
|
||||||
|
@ -30,7 +30,13 @@ with lib;
|
|||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
systemd.additionalUpstreamSystemUnits = optional config.boot.tmpOnTmpfs "tmp.mount";
|
systemd.mounts = mkIf config.boot.tmpOnTmpfs [
|
||||||
|
{
|
||||||
|
what = "tmpfs";
|
||||||
|
where = "/tmp";
|
||||||
|
mountConfig.Options = [ "mode=1777" "strictatime" "rw" "nosuid" "nodev" "size=50%" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
systemd.tmpfiles.rules = optional config.boot.cleanTmpDir "D! /tmp 1777 root root";
|
systemd.tmpfiles.rules = optional config.boot.cleanTmpDir "D! /tmp 1777 root root";
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
{ config, lib, pkgs, utils, ... }:
|
{ config, lib, pkgs, utils, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.virtualisation.podman;
|
cfg = config.virtualisation.podman;
|
||||||
|
toml = pkgs.formats.toml { };
|
||||||
|
nvidia-docker = pkgs.nvidia-docker.override { containerRuntimePath = "${pkgs.runc}/bin/runc"; };
|
||||||
|
|
||||||
inherit (lib) mkOption types;
|
inherit (lib) mkOption types;
|
||||||
|
|
||||||
@ -53,6 +55,14 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enableNvidia = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Enable use of NVidia GPUs from within podman containers.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraPackages = mkOption {
|
extraPackages = mkOption {
|
||||||
type = with types; listOf package;
|
type = with types; listOf package;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
@ -78,21 +88,37 @@ in
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||||
|
{
|
||||||
|
environment.systemPackages = [ cfg.package ]
|
||||||
|
++ lib.optional cfg.dockerCompat dockerCompat;
|
||||||
|
|
||||||
environment.systemPackages = [ cfg.package ]
|
environment.etc."cni/net.d/87-podman-bridge.conflist".source = utils.copyFile "${pkgs.podman-unwrapped.src}/cni/87-podman-bridge.conflist";
|
||||||
++ lib.optional cfg.dockerCompat dockerCompat;
|
|
||||||
|
|
||||||
environment.etc."cni/net.d/87-podman-bridge.conflist".source = utils.copyFile "${pkgs.podman-unwrapped.src}/cni/87-podman-bridge.conflist";
|
virtualisation.containers = {
|
||||||
|
enable = true; # Enable common /etc/containers configuration
|
||||||
# Enable common /etc/containers configuration
|
containersConf.extraConfig = lib.optionalString cfg.enableNvidia
|
||||||
virtualisation.containers.enable = true;
|
(builtins.readFile (toml.generate "podman.nvidia.containers.conf" {
|
||||||
|
engine = {
|
||||||
assertions = [{
|
conmon_env_vars = [ "PATH=${lib.makeBinPath [ nvidia-docker ]}" ];
|
||||||
assertion = cfg.dockerCompat -> !config.virtualisation.docker.enable;
|
runtimes.nvidia = [ "${nvidia-docker}/bin/nvidia-container-runtime" ];
|
||||||
message = "Option dockerCompat conflicts with docker";
|
};
|
||||||
}];
|
}));
|
||||||
|
};
|
||||||
};
|
|
||||||
|
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = cfg.dockerCompat -> !config.virtualisation.docker.enable;
|
||||||
|
message = "Option dockerCompat conflicts with docker";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
assertion = cfg.enableNvidia -> !config.virtualisation.docker.enableNvidia;
|
||||||
|
message = "Option enableNvidia conflicts with docker.enableNvidia";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enableNvidia {
|
||||||
|
environment.etc."nvidia-container-runtime/config.toml".source = "${nvidia-docker}/etc/podman-config.toml";
|
||||||
|
})
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "3proxy";
|
name = "3proxy";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ misuzu ];
|
maintainers = [ misuzu ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
name = "agda";
|
name = "agda";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ alexarice turion ];
|
maintainers = [ alexarice turion ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -274,6 +274,7 @@ in
|
|||||||
novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {};
|
novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {};
|
||||||
nsd = handleTest ./nsd.nix {};
|
nsd = handleTest ./nsd.nix {};
|
||||||
nzbget = handleTest ./nzbget.nix {};
|
nzbget = handleTest ./nzbget.nix {};
|
||||||
|
nzbhydra2 = handleTest ./nzbhydra2.nix {};
|
||||||
oh-my-zsh = handleTest ./oh-my-zsh.nix {};
|
oh-my-zsh = handleTest ./oh-my-zsh.nix {};
|
||||||
openarena = handleTest ./openarena.nix {};
|
openarena = handleTest ./openarena.nix {};
|
||||||
openldap = handleTest ./openldap.nix {};
|
openldap = handleTest ./openldap.nix {};
|
||||||
@ -281,6 +282,7 @@ in
|
|||||||
openssh = handleTest ./openssh.nix {};
|
openssh = handleTest ./openssh.nix {};
|
||||||
openstack-image-metadata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).metadata or {};
|
openstack-image-metadata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).metadata or {};
|
||||||
openstack-image-userdata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).userdata or {};
|
openstack-image-userdata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).userdata or {};
|
||||||
|
opentabletdriver = handleTest ./opentabletdriver.nix {};
|
||||||
image-contents = handleTest ./image-contents.nix {};
|
image-contents = handleTest ./image-contents.nix {};
|
||||||
orangefs = handleTest ./orangefs.nix {};
|
orangefs = handleTest ./orangefs.nix {};
|
||||||
os-prober = handleTestOn ["x86_64-linux"] ./os-prober.nix {};
|
os-prober = handleTestOn ["x86_64-linux"] ./os-prober.nix {};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "ammonite";
|
name = "ammonite";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ nequissimus ];
|
maintainers = [ nequissimus ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
|||||||
|
|
||||||
{
|
{
|
||||||
name = "atd";
|
name = "atd";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ bjornfor ];
|
maintainers = [ bjornfor ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
# Test whether `avahi-daemon' and `libnss-mdns' work as expected.
|
# Test whether `avahi-daemon' and `libnss-mdns' work as expected.
|
||||||
import ./make-test-python.nix {
|
import ./make-test-python.nix {
|
||||||
name = "avahi";
|
name = "avahi";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ eelco ];
|
maintainers = [ eelco ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "awscli";
|
name = "awscli";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ nequissimus ];
|
maintainers = [ nequissimus ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, lib, ...} : {
|
import ./make-test-python.nix ({ pkgs, lib, ...} : {
|
||||||
name = "babeld";
|
name = "babeld";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ hexa ];
|
maintainers = [ hexa ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "bat";
|
name = "bat";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ nequissimus ]; };
|
meta = with pkgs.lib.maintainers; { maintainers = [ nequissimus ]; };
|
||||||
|
|
||||||
machine = { pkgs, ... }: { environment.systemPackages = [ pkgs.bat ]; };
|
machine = { pkgs, ... }: { environment.systemPackages = [ pkgs.bat ]; };
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "bcachefs";
|
name = "bcachefs";
|
||||||
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ chiiruno ];
|
meta.maintainers = with pkgs.lib.maintainers; [ chiiruno ];
|
||||||
|
|
||||||
machine = { pkgs, ... }: {
|
machine = { pkgs, ... }: {
|
||||||
virtualisation.emptyDiskImages = [ 4096 ];
|
virtualisation.emptyDiskImages = [ 4096 ];
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "bitcoind";
|
name = "bitcoind";
|
||||||
meta = with pkgs.stdenv.lib; {
|
meta = with pkgs.lib; {
|
||||||
maintainers = with maintainers; [ _1000101 ];
|
maintainers = with maintainers; [ _1000101 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ in
|
|||||||
|
|
||||||
{
|
{
|
||||||
name = "bittorrent";
|
name = "bittorrent";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ domenkozar eelco rob bobvanderlinden ];
|
maintainers = [ domenkozar eelco rob bobvanderlinden ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ let
|
|||||||
makeBitwardenTest = backend: makeTest {
|
makeBitwardenTest = backend: makeTest {
|
||||||
name = "bitwarden_rs-${backend}";
|
name = "bitwarden_rs-${backend}";
|
||||||
meta = {
|
meta = {
|
||||||
maintainers = with pkgs.stdenv.lib.maintainers; [ jjjollyjim ];
|
maintainers = with pkgs.lib.maintainers; [ jjjollyjim ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "blockbook-frontend";
|
name = "blockbook-frontend";
|
||||||
meta = with pkgs.stdenv.lib; {
|
meta = with pkgs.lib; {
|
||||||
maintainers = with maintainers; [ _1000101 ];
|
maintainers = with maintainers; [ _1000101 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -158,5 +158,5 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
|||||||
machine.succeed('pgrep -a -f "^kcanary$"')
|
machine.succeed('pgrep -a -f "^kcanary$"')
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ aszlig ];
|
meta.maintainers = with pkgs.lib.maintainers; [ aszlig ];
|
||||||
})
|
})
|
||||||
|
@ -36,7 +36,7 @@ let
|
|||||||
|
|
||||||
in {
|
in {
|
||||||
name = "borgbackup";
|
name = "borgbackup";
|
||||||
meta = with pkgs.stdenv.lib; {
|
meta = with pkgs.lib; {
|
||||||
maintainers = with maintainers; [ dotlambda ];
|
maintainers = with maintainers; [ dotlambda ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -109,5 +109,5 @@ import ./make-test-python.nix {
|
|||||||
bbworker.fail("nc -z bbmaster 8011")
|
bbworker.fail("nc -z bbmaster 8011")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ nand0p ];
|
meta.maintainers = with pkgs.lib.maintainers; [ nand0p ];
|
||||||
} {}
|
} {}
|
||||||
|
@ -2,7 +2,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
|||||||
|
|
||||||
{
|
{
|
||||||
name = "buildkite-agent";
|
name = "buildkite-agent";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ flokli ];
|
maintainers = [ flokli ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "caddy";
|
name = "caddy";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ xfix Br1ght0ne ];
|
maintainers = [ xfix Br1ght0ne ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ... } : {
|
import ./make-test-python.nix ({ pkgs, ... } : {
|
||||||
name = "cadvisor";
|
name = "cadvisor";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ offline ];
|
maintainers = [ offline ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import ./make-test-python.nix ({ pkgs, ...} :
|
|||||||
|
|
||||||
{
|
{
|
||||||
name = "cage";
|
name = "cage";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ matthewbauer flokli ];
|
maintainers = [ matthewbauer flokli ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
name = "cagebreak";
|
name = "cagebreak";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ berbiche ];
|
maintainers = [ berbiche ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ let
|
|||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
name = "basic-multi-node-ceph-cluster";
|
name = "basic-multi-node-ceph-cluster";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ lejonet ];
|
maintainers = [ lejonet ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ let
|
|||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
name = "basic-single-node-ceph-cluster";
|
name = "basic-single-node-ceph-cluster";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ lejonet johanot ];
|
maintainers = [ lejonet johanot ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import ./make-test-python.nix ({ pkgs, ...} : let
|
|||||||
|
|
||||||
in {
|
in {
|
||||||
name = "charliecloud";
|
name = "charliecloud";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ bzizou ];
|
maintainers = [ bzizou ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ in
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "cjdns";
|
name = "cjdns";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ ehmry ];
|
maintainers = [ ehmry ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "clickhouse";
|
name = "clickhouse";
|
||||||
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ma27 ];
|
meta.maintainers = with pkgs.lib.maintainers; [ ma27 ];
|
||||||
|
|
||||||
machine = {
|
machine = {
|
||||||
services.clickhouse.enable = true;
|
services.clickhouse.enable = true;
|
||||||
|
@ -40,7 +40,7 @@ let
|
|||||||
};
|
};
|
||||||
in makeTest {
|
in makeTest {
|
||||||
name = "cloud-init";
|
name = "cloud-init";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ lewo ];
|
maintainers = [ lewo ];
|
||||||
};
|
};
|
||||||
machine = { ... }:
|
machine = { ... }:
|
||||||
|
@ -99,7 +99,7 @@ let
|
|||||||
|
|
||||||
in import ./make-test-python.nix ({ pkgs, ...} : {
|
in import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "cockroachdb";
|
name = "cockroachdb";
|
||||||
meta.maintainers = with pkgs.stdenv.lib.maintainers;
|
meta.maintainers = with pkgs.lib.maintainers;
|
||||||
[ thoughtpolice ];
|
[ thoughtpolice ];
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
|
@ -9,7 +9,7 @@ in
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "containers-bridge";
|
name = "containers-bridge";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "containers-extra_veth";
|
name = "containers-extra_veth";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ kampfschlaefer ];
|
maintainers = [ kampfschlaefer ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "containers-hosts";
|
name = "containers-hosts";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ montag451 ];
|
maintainers = [ montag451 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "containers-imperative";
|
name = "containers-imperative";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ let
|
|||||||
|
|
||||||
in import ./make-test-python.nix ({ pkgs, ...} : {
|
in import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "containers-ipv4-ipv6";
|
name = "containers-ipv4-ipv6";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ in
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "containers-macvlans";
|
name = "containers-macvlans";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ montag451 ];
|
maintainers = [ montag451 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "containers-physical_interfaces";
|
name = "containers-physical_interfaces";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ kampfschlaefer ];
|
maintainers = [ kampfschlaefer ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ in
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "containers-portforward";
|
name = "containers-portforward";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ aristid aszlig eelco kampfschlaefer ianwookim ];
|
maintainers = [ aristid aszlig eelco kampfschlaefer ianwookim ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ let
|
|||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
name = "containers-reloadable";
|
name = "containers-reloadable";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ danbst ];
|
maintainers = [ danbst ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ let
|
|||||||
in import ./make-test-python.nix ({ pkgs, ...} :
|
in import ./make-test-python.nix ({ pkgs, ...} :
|
||||||
{
|
{
|
||||||
name = "containers-restart_networking";
|
name = "containers-restart_networking";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ kampfschlaefer ];
|
maintainers = [ kampfschlaefer ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "containers-tmpfs";
|
name = "containers-tmpfs";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ kampka ];
|
maintainers = [ kampka ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
name = "convos";
|
name = "convos";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ sgo ];
|
maintainers = [ sgo ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ with lib;
|
|||||||
|
|
||||||
{
|
{
|
||||||
name = "couchdb";
|
name = "couchdb";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ fpletz ];
|
maintainers = [ fpletz ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# This test runs CRI-O and verifies via critest
|
# This test runs CRI-O and verifies via critest
|
||||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "cri-o";
|
name = "cri-o";
|
||||||
maintainers = with pkgs.stdenv.lib.maintainers; teams.podman.members;
|
maintainers = with pkgs.lib.maintainers; teams.podman.members;
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
crio = {
|
crio = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "deluge";
|
name = "deluge";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ flokli ];
|
maintainers = [ flokli ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "dnscrypt-proxy2";
|
name = "dnscrypt-proxy2";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ joachifm ];
|
maintainers = [ joachifm ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ../make-test-python.nix ({ pkgs, ... }: {
|
import ../make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "dnscrypt-wrapper";
|
name = "dnscrypt-wrapper";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ rnhmjoj ];
|
maintainers = [ rnhmjoj ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "docker";
|
name = "docker";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ nequissimus offline ];
|
maintainers = [ nequissimus offline ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "docker-registry";
|
name = "docker-registry";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ globin ma27 ironpinguin ];
|
maintainers = [ globin ma27 ironpinguin ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ let
|
|||||||
|
|
||||||
in {
|
in {
|
||||||
name = "docker-tools";
|
name = "docker-tools";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ roberth ];
|
maintainers = [ roberth ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ... }:
|
import ./make-test-python.nix ({ pkgs, ... }:
|
||||||
{
|
{
|
||||||
name = "docker-tools-overlay";
|
name = "docker-tools-overlay";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ lnl7 ];
|
maintainers = [ lnl7 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "docker-tools";
|
name = "docker-tools";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ lnl7 ];
|
maintainers = [ lnl7 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "docker";
|
name = "docker";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ nequissimus offline ];
|
maintainers = [ nequissimus offline ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, lib, ...} : {
|
import ./make-test-python.nix ({ pkgs, lib, ...} : {
|
||||||
name = "documize";
|
name = "documize";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ ma27 ];
|
maintainers = [ ma27 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ let
|
|||||||
|
|
||||||
in {
|
in {
|
||||||
name = "dokuwiki";
|
name = "dokuwiki";
|
||||||
meta = with pkgs.stdenv.lib; {
|
meta = with pkgs.lib; {
|
||||||
maintainers = with maintainers; [ _1000101 ];
|
maintainers = with maintainers; [ _1000101 ];
|
||||||
};
|
};
|
||||||
machine = { ... }: {
|
machine = { ... }: {
|
||||||
|
@ -12,7 +12,7 @@ let
|
|||||||
mkElkTest = name : elk :
|
mkElkTest = name : elk :
|
||||||
import ./make-test-python.nix ({
|
import ./make-test-python.nix ({
|
||||||
inherit name;
|
inherit name;
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ eelco offline basvandijk ];
|
maintainers = [ eelco offline basvandijk ];
|
||||||
};
|
};
|
||||||
nodes = {
|
nodes = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "emacs-daemon";
|
name = "emacs-daemon";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ ];
|
maintainers = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import ./make-test-python.nix (
|
|||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
name = "engelsystem";
|
name = "engelsystem";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ talyz ];
|
maintainers = [ talyz ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import ./make-test-python.nix ({ pkgs, ...} :
|
|||||||
{
|
{
|
||||||
name = "enlightenment";
|
name = "enlightenment";
|
||||||
|
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ romildo ];
|
maintainers = [ romildo ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "environment";
|
name = "environment";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ nequissimus ];
|
maintainers = [ nequissimus ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "ergo";
|
name = "ergo";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ mmahut ];
|
maintainers = [ mmahut ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user