Merge staging-next into staging

This commit is contained in:
Frederik Rietdijk 2019-04-09 20:39:09 +02:00
commit ef0345a3fa
360 changed files with 10847 additions and 4306 deletions

View File

@ -278,32 +278,31 @@ The following example shows which arguments are given to `buildPythonPackage` in
order to build [`datashape`](https://github.com/blaze/datashape). order to build [`datashape`](https://github.com/blaze/datashape).
```nix ```nix
{ # ... { lib, buildPythonPackage, fetchPypi, numpy, multipledispatch, dateutil, pytest }:
datashape = buildPythonPackage rec { buildPythonPackage rec {
pname = "datashape"; pname = "datashape";
version = "0.4.7"; version = "0.4.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "14b2ef766d4c9652ab813182e866f493475e65e558bed0822e38bf07bba1a278"; sha256 = "14b2ef766d4c9652ab813182e866f493475e65e558bed0822e38bf07bba1a278";
}; };
checkInputs = with self; [ pytest ]; checkInputs = [ pytest ];
propagatedBuildInputs = with self; [ numpy multipledispatch dateutil ]; propagatedBuildInputs = [ numpy multipledispatch dateutil ];
meta = with lib; { meta = with lib; {
homepage = https://github.com/ContinuumIO/datashape; homepage = https://github.com/ContinuumIO/datashape;
description = "A data description language"; description = "A data description language";
license = licenses.bsd2; license = licenses.bsd2;
maintainers = with maintainers; [ fridh ]; maintainers = with maintainers; [ fridh ];
};
}; };
} }
``` ```
We can see several runtime dependencies, `numpy`, `multipledispatch`, and We can see several runtime dependencies, `numpy`, `multipledispatch`, and
`dateutil`. Furthermore, we have one `buildInput`, i.e. `pytest`. `pytest` is a `dateutil`. Furthermore, we have one `checkInputs`, i.e. `pytest`. `pytest` is a
test runner and is only used during the `checkPhase` and is therefore not added test runner and is only used during the `checkPhase` and is therefore not added
to `propagatedBuildInputs`. to `propagatedBuildInputs`.
@ -313,25 +312,24 @@ Python bindings to `libxml2` and `libxslt`. These libraries are only required
when building the bindings and are therefore added as `buildInputs`. when building the bindings and are therefore added as `buildInputs`.
```nix ```nix
{ # ... { lib, pkgs, buildPythonPackage, fetchPypi }:
lxml = buildPythonPackage rec { buildPythonPackage rec {
pname = "lxml"; pname = "lxml";
version = "3.4.4"; version = "3.4.4";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "16a0fa97hym9ysdk3rmqz32xdjqmy4w34ld3rm3jf5viqjx65lxk"; sha256 = "16a0fa97hym9ysdk3rmqz32xdjqmy4w34ld3rm3jf5viqjx65lxk";
}; };
buildInputs = with self; [ pkgs.libxml2 pkgs.libxslt ]; buildInputs = [ pkgs.libxml2 pkgs.libxslt ];
meta = with lib; { meta = with lib; {
description = "Pythonic binding for the libxml2 and libxslt libraries"; description = "Pythonic binding for the libxml2 and libxslt libraries";
homepage = https://lxml.de; homepage = https://lxml.de;
license = licenses.bsd3; license = licenses.bsd3;
maintainers = with maintainers; [ sjourdois ]; maintainers = with maintainers; [ sjourdois ];
};
}; };
} }
``` ```
@ -347,35 +345,34 @@ find each of them in a different folder, and therefore we have to set `LDFLAGS`
and `CFLAGS`. and `CFLAGS`.
```nix ```nix
{ # ... { lib, pkgs, buildPythonPackage, fetchPypi, numpy, scipy }:
pyfftw = buildPythonPackage rec { buildPythonPackage rec {
pname = "pyFFTW"; pname = "pyFFTW";
version = "0.9.2"; version = "0.9.2";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "f6bbb6afa93085409ab24885a1a3cdb8909f095a142f4d49e346f2bd1b789074"; sha256 = "f6bbb6afa93085409ab24885a1a3cdb8909f095a142f4d49e346f2bd1b789074";
}; };
buildInputs = [ pkgs.fftw pkgs.fftwFloat pkgs.fftwLongDouble]; buildInputs = [ pkgs.fftw pkgs.fftwFloat pkgs.fftwLongDouble];
propagatedBuildInputs = with self; [ numpy scipy ]; propagatedBuildInputs = [ numpy scipy ];
# Tests cannot import pyfftw. pyfftw works fine though. # Tests cannot import pyfftw. pyfftw works fine though.
doCheck = false; doCheck = false;
preConfigure = '' preConfigure = ''
export LDFLAGS="-L${pkgs.fftw.dev}/lib -L${pkgs.fftwFloat.out}/lib -L${pkgs.fftwLongDouble.out}/lib" export LDFLAGS="-L${pkgs.fftw.dev}/lib -L${pkgs.fftwFloat.out}/lib -L${pkgs.fftwLongDouble.out}/lib"
export CFLAGS="-I${pkgs.fftw.dev}/include -I${pkgs.fftwFloat.dev}/include -I${pkgs.fftwLongDouble.dev}/include" export CFLAGS="-I${pkgs.fftw.dev}/include -I${pkgs.fftwFloat.dev}/include -I${pkgs.fftwLongDouble.dev}/include"
''; '';
meta = with lib; { meta = with lib; {
description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms"; description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms";
homepage = http://hgomersall.github.com/pyFFTW; homepage = http://hgomersall.github.com/pyFFTW;
license = with licenses; [ bsd2 bsd3 ]; license = with licenses; [ bsd2 bsd3 ];
maintainers = with maintainers; [ fridh ]; maintainers = with maintainers; [ fridh ];
};
}; };
} }
``` ```
@ -403,7 +400,7 @@ Indeed, we can just add any package we like to have in our environment to `propa
```nix ```nix
with import <nixpkgs> {}; with import <nixpkgs> {};
with pkgs.python35Packages; with python35Packages;
buildPythonPackage rec { buildPythonPackage rec {
name = "mypackage"; name = "mypackage";
@ -436,7 +433,7 @@ Let's split the package definition from the environment definition.
We first create a function that builds `toolz` in `~/path/to/toolz/release.nix` We first create a function that builds `toolz` in `~/path/to/toolz/release.nix`
```nix ```nix
{ lib, pkgs, buildPythonPackage }: { lib, buildPythonPackage }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "toolz"; pname = "toolz";
@ -456,18 +453,17 @@ buildPythonPackage rec {
} }
``` ```
It takes two arguments, `pkgs` and `buildPythonPackage`. It takes an argument `buildPythonPackage`.
We now call this function using `callPackage` in the definition of our environment We now call this function using `callPackage` in the definition of our environment
```nix ```nix
with import <nixpkgs> {}; with import <nixpkgs> {};
( let ( let
toolz = pkgs.callPackage /path/to/toolz/release.nix { toolz = callPackage /path/to/toolz/release.nix {
pkgs = pkgs; buildPythonPackage = python35Packages.buildPythonPackage;
buildPythonPackage = pkgs.python35Packages.buildPythonPackage;
}; };
in pkgs.python35.withPackages (ps: [ ps.numpy toolz ]) in python35.withPackages (ps: [ ps.numpy toolz ])
).env ).env
``` ```
@ -565,7 +561,7 @@ buildPythonPackage rec {
''; '';
checkInputs = [ hypothesis ]; checkInputs = [ hypothesis ];
buildInputs = [ setuptools_scm ]; nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ attrs py setuptools six pluggy ]; propagatedBuildInputs = [ attrs py setuptools six pluggy ];
meta = with lib; { meta = with lib; {
@ -585,11 +581,6 @@ The `buildPythonPackage` mainly does four things:
environment variable and add dependent libraries to script's `sys.path`. environment variable and add dependent libraries to script's `sys.path`.
* In the `installCheck` phase, `${python.interpreter} setup.py test` is ran. * In the `installCheck` phase, `${python.interpreter} setup.py test` is ran.
As in Perl, dependencies on other Python packages can be specified in the
`buildInputs` and `propagatedBuildInputs` attributes. If something is
exclusively a build-time dependency, use `buildInputs`; if it is (also) a runtime
dependency, use `propagatedBuildInputs`.
By default tests are run because `doCheck = true`. Test dependencies, like By default tests are run because `doCheck = true`. Test dependencies, like
e.g. the test runner, should be added to `checkInputs`. e.g. the test runner, should be added to `checkInputs`.
@ -733,7 +724,7 @@ Saving the following as `default.nix`
with import <nixpkgs> {}; with import <nixpkgs> {};
python.buildEnv.override { python.buildEnv.override {
extraLibs = [ pkgs.pythonPackages.pyramid ]; extraLibs = [ pythonPackages.pyramid ];
ignoreCollisions = true; ignoreCollisions = true;
} }
``` ```
@ -815,11 +806,12 @@ Given a `default.nix`:
```nix ```nix
with import <nixpkgs> {}; with import <nixpkgs> {};
buildPythonPackage { name = "myproject"; pythonPackages.buildPythonPackage {
name = "myproject";
buildInputs = with pythonPackages; [ pyramid ];
buildInputs = with pkgs.pythonPackages; [ pyramid ]; src = ./.;
}
src = ./.; }
``` ```
Running `nix-shell` with no arguments should give you Running `nix-shell` with no arguments should give you
@ -1005,10 +997,13 @@ Create this `default.nix` file, together with a `requirements.txt` and simply ex
```nix ```nix
with import <nixpkgs> {}; with import <nixpkgs> {};
with pkgs.python27Packages; with python27Packages;
stdenv.mkDerivation { stdenv.mkDerivation {
name = "impurePythonEnv"; name = "impurePythonEnv";
src = null;
buildInputs = [ buildInputs = [
# these packages are required for virtualenv and pip to work: # these packages are required for virtualenv and pip to work:
# #
@ -1028,14 +1023,15 @@ stdenv.mkDerivation {
libxslt libxslt
libzip libzip
stdenv stdenv
zlib ]; zlib
src = null; ];
shellHook = '' shellHook = ''
# set SOURCE_DATE_EPOCH so that we can use python wheels # set SOURCE_DATE_EPOCH so that we can use python wheels
SOURCE_DATE_EPOCH=$(date +%s) SOURCE_DATE_EPOCH=$(date +%s)
virtualenv --no-setuptools venv virtualenv --no-setuptools venv
export PATH=$PWD/venv/bin:$PATH export PATH=$PWD/venv/bin:$PATH
pip install -r requirements.txt pip install -r requirements.txt
''; '';
} }
``` ```

View File

@ -310,6 +310,10 @@ packageOverrides = pkgs: {
<section xml:id="sec-elm"> <section xml:id="sec-elm">
<title>Elm</title> <title>Elm</title>
<para>
To start a development environment do <command>nix-shell -p elmPackages.elm elmPackages.elm-format</command>
</para>
<para> <para>
To update Elm compiler, see To update Elm compiler, see
<filename>nixpkgs/pkgs/development/compilers/elm/README.md</filename>. <filename>nixpkgs/pkgs/development/compilers/elm/README.md</filename>.

View File

@ -1219,6 +1219,11 @@
github = "dgonyeo"; github = "dgonyeo";
name = "Derek Gonyeo"; name = "Derek Gonyeo";
}; };
dhkl = {
email = "david@davidslab.com";
github = "dhl";
name = "David Leung";
};
dipinhora = { dipinhora = {
email = "dipinhora+github@gmail.com"; email = "dipinhora+github@gmail.com";
github = "dipinhora"; github = "dipinhora";
@ -2733,6 +2738,11 @@
github = "lo1tuma"; github = "lo1tuma";
name = "Mathias Schreck"; name = "Mathias Schreck";
}; };
loewenheim = {
email = "loewenheim@mailbox.org";
github = "loewenheim";
name = "Sebastian Zivota";
};
lopsided98 = { lopsided98 = {
email = "benwolsieffer@gmail.com"; email = "benwolsieffer@gmail.com";
github = "lopsided98"; github = "lopsided98";
@ -3292,6 +3302,11 @@
github = "mvnetbiz"; github = "mvnetbiz";
name = "Matt Votava"; name = "Matt Votava";
}; };
mwilsoninsight = {
email = "max.wilson@insight.com";
github = "mwilsoninsight";
name = "Max Wilson";
};
myrl = { myrl = {
email = "myrl.0xf@gmail.com"; email = "myrl.0xf@gmail.com";
github = "myrl"; github = "myrl";
@ -3431,6 +3446,11 @@
github = "nocoolnametom"; github = "nocoolnametom";
name = "Tom Doggett"; name = "Tom Doggett";
}; };
nomeata = {
email = "mail@joachim-breitner.de";
github = "nomeata";
name = "Joachim Breitner";
};
noneucat = { noneucat = {
email = "andy@lolc.at"; email = "andy@lolc.at";
github = "noneucat"; github = "noneucat";
@ -4584,6 +4604,11 @@
github = "stumoss"; github = "stumoss";
name = "Stuart Moss"; name = "Stuart Moss";
}; };
suhr = {
email = "suhr@i2pmail.org";
github = "suhr";
name = "Сухарик";
};
SuprDewd = { SuprDewd = {
email = "suprdewd@gmail.com"; email = "suprdewd@gmail.com";
github = "SuprDewd"; github = "SuprDewd";

View File

@ -534,6 +534,13 @@
Same applies to the new <literal>users.ldap.daemon.rootpwmodpwFile</literal> option. Same applies to the new <literal>users.ldap.daemon.rootpwmodpwFile</literal> option.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
<literal>nodejs-6_x</literal> is end-of-life.
<literal>nodejs-6_x</literal>, <literal>nodejs-slim-6_x</literal> and
<literal>nodePackages_6_x</literal> are removed.
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>

View File

@ -37,7 +37,52 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para /> <para>
Besides the existing <option>services.prometheus</option> module which
targets Prometheus-1 a new <option>services.prometheus2</option> module
has been added which targets Prometheus-2.
</para>
<para>
Both modules can be enabled at the same time. In fact
<link xlink:href="https://prometheus.io/docs/prometheus/latest/migration/#storage">
this is needed for upgrading existing Prometheus-1 data to Prometheus-2
</link>.
</para>
</listitem>
</itemizedlist>
</section>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-release-19.09-incompatibilities">
<title>Backward Incompatibilities</title>
<para>
When upgrading from a previous release, please be aware of the following
incompatible changes:
</para>
<itemizedlist>
<listitem>
<para>
The directory where Prometheus will store its metric data is now
managed by systemd's StateDirectory mechanism. It still defaults
to <literal>/var/lib/prometheus</literal>.
</para>
<para>
Its location can be specified by the new
<option>services.prometheus.stateDir</option> option which
defaults to <literal>prometheus</literal>. Note that this should
be a directory relative to <literal>/var/lib/</literal>.
</para>
<para>
The option <option>services.prometheus.dataDir</option> has been
deprecated. You can still set it but it's now required to have
<literal>/var/lib/</literal> as a prefix and you can't set
<option>services.prometheus.stateDir</option> at the same time.
</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</section> </section>

View File

@ -744,6 +744,7 @@
./services/web-apps/atlassian/crowd.nix ./services/web-apps/atlassian/crowd.nix
./services/web-apps/atlassian/jira.nix ./services/web-apps/atlassian/jira.nix
./services/web-apps/codimd.nix ./services/web-apps/codimd.nix
./services/web-apps/documize.nix
./services/web-apps/frab.nix ./services/web-apps/frab.nix
./services/web-apps/icingaweb2/icingaweb2.nix ./services/web-apps/icingaweb2/icingaweb2.nix
./services/web-apps/icingaweb2/module-monitoring.nix ./services/web-apps/icingaweb2/module-monitoring.nix

View File

@ -226,9 +226,7 @@ in
environment.shells = environment.shells =
[ "/run/current-system/sw/bin/bash" [ "/run/current-system/sw/bin/bash"
"/var/run/current-system/sw/bin/bash"
"/run/current-system/sw/bin/sh" "/run/current-system/sw/bin/sh"
"/var/run/current-system/sw/bin/sh"
"${pkgs.bashInteractive}/bin/bash" "${pkgs.bashInteractive}/bin/bash"
"${pkgs.bashInteractive}/bin/sh" "${pkgs.bashInteractive}/bin/sh"
]; ];

View File

@ -232,7 +232,6 @@ in
environment.shells = [ environment.shells = [
"/run/current-system/sw/bin/fish" "/run/current-system/sw/bin/fish"
"/var/run/current-system/sw/bin/fish"
"${pkgs.fish}/bin/fish" "${pkgs.fish}/bin/fish"
]; ];

View File

@ -50,7 +50,6 @@ in
environment.shells = environment.shells =
[ "/run/current-system/sw/bin/xonsh" [ "/run/current-system/sw/bin/xonsh"
"/var/run/current-system/sw/bin/xonsh"
"${pkgs.xonsh}/bin/xonsh" "${pkgs.xonsh}/bin/xonsh"
]; ];

View File

@ -230,7 +230,6 @@ in
environment.shells = environment.shells =
[ "/run/current-system/sw/bin/zsh" [ "/run/current-system/sw/bin/zsh"
"/var/run/current-system/sw/bin/zsh"
"${pkgs.zsh}/bin/zsh" "${pkgs.zsh}/bin/zsh"
]; ];

View File

@ -134,7 +134,7 @@ with lib;
inetPort = [ "services" "postgrey" "inetPort" ]; inetPort = [ "services" "postgrey" "inetPort" ];
in in
if value inetAddr == null if value inetAddr == null
then { path = "/var/run/postgrey.sock"; } then { path = "/run/postgrey.sock"; }
else { addr = value inetAddr; port = value inetPort; } else { addr = value inetAddr; port = value inetPort; }
)) ))

View File

@ -15,7 +15,7 @@ let
Name = "${fd_cfg.name}"; Name = "${fd_cfg.name}";
FDPort = ${toString fd_cfg.port}; FDPort = ${toString fd_cfg.port};
WorkingDirectory = "${libDir}"; WorkingDirectory = "${libDir}";
Pid Directory = "/var/run"; Pid Directory = "/run";
${fd_cfg.extraClientConfig} ${fd_cfg.extraClientConfig}
} }
@ -41,7 +41,7 @@ let
Name = "${sd_cfg.name}"; Name = "${sd_cfg.name}";
SDPort = ${toString sd_cfg.port}; SDPort = ${toString sd_cfg.port};
WorkingDirectory = "${libDir}"; WorkingDirectory = "${libDir}";
Pid Directory = "/var/run"; Pid Directory = "/run";
${sd_cfg.extraStorageConfig} ${sd_cfg.extraStorageConfig}
} }
@ -77,7 +77,7 @@ let
Password = "${dir_cfg.password}"; Password = "${dir_cfg.password}";
DirPort = ${toString dir_cfg.port}; DirPort = ${toString dir_cfg.port};
Working Directory = "${libDir}"; Working Directory = "${libDir}";
Pid Directory = "/var/run/"; Pid Directory = "/run/";
QueryFile = "${pkgs.bacula}/etc/query.sql"; QueryFile = "${pkgs.bacula}/etc/query.sql";
${dir_cfg.extraDirectorConfig} ${dir_cfg.extraDirectorConfig}
} }

View File

@ -85,7 +85,7 @@ in {
uriFile = mkOption { uriFile = mkOption {
type = types.path; type = types.path;
default = "/var/run/couchdb/couchdb.uri"; default = "/run/couchdb/couchdb.uri";
description = '' description = ''
This file contains the full URI that can be used to access this This file contains the full URI that can be used to access this
instance of CouchDB. It is used to help discover the port CouchDB is instance of CouchDB. It is used to help discover the port CouchDB is

View File

@ -65,7 +65,7 @@ in
}; };
pidFile = mkOption { pidFile = mkOption {
default = "/var/run/mongodb.pid"; default = "/run/mongodb.pid";
description = "Location of MongoDB pid file"; description = "Location of MongoDB pid file";
}; };

View File

@ -226,8 +226,8 @@ in
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" ]; after = [ "network.target" ];
preStart = '' preStart = ''
mkdir -p /var/run/slapd mkdir -p /run/slapd
chown -R "${cfg.user}:${cfg.group}" /var/run/slapd chown -R "${cfg.user}:${cfg.group}" /run/slapd
${optionalString (cfg.declarativeContents != null) '' ${optionalString (cfg.declarativeContents != null) ''
rm -Rf "${cfg.dataDir}" rm -Rf "${cfg.dataDir}"
''} ''}

View File

@ -95,7 +95,7 @@ in
type = with types; nullOr path; type = with types; nullOr path;
default = null; default = null;
description = "The path to the socket to bind to."; description = "The path to the socket to bind to.";
example = "/var/run/redis.sock"; example = "/run/redis.sock";
}; };
logLevel = mkOption { logLevel = mkOption {

View File

@ -41,7 +41,7 @@ in
}; };
pidpath = mkOption { pidpath = mkOption {
default = "/var/run/rethinkdb"; default = "/run/rethinkdb";
description = "Location where each instance's pid file is located."; description = "Location where each instance's pid file is located.";
}; };

View File

@ -48,8 +48,8 @@ with lib;
requiredBy = [ "postfix.service" ]; requiredBy = [ "postfix.service" ];
serviceConfig = { serviceConfig = {
Type = "forking"; Type = "forking";
PIDFile = "/var/run/pfix-srsd.pid"; PIDFile = "/run/pfix-srsd.pid";
ExecStart = "${pkgs.pfixtools}/bin/pfix-srsd -p /var/run/pfix-srsd.pid -I ${config.services.pfix-srsd.domain} ${config.services.pfix-srsd.secretsFile}"; ExecStart = "${pkgs.pfixtools}/bin/pfix-srsd -p /run/pfix-srsd.pid -I ${config.services.pfix-srsd.domain} ${config.services.pfix-srsd.secretsFile}";
}; };
}; };
}; };

View File

@ -29,7 +29,7 @@ with lib; let
options = { options = {
path = mkOption { path = mkOption {
type = path; type = path;
default = "/var/run/postgrey.sock"; default = "/run/postgrey.sock";
description = "Path of the unix socket"; description = "Path of the unix socket";
}; };
@ -53,7 +53,7 @@ in {
socket = mkOption { socket = mkOption {
type = socket; type = socket;
default = { default = {
path = "/var/run/postgrey.sock"; path = "/run/postgrey.sock";
mode = "0777"; mode = "0777";
}; };
example = { example = {

View File

@ -174,7 +174,7 @@ in
after = [ "network.target" ]; after = [ "network.target" ];
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.spamassassin}/bin/spamd ${optionalString cfg.debug "-D"} --username=spamd --groupname=spamd --siteconfigpath=${spamdEnv} --virtual-config-dir=/var/lib/spamassassin/user-%u --allow-tell --pidfile=/var/run/spamd.pid"; ExecStart = "${pkgs.spamassassin}/bin/spamd ${optionalString cfg.debug "-D"} --username=spamd --groupname=spamd --siteconfigpath=${spamdEnv} --virtual-config-dir=/var/lib/spamassassin/user-%u --allow-tell --pidfile=/run/spamd.pid";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
}; };

View File

@ -30,7 +30,7 @@ ${optionalString (cfg.bind_host != null) ''
bind_host: "${cfg.bind_host}" bind_host: "${cfg.bind_host}"
''} ''}
server_name: "${cfg.server_name}" server_name: "${cfg.server_name}"
pid_file: "/var/run/matrix-synapse.pid" pid_file: "/run/matrix-synapse.pid"
web_client: ${boolToString cfg.web_client} web_client: ${boolToString cfg.web_client}
${optionalString (cfg.public_baseurl != null) '' ${optionalString (cfg.public_baseurl != null) ''
public_baseurl: "${cfg.public_baseurl}" public_baseurl: "${cfg.public_baseurl}"

View File

@ -101,7 +101,7 @@ in {
Type = "simple"; Type = "simple";
ExecStart = "${cfg.package}/bin/mbpfan -f${verbose}"; ExecStart = "${cfg.package}/bin/mbpfan -f${verbose}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
PIDFile = "/var/run/mbpfan.pid"; PIDFile = "/run/mbpfan.pid";
Restart = "always"; Restart = "always";
}; };
}; };

View File

@ -19,7 +19,7 @@ in
description = "spice-vdagent daemon"; description = "spice-vdagent daemon";
wantedBy = [ "graphical.target" ]; wantedBy = [ "graphical.target" ];
preStart = '' preStart = ''
mkdir -p "/var/run/spice-vdagentd/" mkdir -p "/run/spice-vdagentd/"
''; '';
serviceConfig = { serviceConfig = {
Type = "forking"; Type = "forking";

View File

@ -38,7 +38,7 @@ in
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
preStart = "mkdir -p ${cfg.svnBaseDir}"; preStart = "mkdir -p ${cfg.svnBaseDir}";
script = "${pkgs.subversion.out}/bin/svnserve -r ${cfg.svnBaseDir} -d --foreground --pid-file=/var/run/svnserve.pid"; script = "${pkgs.subversion.out}/bin/svnserve -r ${cfg.svnBaseDir} -d --foreground --pid-file=/run/svnserve.pid";
}; };
}; };
} }

View File

@ -24,7 +24,7 @@ let
status_file=${nagiosState}/status.dat status_file=${nagiosState}/status.dat
object_cache_file=${nagiosState}/objects.cache object_cache_file=${nagiosState}/objects.cache
temp_file=${nagiosState}/nagios.tmp temp_file=${nagiosState}/nagios.tmp
lock_file=/var/run/nagios.lock # Not used I think. lock_file=/run/nagios.lock # Not used I think.
state_retention_file=${nagiosState}/retention.dat state_retention_file=${nagiosState}/retention.dat
query_socket=${nagiosState}/nagios.qh query_socket=${nagiosState}/nagios.qh
check_result_path=${nagiosState} check_result_path=${nagiosState}

View File

@ -4,9 +4,24 @@ with lib;
let let
cfg = config.services.prometheus; cfg = config.services.prometheus;
cfg2 = config.services.prometheus2;
promUser = "prometheus"; promUser = "prometheus";
promGroup = "prometheus"; promGroup = "prometheus";
stateDir =
if cfg.stateDir != null
then cfg.stateDir
else
if cfg.dataDir != null
then
# This assumes /var/lib/ is a prefix of cfg.dataDir.
# This is checked as an assertion below.
removePrefix stateDirBase cfg.dataDir
else "prometheus";
stateDirBase = "/var/lib/";
workingDir = stateDirBase + stateDir;
workingDir2 = stateDirBase + cfg2.stateDir;
# Get a submodule without any embedded metadata: # Get a submodule without any embedded metadata:
_filter = x: filterAttrs (k: v: k != "_module") x; _filter = x: filterAttrs (k: v: k != "_module") x;
@ -17,13 +32,23 @@ let
promtool ${what} $out promtool ${what} $out
''; '';
# a wrapper that verifies that the configuration is valid for
# prometheus 2
prom2toolCheck = what: name: file:
pkgs.runCommand
"${name}-${replaceStrings [" "] [""] what}-checked"
{ buildInputs = [ cfg2.package ]; } ''
ln -s ${file} $out
promtool ${what} $out
'';
# Pretty-print JSON to a file # Pretty-print JSON to a file
writePrettyJSON = name: x: writePrettyJSON = name: x:
pkgs.runCommand name { preferLocalBuild = true; } '' pkgs.runCommand name { preferLocalBuild = true; } ''
echo '${builtins.toJSON x}' | ${pkgs.jq}/bin/jq . > $out echo '${builtins.toJSON x}' | ${pkgs.jq}/bin/jq . > $out
''; '';
# This becomes the main config file # This becomes the main config file for Prometheus 1
promConfig = { promConfig = {
global = cfg.globalConfig; global = cfg.globalConfig;
rule_files = map (promtoolCheck "check-rules" "rules") (cfg.ruleFiles ++ [ rule_files = map (promtoolCheck "check-rules" "rules") (cfg.ruleFiles ++ [
@ -35,20 +60,53 @@ let
generatedPrometheusYml = writePrettyJSON "prometheus.yml" promConfig; generatedPrometheusYml = writePrettyJSON "prometheus.yml" promConfig;
prometheusYml = let prometheusYml = let
yml = if cfg.configText != null then yml = if cfg.configText != null then
pkgs.writeText "prometheus.yml" cfg.configText pkgs.writeText "prometheus.yml" cfg.configText
else generatedPrometheusYml; else generatedPrometheusYml;
in promtoolCheck "check-config" "prometheus.yml" yml; in promtoolCheck "check-config" "prometheus.yml" yml;
cmdlineArgs = cfg.extraFlags ++ [ cmdlineArgs = cfg.extraFlags ++ [
"-storage.local.path=${cfg.dataDir}/metrics" "-storage.local.path=${workingDir}/metrics"
"-config.file=${prometheusYml}" "-config.file=${prometheusYml}"
"-web.listen-address=${cfg.listenAddress}" "-web.listen-address=${cfg.listenAddress}"
"-alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity}" "-alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity}"
"-alertmanager.timeout=${toString cfg.alertmanagerTimeout}s" "-alertmanager.timeout=${toString cfg.alertmanagerTimeout}s"
(optionalString (cfg.alertmanagerURL != []) "-alertmanager.url=${concatStringsSep "," cfg.alertmanagerURL}") ] ++
(optionalString (cfg.webExternalUrl != null) "-web.external-url=${cfg.webExternalUrl}") optional (cfg.alertmanagerURL != []) "-alertmanager.url=${concatStringsSep "," cfg.alertmanagerURL}" ++
]; optional (cfg.webExternalUrl != null) "-web.external-url=${cfg.webExternalUrl}";
# This becomes the main config file for Prometheus 2
promConfig2 = {
global = cfg2.globalConfig;
rule_files = map (prom2toolCheck "check rules" "rules") (cfg2.ruleFiles ++ [
(pkgs.writeText "prometheus.rules" (concatStringsSep "\n" cfg2.rules))
]);
scrape_configs = cfg2.scrapeConfigs;
alerting = optionalAttrs (cfg2.alertmanagerURL != []) {
alertmanagers = [{
static_configs = [{
targets = cfg2.alertmanagerURL;
}];
}];
};
};
generatedPrometheus2Yml = writePrettyJSON "prometheus.yml" promConfig2;
prometheus2Yml = let
yml = if cfg2.configText != null then
pkgs.writeText "prometheus.yml" cfg2.configText
else generatedPrometheus2Yml;
in prom2toolCheck "check config" "prometheus.yml" yml;
cmdlineArgs2 = cfg2.extraFlags ++ [
"--storage.tsdb.path=${workingDir2}/data/"
"--config.file=${prometheus2Yml}"
"--web.listen-address=${cfg2.listenAddress}"
"--alertmanager.notification-queue-capacity=${toString cfg2.alertmanagerNotificationQueueCapacity}"
"--alertmanager.timeout=${toString cfg2.alertmanagerTimeout}s"
] ++
optional (cfg2.webExternalUrl != null) "--web.external-url=${cfg2.webExternalUrl}";
promTypes.globalConfig = types.submodule { promTypes.globalConfig = types.submodule {
options = { options = {
@ -403,10 +461,21 @@ in {
}; };
dataDir = mkOption { dataDir = mkOption {
type = types.path; type = types.nullOr types.path;
default = "/var/lib/prometheus"; default = null;
description = '' description = ''
Directory to store Prometheus metrics data. Directory to store Prometheus metrics data.
This option is deprecated, please use <option>services.prometheus.stateDir</option>.
'';
};
stateDir = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Directory below <literal>${stateDirBase}</literal> to store Prometheus metrics data.
This directory will be created automatically using systemd's StateDirectory mechanism.
Defaults to <literal>prometheus</literal>.
''; '';
}; };
@ -497,30 +566,201 @@ in {
''; '';
}; };
}; };
}; services.prometheus2 = {
config = mkIf cfg.enable { enable = mkOption {
users.groups.${promGroup}.gid = config.ids.gids.prometheus; type = types.bool;
users.users.${promUser} = { default = false;
description = "Prometheus daemon user"; description = ''
uid = config.ids.uids.prometheus; Enable the Prometheus 2 monitoring daemon.
group = promGroup; '';
home = cfg.dataDir; };
createHome = true;
}; package = mkOption {
systemd.services.prometheus = { type = types.package;
wantedBy = [ "multi-user.target" ]; default = pkgs.prometheus_2;
after = [ "network.target" ]; defaultText = "pkgs.prometheus_2";
script = '' description = ''
#!/bin/sh The prometheus2 package that should be used.
exec ${cfg.package}/bin/prometheus \ '';
${concatStringsSep " \\\n " cmdlineArgs} };
'';
serviceConfig = { listenAddress = mkOption {
User = promUser; type = types.str;
Restart = "always"; default = "0.0.0.0:9090";
WorkingDirectory = cfg.dataDir; description = ''
Address to listen on for the web interface, API, and telemetry.
'';
};
stateDir = mkOption {
type = types.str;
default = "prometheus2";
description = ''
Directory below <literal>${stateDirBase}</literal> to store Prometheus metrics data.
This directory will be created automatically using systemd's StateDirectory mechanism.
Defaults to <literal>prometheus2</literal>.
'';
};
extraFlags = mkOption {
type = types.listOf types.str;
default = [];
description = ''
Extra commandline options when launching Prometheus 2.
'';
};
configText = mkOption {
type = types.nullOr types.lines;
default = null;
description = ''
If non-null, this option defines the text that is written to
prometheus.yml. If null, the contents of prometheus.yml is generated
from the structured config options.
'';
};
globalConfig = mkOption {
type = promTypes.globalConfig;
default = {};
apply = _filter;
description = ''
Parameters that are valid in all configuration contexts. They
also serve as defaults for other configuration sections
'';
};
rules = mkOption {
type = types.listOf types.str;
default = [];
description = ''
Alerting and/or Recording rules to evaluate at runtime.
'';
};
ruleFiles = mkOption {
type = types.listOf types.path;
default = [];
description = ''
Any additional rules files to include in this configuration.
'';
};
scrapeConfigs = mkOption {
type = types.listOf promTypes.scrape_config;
default = [];
apply = x: map _filter x;
description = ''
A list of scrape configurations.
'';
};
alertmanagerURL = mkOption {
type = types.listOf types.str;
default = [];
description = ''
List of Alertmanager URLs to send notifications to.
'';
};
alertmanagerNotificationQueueCapacity = mkOption {
type = types.int;
default = 10000;
description = ''
The capacity of the queue for pending alert manager notifications.
'';
};
alertmanagerTimeout = mkOption {
type = types.int;
default = 10;
description = ''
Alert manager HTTP API timeout (in seconds).
'';
};
webExternalUrl = mkOption {
type = types.nullOr types.str;
default = null;
example = "https://example.com/";
description = ''
The URL under which Prometheus is externally reachable (for example,
if Prometheus is served via a reverse proxy).
'';
}; };
}; };
}; };
config = mkMerge [
(mkIf (cfg.enable || cfg2.enable) {
users.groups.${promGroup}.gid = config.ids.gids.prometheus;
users.users.${promUser} = {
description = "Prometheus daemon user";
uid = config.ids.uids.prometheus;
group = promGroup;
};
})
(mkIf cfg.enable {
warnings =
optional (cfg.dataDir != null) ''
The option services.prometheus.dataDir is deprecated, please use
services.prometheus.stateDir.
'';
assertions = [
{
assertion = !(cfg.dataDir != null && cfg.stateDir != null);
message =
"The options services.prometheus.dataDir and services.prometheus.stateDir" +
" can't both be set at the same time! It's recommended to only set the latter" +
" since the former is deprecated.";
}
{
assertion = cfg.dataDir != null -> hasPrefix stateDirBase cfg.dataDir;
message =
"The option services.prometheus.dataDir should have ${stateDirBase} as a prefix!";
}
{
assertion = cfg.stateDir != null -> !hasPrefix "/" cfg.stateDir;
message =
"The option services.prometheus.stateDir shouldn't be an absolute directory." +
" It should be a directory relative to ${stateDirBase}.";
}
{
assertion = cfg2.stateDir != null -> !hasPrefix "/" cfg2.stateDir;
message =
"The option services.prometheus2.stateDir shouldn't be an absolute directory." +
" It should be a directory relative to ${stateDirBase}.";
}
];
systemd.services.prometheus = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/prometheus" +
optionalString (length cmdlineArgs != 0) (" \\\n " +
concatStringsSep " \\\n " cmdlineArgs);
User = promUser;
Restart = "always";
WorkingDirectory = workingDir;
StateDirectory = stateDir;
};
};
})
(mkIf cfg2.enable {
systemd.services.prometheus2 = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${cfg2.package}/bin/prometheus" +
optionalString (length cmdlineArgs2 != 0) (" \\\n " +
concatStringsSep " \\\n " cmdlineArgs2);
User = promUser;
Restart = "always";
WorkingDirectory = workingDir2;
StateDirectory = cfg2.stateDir;
};
};
})
];
} }

View File

@ -9,7 +9,7 @@ let
zabbix = cfg.package; zabbix = cfg.package;
stateDir = "/var/run/zabbix"; stateDir = "/run/zabbix";
logDir = "/var/log/zabbix"; logDir = "/var/log/zabbix";

View File

@ -7,7 +7,7 @@ let
cfg = config.services.zabbixServer; cfg = config.services.zabbixServer;
stateDir = "/var/run/zabbix"; stateDir = "/run/zabbix";
logDir = "/var/log/zabbix"; logDir = "/var/log/zabbix";

View File

@ -45,7 +45,7 @@ let
astdatadir => /var/lib/asterisk astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk astrundir => /run/asterisk
astlogdir => /var/log/asterisk astlogdir => /var/log/asterisk
astsbindir => ${cfg.package}/sbin astsbindir => ${cfg.package}/sbin
''; '';
@ -257,7 +257,7 @@ in
ExecReload = ''${cfg.package}/bin/asterisk -x "core reload" ExecReload = ''${cfg.package}/bin/asterisk -x "core reload"
''; '';
Type = "forking"; Type = "forking";
PIDFile = "/var/run/asterisk/asterisk.pid"; PIDFile = "/run/asterisk/asterisk.pid";
}; };
}; };
}; };

View File

@ -214,7 +214,7 @@ in
systemd.sockets.avahi-daemon = systemd.sockets.avahi-daemon =
{ description = "Avahi mDNS/DNS-SD Stack Activation Socket"; { description = "Avahi mDNS/DNS-SD Stack Activation Socket";
listenStreams = [ "/var/run/avahi-daemon/socket" ]; listenStreams = [ "/run/avahi-daemon/socket" ];
wantedBy = [ "sockets.target" ]; wantedBy = [ "sockets.target" ];
}; };
@ -229,7 +229,7 @@ in
path = [ pkgs.coreutils pkgs.avahi ]; path = [ pkgs.coreutils pkgs.avahi ];
preStart = "mkdir -p /var/run/avahi-daemon"; preStart = "mkdir -p /run/avahi-daemon";
script = script =
'' ''

View File

@ -25,8 +25,8 @@ let
blackhole { badnetworks; }; blackhole { badnetworks; };
forward first; forward first;
forwarders { ${concatMapStrings (entry: " ${entry}; ") cfg.forwarders} }; forwarders { ${concatMapStrings (entry: " ${entry}; ") cfg.forwarders} };
directory "/var/run/named"; directory "/run/named";
pid-file "/var/run/named/named.pid"; pid-file "/run/named/named.pid";
${cfg.extraOptions} ${cfg.extraOptions}
}; };
@ -187,8 +187,8 @@ in
${pkgs.bind.out}/sbin/rndc-confgen -r /dev/urandom -c /etc/bind/rndc.key -u ${bindUser} -a -A hmac-sha256 2>/dev/null ${pkgs.bind.out}/sbin/rndc-confgen -r /dev/urandom -c /etc/bind/rndc.key -u ${bindUser} -a -A hmac-sha256 2>/dev/null
fi fi
${pkgs.coreutils}/bin/mkdir -p /var/run/named ${pkgs.coreutils}/bin/mkdir -p /run/named
chown ${bindUser} /var/run/named chown ${bindUser} /run/named
''; '';
serviceConfig = { serviceConfig = {

View File

@ -25,7 +25,7 @@ let
logger_stdout=-1 logger_stdout=-1
logger_stdout_level=2 logger_stdout_level=2
ctrl_interface=/var/run/hostapd ctrl_interface=/run/hostapd
ctrl_interface_group=${cfg.group} ctrl_interface_group=${cfg.group}
${if cfg.wpa then '' ${if cfg.wpa then ''

View File

@ -62,7 +62,7 @@ in
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
Type = "forking"; Type = "forking";
PIDFile = "/var/run/htpdate.pid"; PIDFile = "/run/htpdate.pid";
ExecStart = concatStringsSep " " [ ExecStart = concatStringsSep " " [
"${htpdate}/bin/htpdate" "${htpdate}/bin/htpdate"
"-D -u nobody" "-D -u nobody"

View File

@ -63,7 +63,7 @@ in
passwordFile = mkOption { passwordFile = mkOption {
type = types.str; type = types.str;
default = ""; default = "";
description = "File that containts password"; description = "File that contains password";
}; };
}; };
})); }));
@ -100,7 +100,7 @@ in
passwordFile = mkOption { passwordFile = mkOption {
type = types.str; type = types.str;
default = ""; default = "";
description = "File that containts password"; description = "File that contains password";
}; };
}; };
@ -120,7 +120,7 @@ in
description = "iodine client - ${name}"; description = "iodine client - ${name}";
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
script = "${pkgs.iodine}/bin/iodine -f -u ${iodinedUser} ${cfg.extraConfig} ${optionalString (cfg.passwordFile != "") "-P $(cat \"${cfg.passwordFile}\")"} ${cfg.relay} ${cfg.server}"; script = "exec ${pkgs.iodine}/bin/iodine -f -u ${iodinedUser} ${cfg.extraConfig} ${optionalString (cfg.passwordFile != "") "< \"${cfg.passwordFile}\""} ${cfg.relay} ${cfg.server}";
serviceConfig = { serviceConfig = {
RestartSec = "30s"; RestartSec = "30s";
Restart = "always"; Restart = "always";
@ -136,7 +136,7 @@ in
description = "iodine, ip over dns server daemon"; description = "iodine, ip over dns server daemon";
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
script = "${pkgs.iodine}/bin/iodined -f -u ${iodinedUser} ${cfg.server.extraConfig} ${optionalString (cfg.server.passwordFile != "") "-P $(cat \"${cfg.server.passwordFile}\")"} ${cfg.server.ip} ${cfg.server.domain}"; script = "exec ${pkgs.iodine}/bin/iodined -f -u ${iodinedUser} ${cfg.server.extraConfig} ${optionalString (cfg.server.passwordFile != "") "< \"${cfg.server.passwordFile}\""} ${cfg.server.ip} ${cfg.server.domain}";
}; };
}; };

View File

@ -987,7 +987,7 @@ general {
* egdpool_path: path to EGD pool. Not necessary for OpenSSL >= 0.9.7 * egdpool_path: path to EGD pool. Not necessary for OpenSSL >= 0.9.7
* which automatically finds the path. * which automatically finds the path.
*/ */
# egdpool_path = "/var/run/egd-pool"; # egdpool_path = "/run/egd-pool";
/* /*

View File

@ -23,7 +23,7 @@ in
users.users._lldpd = { users.users._lldpd = {
description = "lldpd user"; description = "lldpd user";
group = "_lldpd"; group = "_lldpd";
home = "/var/run/lldpd"; home = "/run/lldpd";
isSystemUser = true; isSystemUser = true;
}; };
users.groups._lldpd = {}; users.groups._lldpd = {};

View File

@ -71,7 +71,7 @@ in
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.miniupnpd}/bin/miniupnpd -f ${configFile}"; ExecStart = "${pkgs.miniupnpd}/bin/miniupnpd -f ${configFile}";
PIDFile = "/var/run/miniupnpd.pid"; PIDFile = "/run/miniupnpd.pid";
Type = "forking"; Type = "forking";
}; };
}; };

View File

@ -31,7 +31,7 @@ in
udp-port = 443 udp-port = 443
run-as-user = nobody run-as-user = nobody
run-as-group = nogroup run-as-group = nogroup
socket-file = /var/run/ocserv-socket socket-file = /run/ocserv-socket
server-cert = certs/server-cert.pem server-cert = certs/server-cert.pem
server-key = certs/server-key.pem server-key = certs/server-key.pem
keepalive = 32400 keepalive = 32400
@ -50,7 +50,7 @@ in
rekey-time = 172800 rekey-time = 172800
rekey-method = ssl rekey-method = ssl
use-occtl = true use-occtl = true
pid-file = /var/run/ocserv.pid pid-file = /run/ocserv.pid
device = vpns device = vpns
predictable-ips = true predictable-ips = true
default-domain = example.com default-domain = example.com
@ -90,8 +90,8 @@ in
serviceConfig = { serviceConfig = {
PrivateTmp = true; PrivateTmp = true;
PIDFile = "/var/run/ocserv.pid"; PIDFile = "/run/ocserv.pid";
ExecStart = "${pkgs.ocserv}/bin/ocserv --foreground --pid-file /var/run/ocesrv.pid --config /etc/ocserv/ocserv.conf"; ExecStart = "${pkgs.ocserv}/bin/ocserv --foreground --pid-file /run/ocesrv.pid --config /etc/ocserv/ocserv.conf";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
}; };
}; };

View File

@ -32,12 +32,12 @@ in {
else cfg.configPath else cfg.configPath
}"; }";
ExecReload = "${pkgs.ipsecTools}/bin/racoonctl reload-config"; ExecReload = "${pkgs.ipsecTools}/bin/racoonctl reload-config";
PIDFile = "/var/run/racoon.pid"; PIDFile = "/run/racoon.pid";
Type = "forking"; Type = "forking";
Restart = "always"; Restart = "always";
}; };
preStart = '' preStart = ''
rm /var/run/racoon.pid || true rm /run/racoon.pid || true
mkdir -p /var/racoon mkdir -p /var/racoon
''; '';
}; };

View File

@ -431,8 +431,6 @@ in
services.openssh.extraConfig = mkOrder 0 services.openssh.extraConfig = mkOrder 0
'' ''
Protocol 2
UsePAM yes UsePAM yes
AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"} AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}

View File

@ -132,7 +132,7 @@ in
extraCmdArgs = mkOption { extraCmdArgs = mkOption {
type = types.str; type = types.str;
default = ""; default = "";
example = "-e/var/run/wpa_supplicant/entropy.bin"; example = "-e/run/wpa_supplicant/entropy.bin";
description = description =
"Command line arguments to add when executing <literal>wpa_supplicant</literal>."; "Command line arguments to add when executing <literal>wpa_supplicant</literal>.";
}; };
@ -164,7 +164,7 @@ in
socketDir = mkOption { socketDir = mkOption {
type = types.str; type = types.str;
default = "/var/run/wpa_supplicant"; default = "/run/wpa_supplicant";
description = "Directory of sockets for controlling wpa_supplicant."; description = "Directory of sockets for controlling wpa_supplicant.";
}; };

View File

@ -6,7 +6,7 @@ let
cfg = config.networking.wireless; cfg = config.networking.wireless;
configFile = if cfg.networks != {} then pkgs.writeText "wpa_supplicant.conf" '' configFile = if cfg.networks != {} then pkgs.writeText "wpa_supplicant.conf" ''
${optionalString cfg.userControlled.enable '' ${optionalString cfg.userControlled.enable ''
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=${cfg.userControlled.group} ctrl_interface=DIR=/run/wpa_supplicant GROUP=${cfg.userControlled.group}
update_config=1''} update_config=1''}
${cfg.extraConfig} ${cfg.extraConfig}
${concatStringsSep "\n" (mapAttrsToList (ssid: config: with config; let ${concatStringsSep "\n" (mapAttrsToList (ssid: config: with config; let

View File

@ -17,7 +17,7 @@ let
chmod +x $out/startwm.sh chmod +x $out/startwm.sh
substituteInPlace $out/xrdp.ini \ substituteInPlace $out/xrdp.ini \
--replace "#rsakeys_ini=" "rsakeys_ini=/var/run/xrdp/rsakeys.ini" \ --replace "#rsakeys_ini=" "rsakeys_ini=/run/xrdp/rsakeys.ini" \
--replace "certificate=" "certificate=${cfg.sslCert}" \ --replace "certificate=" "certificate=${cfg.sslCert}" \
--replace "key_file=" "key_file=${cfg.sslKey}" \ --replace "key_file=" "key_file=${cfg.sslKey}" \
--replace LogFile=xrdp.log LogFile=/dev/null \ --replace LogFile=xrdp.log LogFile=/dev/null \
@ -132,9 +132,9 @@ in
chown root:xrdp ${cfg.sslKey} ${cfg.sslCert} chown root:xrdp ${cfg.sslKey} ${cfg.sslCert}
chmod 440 ${cfg.sslKey} ${cfg.sslCert} chmod 440 ${cfg.sslKey} ${cfg.sslCert}
fi fi
if [ ! -s /var/run/xrdp/rsakeys.ini ]; then if [ ! -s /run/xrdp/rsakeys.ini ]; then
mkdir -p /var/run/xrdp mkdir -p /run/xrdp
${cfg.package}/bin/xrdp-keygen xrdp /var/run/xrdp/rsakeys.ini ${cfg.package}/bin/xrdp-keygen xrdp /run/xrdp/rsakeys.ini
fi fi
''; '';
serviceConfig = { serviceConfig = {

View File

@ -74,7 +74,7 @@ let
${concatMapStrings (addr: '' ${concatMapStrings (addr: ''
Listen ${addr} Listen ${addr}
'') cfg.listenAddresses} '') cfg.listenAddresses}
Listen /var/run/cups/cups.sock Listen /run/cups/cups.sock
SetEnv PATH /var/lib/cups/path/lib/cups/filter:/var/lib/cups/path/bin SetEnv PATH /var/lib/cups/path/lib/cups/filter:/var/lib/cups/path/bin

View File

@ -100,8 +100,8 @@ in
in in
pkgs.writeText "fcron.conf" '' pkgs.writeText "fcron.conf" ''
fcrontabs = /var/spool/fcron fcrontabs = /var/spool/fcron
pidfile = /var/run/fcron.pid pidfile = /run/fcron.pid
fifofile = /var/run/fcron.fifo fifofile = /run/fcron.fifo
fcronallow = /etc/fcron.allow fcronallow = /etc/fcron.allow
fcrondeny = /etc/fcron.deny fcrondeny = /etc/fcron.deny
shell = /bin/sh shell = /bin/sh

View File

@ -45,7 +45,7 @@ in {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
requires = [ "network-link-dummy0.service" "network-addresses-dummy0.service" ]; requires = [ "network-link-dummy0.service" "network-addresses-dummy0.service" ];
preStart = '' preStart = ''
/run/current-system/sw/bin/rm -fv /var/run/hologram.sock /run/current-system/sw/bin/rm -fv /run/hologram.sock
''; '';
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.hologram.bin}/bin/hologram-agent -debug -conf ${cfgFile} -port ${cfg.httpPort}"; ExecStart = "${pkgs.hologram.bin}/bin/hologram-agent -debug -conf ${cfgFile} -port ${cfg.httpPort}";

View File

@ -67,7 +67,7 @@ in
path = mkOption { path = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "/var/run/codimd.sock"; example = "/run/codimd.sock";
description = '' description = ''
Specify where a UNIX domain socket should be placed. Specify where a UNIX domain socket should be placed.
''; '';

View File

@ -0,0 +1,67 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.services.documize;
in
{
options.services.documize = {
enable = mkEnableOption "Documize Wiki";
offline = mkEnableOption "Documize offline mode";
package = mkOption {
default = pkgs.documize-community;
type = types.package;
description = ''
Which package to use for documize.
'';
};
db = mkOption {
type = types.str;
example = "host=localhost port=5432 sslmode=disable user=admin password=secret dbname=documize";
description = ''
The DB connection string to use for the database.
'';
};
dbtype = mkOption {
type = types.enum [ "postgresql" "percona" "mariadb" "mysql" ];
description = ''
Which database to use for storage.
'';
};
port = mkOption {
type = types.port;
example = 3000;
description = ''
Which TCP port to serve.
'';
};
};
config = mkIf cfg.enable {
systemd.services.documize-server = {
wantedBy = [ "multi-user.target" ];
script = ''
${cfg.package}/bin/documize \
-db "${cfg.db}" \
-dbtype ${cfg.dbtype} \
-port ${toString cfg.port} \
-offline ${if cfg.offline then "1" else "0"}
'';
serviceConfig = {
Restart = "always";
DynamicUser = "yes";
};
};
};
}

View File

@ -32,7 +32,7 @@ let
cd ${pkgs.nextcloud} cd ${pkgs.nextcloud}
exec /run/wrappers/bin/sudo -u nextcloud \ exec /run/wrappers/bin/sudo -u nextcloud \
NEXTCLOUD_CONFIG_DIR="${cfg.home}/config" \ NEXTCLOUD_CONFIG_DIR="${cfg.home}/config" \
${config.services.phpfpm.phpPackage}/bin/php \ ${phpPackage}/bin/php \
-c ${pkgs.writeText "php.ini" phpOptionsStr}\ -c ${pkgs.writeText "php.ini" phpOptionsStr}\
occ $* occ $*
''; '';
@ -360,7 +360,7 @@ in {
environment.NEXTCLOUD_CONFIG_DIR = "${cfg.home}/config"; environment.NEXTCLOUD_CONFIG_DIR = "${cfg.home}/config";
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
serviceConfig.User = "nextcloud"; serviceConfig.User = "nextcloud";
serviceConfig.ExecStart = "${pkgs.php}/bin/php -f ${pkgs.nextcloud}/cron.php"; serviceConfig.ExecStart = "${phpPackage}/bin/php -f ${pkgs.nextcloud}/cron.php";
}; };
}; };

View File

@ -13,7 +13,7 @@ let
runDir = "/run/restya-board"; runDir = "/run/restya-board";
poolName = "restya-board"; poolName = "restya-board";
phpfpmSocketName = "/var/run/phpfpm/${poolName}.sock"; phpfpmSocketName = "/run/phpfpm/${poolName}.sock";
in in

View File

@ -4,7 +4,7 @@ let
cfg = config.services.selfoss; cfg = config.services.selfoss;
poolName = "selfoss_pool"; poolName = "selfoss_pool";
phpfpmSocketName = "/var/run/phpfpm/${poolName}.sock"; phpfpmSocketName = "/run/phpfpm/${poolName}.sock";
dataDir = "/var/lib/selfoss"; dataDir = "/var/lib/selfoss";

View File

@ -15,7 +15,7 @@ let
else cfg.database.port; else cfg.database.port;
poolName = "tt-rss"; poolName = "tt-rss";
phpfpmSocketName = "/var/run/phpfpm/${poolName}.sock"; phpfpmSocketName = "/run/phpfpm/${poolName}.sock";
tt-rss-config = pkgs.writeText "config.php" '' tt-rss-config = pkgs.writeText "config.php" ''
<?php <?php

View File

@ -22,7 +22,7 @@ in {
User: root User: root
# If available, "nobody" is much more secure for Group:. # If available, "nobody" is much more secure for Group:.
Group: root Group: root
Pid_File: /var/run/mighty.pid Pid_File: /run/mighty.pid
Logging: Yes # Yes or No Logging: Yes # Yes or No
Log_File: /var/log/mighty # The directory must be writable by User: Log_File: /var/log/mighty # The directory must be writable by User:
Log_File_Size: 16777216 # bytes Log_File_Size: 16777216 # bytes

View File

@ -20,7 +20,7 @@ in
services.xserver.desktopManager.session = [{ services.xserver.desktopManager.session = [{
name = "kodi"; name = "kodi";
start = '' start = ''
${pkgs.kodi}/bin/kodi --lircdev /var/run/lirc/lircd --standalone & ${pkgs.kodi}/bin/kodi --lircdev /run/lirc/lircd --standalone &
waitPID=$! waitPID=$!
''; '';
}]; }];

View File

@ -116,6 +116,7 @@ in
# pantheon has pantheon-agent-geoclue2 # pantheon has pantheon-agent-geoclue2
services.geoclue2.enableDemoAgent = false; services.geoclue2.enableDemoAgent = false;
services.gnome3.at-spi2-core.enable = true; services.gnome3.at-spi2-core.enable = true;
services.gnome3.evince.enable = mkDefault true;
services.gnome3.evolution-data-server.enable = true; services.gnome3.evolution-data-server.enable = true;
services.gnome3.file-roller.enable = mkDefault true; services.gnome3.file-roller.enable = mkDefault true;
# TODO: gnome-keyring's xdg autostarts will still be in the environment (from elementary-session-settings) if disabled forcefully # TODO: gnome-keyring's xdg autostarts will still be in the environment (from elementary-session-settings) if disabled forcefully
@ -162,7 +163,6 @@ in
gnome3.geary gnome3.geary
gnome3.epiphany gnome3.epiphany
gnome3.gnome-font-viewer gnome3.gnome-font-viewer
evince
] ++ pantheon.apps) config.environment.pantheon.excludePackages) ] ++ pantheon.apps) config.environment.pantheon.excludePackages)
++ (with pkgs; ++ (with pkgs;
[ [

View File

@ -221,7 +221,7 @@ in
services.xserver.displayManager.job.execCmd = '' services.xserver.displayManager.job.execCmd = ''
${optionalString (cfg.pulseaudio) ${optionalString (cfg.pulseaudio)
"export PULSE_COOKIE=/var/run/pulse/.config/pulse/cookie"} "export PULSE_COOKIE=/run/pulse/.config/pulse/cookie"}
exec ${pkgs.xpra}/bin/xpra start \ exec ${pkgs.xpra}/bin/xpra start \
--daemon=off \ --daemon=off \
--log-dir=/var/log \ --log-dir=/var/log \
@ -233,7 +233,7 @@ in
--mdns=no \ --mdns=no \
--pulseaudio=no \ --pulseaudio=no \
${optionalString (cfg.pulseaudio) "--sound-source=pulse"} \ ${optionalString (cfg.pulseaudio) "--sound-source=pulse"} \
--socket-dirs=/var/run/xpra \ --socket-dirs=/run/xpra \
--xvfb="xpra_Xdummy ${concatStringsSep " " dmcfg.xserverArgs}" \ --xvfb="xpra_Xdummy ${concatStringsSep " " dmcfg.xserverArgs}" \
${optionalString (cfg.bindTcp != null) "--bind-tcp=${cfg.bindTcp}"} \ ${optionalString (cfg.bindTcp != null) "--bind-tcp=${cfg.bindTcp}"} \
--auth=${cfg.auth} \ --auth=${cfg.auth} \

View File

@ -61,7 +61,7 @@ let
inherit (cfg) inherit (cfg)
version extraConfig extraPerEntryConfig extraEntries forceInstall useOSProber version extraConfig extraPerEntryConfig extraEntries forceInstall useOSProber
extraEntriesBeforeNixOS extraPrepareConfig extraInitrd configurationLimit copyKernels extraEntriesBeforeNixOS extraPrepareConfig extraInitrd configurationLimit copyKernels
default fsIdentifier efiSupport efiInstallAsRemovable gfxmodeEfi gfxmodeBios; default fsIdentifier efiSupport efiInstallAsRemovable gfxmodeEfi gfxmodeBios gfxpayloadEfi gfxpayloadBios;
path = with pkgs; makeBinPath ( path = with pkgs; makeBinPath (
[ coreutils gnused gnugrep findutils diffutils btrfs-progs utillinux mdadm ] [ coreutils gnused gnugrep findutils diffutils btrfs-progs utillinux mdadm ]
++ optional (cfg.efiSupport && (cfg.version == 2)) efibootmgr ++ optional (cfg.efiSupport && (cfg.version == 2)) efibootmgr
@ -393,6 +393,24 @@ in
''; '';
}; };
gfxpayloadEfi = mkOption {
default = "keep";
example = "text";
type = types.str;
description = ''
The gfxpayload to pass to GRUB when loading a graphical boot interface under EFI.
'';
};
gfxpayloadBios = mkOption {
default = "text";
example = "keep";
type = types.str;
description = ''
The gfxpayload to pass to GRUB when loading a graphical boot interface under BIOS.
'';
};
configurationLimit = mkOption { configurationLimit = mkOption {
default = 100; default = 100;
example = 120; example = 120;

View File

@ -67,6 +67,8 @@ my $efiInstallAsRemovable = get("efiInstallAsRemovable");
my $efiSysMountPoint = get("efiSysMountPoint"); my $efiSysMountPoint = get("efiSysMountPoint");
my $gfxmodeEfi = get("gfxmodeEfi"); my $gfxmodeEfi = get("gfxmodeEfi");
my $gfxmodeBios = get("gfxmodeBios"); my $gfxmodeBios = get("gfxmodeBios");
my $gfxpayloadEfi = get("gfxpayloadEfi");
my $gfxpayloadBios = get("gfxpayloadBios");
my $bootloaderId = get("bootloaderId"); my $bootloaderId = get("bootloaderId");
my $forceInstall = get("forceInstall"); my $forceInstall = get("forceInstall");
my $font = get("font"); my $font = get("font");
@ -293,10 +295,10 @@ else {
insmod gfxterm insmod gfxterm
if [ \"\${grub_platform}\" = \"efi\" ]; then if [ \"\${grub_platform}\" = \"efi\" ]; then
set gfxmode=$gfxmodeEfi set gfxmode=$gfxmodeEfi
set gfxpayload=keep set gfxpayload=$gfxpayloadEfi
else else
set gfxmode=$gfxmodeBios set gfxmode=$gfxmodeBios
set gfxpayload=text set gfxpayload=$gfxpayloadBios
fi fi
terminal_output gfxterm terminal_output gfxterm
fi fi

View File

@ -31,7 +31,7 @@ in
listenOptions = listenOptions =
mkOption { mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = ["/var/run/docker.sock"]; default = ["/run/docker.sock"];
description = description =
'' ''
A list of unix and tcp docker should listen to. The format follows A list of unix and tcp docker should listen to. The format follows

View File

@ -49,7 +49,7 @@ in {
config = mkIf cfg.enable (let config = mkIf cfg.enable (let
# Where the communication sockets live # Where the communication sockets live
runDir = "/var/run/openvswitch"; runDir = "/run/openvswitch";
# The path to the an initialized version of the database # The path to the an initialized version of the database
db = pkgs.stdenv.mkDerivation { db = pkgs.stdenv.mkDerivation {
@ -99,13 +99,13 @@ in {
--certificate=db:Open_vSwitch,SSL,certificate \ --certificate=db:Open_vSwitch,SSL,certificate \
--bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \ --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \
--unixctl=ovsdb.ctl.sock \ --unixctl=ovsdb.ctl.sock \
--pidfile=/var/run/openvswitch/ovsdb.pid \ --pidfile=/run/openvswitch/ovsdb.pid \
--detach \ --detach \
/var/db/openvswitch/conf.db /var/db/openvswitch/conf.db
''; '';
Restart = "always"; Restart = "always";
RestartSec = 3; RestartSec = 3;
PIDFile = "/var/run/openvswitch/ovsdb.pid"; PIDFile = "/run/openvswitch/ovsdb.pid";
# Use service type 'forking' to correctly determine when ovsdb-server is ready. # Use service type 'forking' to correctly determine when ovsdb-server is ready.
Type = "forking"; Type = "forking";
}; };
@ -123,10 +123,10 @@ in {
serviceConfig = { serviceConfig = {
ExecStart = '' ExecStart = ''
${cfg.package}/bin/ovs-vswitchd \ ${cfg.package}/bin/ovs-vswitchd \
--pidfile=/var/run/openvswitch/ovs-vswitchd.pid \ --pidfile=/run/openvswitch/ovs-vswitchd.pid \
--detach --detach
''; '';
PIDFile = "/var/run/openvswitch/ovs-vswitchd.pid"; PIDFile = "/run/openvswitch/ovs-vswitchd.pid";
# Use service type 'forking' to correctly determine when vswitchd is ready. # Use service type 'forking' to correctly determine when vswitchd is ready.
Type = "forking"; Type = "forking";
}; };
@ -152,11 +152,11 @@ in {
ExecStart = '' ExecStart = ''
${cfg.package}/bin/ovs-monitor-ipsec \ ${cfg.package}/bin/ovs-monitor-ipsec \
--root-prefix ${runDir}/ipsec \ --root-prefix ${runDir}/ipsec \
--pidfile /var/run/openvswitch/ovs-monitor-ipsec.pid \ --pidfile /run/openvswitch/ovs-monitor-ipsec.pid \
--monitor --detach \ --monitor --detach \
unix:/var/run/openvswitch/db.sock unix:/run/openvswitch/db.sock
''; '';
PIDFile = "/var/run/openvswitch/ovs-monitor-ipsec.pid"; PIDFile = "/run/openvswitch/ovs-monitor-ipsec.pid";
# Use service type 'forking' to correctly determine when ovs-monitor-ipsec is ready. # Use service type 'forking' to correctly determine when ovs-monitor-ipsec is ready.
Type = "forking"; Type = "forking";
}; };
@ -167,7 +167,7 @@ in {
ln -fs ${pkgs.ipsecTools}/bin/setkey ${runDir}/ipsec/usr/sbin/setkey ln -fs ${pkgs.ipsecTools}/bin/setkey ${runDir}/ipsec/usr/sbin/setkey
ln -fs ${pkgs.writeScript "racoon-restart" '' ln -fs ${pkgs.writeScript "racoon-restart" ''
#!${pkgs.runtimeShell} #!${pkgs.runtimeShell}
/var/run/current-system/sw/bin/systemctl $1 racoon /run/current-system/sw/bin/systemctl $1 racoon
''} ${runDir}/ipsec/etc/init.d/racoon ''} ${runDir}/ipsec/etc/init.d/racoon
''; '';
}; };

View File

@ -65,6 +65,7 @@ in
docker-registry = handleTest ./docker-registry.nix {}; docker-registry = handleTest ./docker-registry.nix {};
docker-tools = handleTestOn ["x86_64-linux"] ./docker-tools.nix {}; docker-tools = handleTestOn ["x86_64-linux"] ./docker-tools.nix {};
docker-tools-overlay = handleTestOn ["x86_64-linux"] ./docker-tools-overlay.nix {}; docker-tools-overlay = handleTestOn ["x86_64-linux"] ./docker-tools-overlay.nix {};
documize = handleTest ./documize.nix {};
dovecot = handleTest ./dovecot.nix {}; dovecot = handleTest ./dovecot.nix {};
# ec2-config doesn't work in a sandbox as the simulated ec2 instance needs network access # ec2-config doesn't work in a sandbox as the simulated ec2 instance needs network access
#ec2-config = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-config or {}; #ec2-config = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-config or {};
@ -193,6 +194,7 @@ in
predictable-interface-names = handleTest ./predictable-interface-names.nix {}; predictable-interface-names = handleTest ./predictable-interface-names.nix {};
printing = handleTest ./printing.nix {}; printing = handleTest ./printing.nix {};
prometheus = handleTest ./prometheus.nix {}; prometheus = handleTest ./prometheus.nix {};
prometheus2 = handleTest ./prometheus-2.nix {};
prometheus-exporters = handleTest ./prometheus-exporters.nix {}; prometheus-exporters = handleTest ./prometheus-exporters.nix {};
prosody = handleTest ./prosody.nix {}; prosody = handleTest ./prosody.nix {};
proxy = handleTest ./proxy.nix {}; proxy = handleTest ./proxy.nix {};

58
nixos/tests/documize.nix Normal file
View File

@ -0,0 +1,58 @@
import ./make-test.nix ({ pkgs, lib, ...} : {
name = "documize";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ ma27 ];
};
machine = { pkgs, ... }: {
environment.systemPackages = [ pkgs.jq ];
services.documize = {
enable = true;
port = 3000;
dbtype = "postgresql";
db = "host=localhost port=5432 sslmode=disable user=documize password=documize dbname=documize";
};
systemd.services.documize-server = {
after = [ "postgresql.service" ];
requires = [ "postgresql.service" ];
};
services.postgresql = {
enable = true;
initialScript = pkgs.writeText "psql-init" ''
CREATE ROLE documize WITH LOGIN PASSWORD 'documize';
CREATE DATABASE documize WITH OWNER documize;
'';
};
};
testScript = ''
startAll;
$machine->waitForUnit("documize-server.service");
$machine->waitForOpenPort(3000);
my $dbhash = $machine->succeed("curl -f localhost:3000 "
. " | grep 'property=\"dbhash' "
. " | grep -Po 'content=\"\\K[^\"]*'"
);
chomp($dbhash);
$machine->succeed("curl -X POST "
. "--data 'dbname=documize' "
. "--data 'dbhash=$dbhash' "
. "--data 'title=NixOS' "
. "--data 'message=Docs' "
. "--data 'firstname=John' "
. "--data 'lastname=Doe' "
. "--data 'email=john.doe\@nixos.org' "
. "--data 'password=verysafe' "
. "-f localhost:3000/api/setup"
);
$machine->succeed('test "$(curl -f localhost:3000/api/public/meta | jq ".title" | xargs echo)" = "NixOS"');
'';
})

View File

@ -2,6 +2,8 @@
config ? {}, config ? {},
pkgs ? import ../.. { inherit system config; }, pkgs ? import ../.. { inherit system config; },
enableUnfree ? false enableUnfree ? false
# To run the test on the unfree ELK use the folllowing command:
# NIXPKGS_ALLOW_UNFREE=1 nix-build nixos/tests/elk.nix -A ELK-6 --arg enableUnfree true
}: }:
with import ../lib/testing.nix { inherit system pkgs; }; with import ../lib/testing.nix { inherit system pkgs; };

View File

@ -1,5 +1,5 @@
let let
nginxRoot = "/var/run/nginx"; nginxRoot = "/run/nginx";
in in
import ./make-test.nix ({...}: { import ./make-test.nix ({...}: {
name = "nghttpx"; name = "nghttpx";

View File

@ -11,7 +11,7 @@ with lib;
machine = { machine = {
services.osquery.enable = true; services.osquery.enable = true;
services.osquery.loggerPath = "/var/log/osquery/logs"; services.osquery.loggerPath = "/var/log/osquery/logs";
services.osquery.pidfile = "/var/run/osqueryd.pid"; services.osquery.pidfile = "/run/osqueryd.pid";
}; };
testScript = '' testScript = ''
@ -23,6 +23,6 @@ with lib;
"echo 'SELECT value FROM osquery_flags WHERE name = \"logger_path\";' | osqueryi | grep /var/log/osquery/logs" "echo 'SELECT value FROM osquery_flags WHERE name = \"logger_path\";' | osqueryi | grep /var/log/osquery/logs"
); );
$machine->succeed("echo 'SELECT value FROM osquery_flags WHERE name = \"pidfile\";' | osqueryi | grep /var/run/osqueryd.pid"); $machine->succeed("echo 'SELECT value FROM osquery_flags WHERE name = \"pidfile\";' | osqueryi | grep /run/osqueryd.pid");
''; '';
}) })

View File

@ -42,7 +42,7 @@ import ./make-test.nix ({pkgs, ... }: {
# check local encrypted connections work without error # check local encrypted connections work without error
$client->succeed("lpstat -E -r") =~ /scheduler is running/ or die; $client->succeed("lpstat -E -r") =~ /scheduler is running/ or die;
# Test that UNIX socket is used for connections. # Test that UNIX socket is used for connections.
$client->succeed("lpstat -H") =~ "/var/run/cups/cups.sock" or die; $client->succeed("lpstat -H") =~ "/run/cups/cups.sock" or die;
# Test that HTTP server is available too. # Test that HTTP server is available too.
$client->succeed("curl --fail http://localhost:631/"); $client->succeed("curl --fail http://localhost:631/");
$client->succeed("curl --fail http://server:631/"); $client->succeed("curl --fail http://server:631/");

View File

@ -0,0 +1,34 @@
import ./make-test.nix {
name = "prometheus-2";
nodes = {
one = { pkgs, ... }: {
services.prometheus2 = {
enable = true;
scrapeConfigs = [{
job_name = "prometheus";
static_configs = [{
targets = [ "127.0.0.1:9090" ];
labels = { instance = "localhost"; };
}];
}];
rules = [
''
groups:
- name: test
rules:
- record: testrule
expr: count(up{job="prometheus"})
''
];
};
};
};
testScript = ''
startAll;
$one->waitForUnit("prometheus2.service");
$one->waitForOpenPort(9090);
$one->succeed("curl -s http://127.0.0.1:9090/metrics");
'';
}

View File

@ -9,11 +9,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "kid3-${version}"; name = "kid3-${version}";
version = "3.7.0"; version = "3.7.1";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/project/kid3/kid3/${version}/${name}.tar.gz"; url = "mirror://sourceforge/project/kid3/kid3/${version}/${name}.tar.gz";
sha256 = "1bj4kq9hklgfp81rbxcjzbxmdgxjqksx7cqnw3m9dc0pnns5jx0x"; sha256 = "0xkrsjrbr3z8cn8hjf623l28r3b755gr11i0clv8d8i3s10vhbd8";
}; };
buildInputs = with stdenv.lib; buildInputs = with stdenv.lib;

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "ltc-tools-${version}"; name = "ltc-tools-${version}";
version = "0.6.4"; version = "0.7.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "x42"; owner = "x42";
repo = "ltc-tools"; repo = "ltc-tools";
rev = "v${version}"; rev = "v${version}";
sha256 = "1a7r99mwc7p5j5y453mrgph67wlznd674v4k2pfmlvc91s6lh44y"; sha256 = "0vp25b970r1hv5ndzs4di63rgwnl31jfaj3jz5dka276kx34q4al";
}; };
buildInputs = [ pkgconfig libltc libsndfile jack2 ]; buildInputs = [ pkgconfig libltc libsndfile jack2 ];

View File

@ -1,11 +1,11 @@
{ fetchurl, stdenv, pkgconfig, libao, json_c, libgcrypt, ffmpeg, curl }: { fetchurl, stdenv, pkgconfig, libao, json_c, libgcrypt, ffmpeg, curl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "pianobar-2018.06.22"; name = "pianobar-2019.02.14";
src = fetchurl { src = fetchurl {
url = "http://6xq.net/projects/pianobar/${name}.tar.bz2"; url = "http://6xq.net/projects/pianobar/${name}.tar.bz2";
sha256 = "1hnlif62vsxgh8j9mcibxwj4gybpgqc11ba729kflpvvi9qmfqwl"; sha256 = "07z21vmlqpmvb3294r384iqbx972rwcx6chrdlkfv4hlnc9h7gf0";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];

View File

@ -1,14 +1,14 @@
{ stdenv, fetchurl, pkgconfig, alsaLib, libjack2, dbus, qtbase, qttools, qtx11extras }: { stdenv, fetchurl, pkgconfig, alsaLib, libjack2, dbus, qtbase, qttools, qtx11extras }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.5.5"; version = "0.5.6";
name = "qjackctl-${version}"; name = "qjackctl-${version}";
# some dependencies such as killall have to be installed additionally # some dependencies such as killall have to be installed additionally
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/qjackctl/${name}.tar.gz"; url = "mirror://sourceforge/qjackctl/${name}.tar.gz";
sha256 = "1rzzqa39a6llr52vjkjr0a86nc776kmr5xs52qqga8ms9697psz5"; sha256 = "0wlmbb9m7cf3wr7c2h2hji18592x2b119m7mx85wksjs6rjaq2mj";
}; };
buildInputs = [ buildInputs = [

View File

@ -1,12 +1,12 @@
{ stdenv, fetchurl, pkgconfig, qt5, alsaLib, libjack2 }: { stdenv, fetchurl, pkgconfig, qt5, alsaLib, libjack2 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.5.2"; version = "0.5.3";
name = "qmidinet-${version}"; name = "qmidinet-${version}";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/qmidinet/${name}.tar.gz"; url = "mirror://sourceforge/qmidinet/${name}.tar.gz";
sha256 = "0y2w3rymvc35r291sp2qaxn36wjwvxzk2iaw9y30q9fqc0vlpdns"; sha256 = "0li6iz1anm8pzz7j12yrfyxlyslsfsksmz0kk0iapa4yx3kifn10";
}; };
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];

View File

@ -3,11 +3,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "qsampler-${version}"; name = "qsampler-${version}";
version = "0.5.3"; version = "0.5.4";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/qsampler/${name}.tar.gz"; url = "mirror://sourceforge/qsampler/${name}.tar.gz";
sha256 = "02xazvz8iaksglbgq3jhw4fq3f5pdcq9sss79jxs082md0mry17d"; sha256 = "1hk0j63zzdyji5dd89spbyw79i74n28zjryyy0a4gsaq0m7j2dry";
}; };
nativeBuildInputs = [ autoconf automake libtool pkgconfig qttools ]; nativeBuildInputs = [ autoconf automake libtool pkgconfig qttools ];

View File

@ -6,11 +6,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "reaper-${version}"; name = "reaper-${version}";
version = "5.965"; version = "5.973";
src = fetchurl { src = fetchurl {
url = "https://www.reaper.fm/files/${stdenv.lib.versions.major version}.x/reaper${builtins.replaceStrings ["."] [""] version}_linux_x86_64.tar.xz"; url = "https://www.reaper.fm/files/${stdenv.lib.versions.major version}.x/reaper${builtins.replaceStrings ["."] [""] version}_linux_x86_64.tar.xz";
sha256 = "05fn7r3v4qcb1b31g8layzvqilrwdr0s8yskr61yvbhx2dnjp9iw"; sha256 = "02ymi2rn29zrb71krx43nrpfldhkcvwry4gz228apff2hb2lmqdx";
}; };
nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; nativeBuildInputs = [ autoPatchelfHook makeWrapper ];

View File

@ -4,11 +4,11 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "snd-18.8"; name = "snd-19.2";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/snd/${name}.tar.gz"; url = "mirror://sourceforge/snd/${name}.tar.gz";
sha256 = "16p6cmxl8y58wa19k1z6i66qsqaz7rld4850b0sprbxjjb6cqhf7"; sha256 = "1a6ls2hyvggss12idca22hq5vsq4jw2xkwrx22dx29i9926gdr6h";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];

View File

@ -13,11 +13,11 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "SunVox-${version}"; name = "SunVox-${version}";
version = "1.9.3b"; version = "1.9.4c";
src = fetchurl { src = fetchurl {
url = "http://www.warmplace.ru/soft/sunvox/sunvox-${version}.zip"; url = "http://www.warmplace.ru/soft/sunvox/sunvox-${version}.zip";
sha256 = "0k74rcq7niw4p17vj3zp9lpgi932896dmzqv4ln43g0pz7l18c8b"; sha256 = "19c1a4e28459e31e1a19986f219d4caa4eb2cb5bc9f6aa994abdbb2ebf6ac4ac";
}; };
buildInputs = [ unzip ]; buildInputs = [ unzip ];

View File

@ -68,5 +68,6 @@ stdenv.mkDerivation rec {
license = licenses.unfree; license = licenses.unfree;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ michalrus ]; maintainers = with maintainers; [ michalrus ];
broken = true;
}; };
} }

View File

@ -4,11 +4,11 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "traverso-${version}"; name = "traverso-${version}";
version = "0.49.5"; version = "0.49.6";
src = fetchurl { src = fetchurl {
url = "http://traverso-daw.org/traverso-0.49.5.tar.gz"; url = "http://traverso-daw.org/traverso-0.49.6.tar.gz";
sha256 = "169dsqrf807ciavrd82d3iil0xy0r3i1js08xshcrn80ws9hv63m"; sha256 = "12f7x8kw4fw1j0xkwjrp54cy4cv1ql0zwz2ba5arclk4pf6bhl7q";
}; };
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ];

View File

@ -1,10 +1,10 @@
{ stdenv, fetchurl, gtk2, glib, gdk_pixbuf, alsaLib, nss, nspr, gconf { stdenv, fetchurl, gtk2, glib, gdk_pixbuf, alsaLib, nss, nspr, gconf
, cups, libgcrypt_1_5, systemd, dbus }: , cups, libgcrypt_1_5, systemd, dbus, libXdamage, expat }:
with stdenv.lib; with stdenv.lib;
let let
bracketsLibs = makeLibraryPath [ bracketsLibs = makeLibraryPath [
gtk2 glib gdk_pixbuf stdenv.cc.cc.lib alsaLib nss nspr gconf cups libgcrypt_1_5 dbus systemd gtk2 glib gdk_pixbuf stdenv.cc.cc.lib alsaLib nss nspr gconf cups libgcrypt_1_5 dbus systemd libXdamage expat
]; ];
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {

View File

@ -6,10 +6,10 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "sigil-${version}"; name = "sigil-${version}";
version = "0.9.12"; version = "0.9.13";
src = fetchFromGitHub { src = fetchFromGitHub {
sha256 = "0zlm1jjk91cbrphrilpvxhbm26bbmgy10n7hd0fb1ml8q70q34s3"; sha256 = "05wnq7av7fgqgcqd88qjwgn55vr4ciy4f0rgi722f52vy97bw9bj";
rev = version; rev = version;
repo = "Sigil"; repo = "Sigil";
owner = "Sigil-Ebook"; owner = "Sigil-Ebook";

View File

@ -13,8 +13,8 @@ let
else throw "ImageMagick is not supported on this platform."; else throw "ImageMagick is not supported on this platform.";
cfg = { cfg = {
version = "7.0.8-22"; version = "7.0.8-34";
sha256 = "1ivljgf192xh7pq1apdic923pvcb3aq74mx8d4hi65hhc9748gv7"; sha256 = "0szkzwy0jzmwx4kqli21jq8pk3s53v37q0nsaqzascs3mpkbza2s";
patches = []; patches = [];
}; };
in in

View File

@ -17,10 +17,10 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "drawpile-${version}"; name = "drawpile-${version}";
version = "2.1.4"; version = "2.1.6";
src = fetchurl { src = fetchurl {
url = "https://drawpile.net/files/src/drawpile-${version}.tar.gz"; url = "https://drawpile.net/files/src/drawpile-${version}.tar.gz";
sha256 = "0n54p5day6gnmxqmgx4yd7q6y0mgv1nwh84yrz5r953yhd9m37rn"; sha256 = "0vwsdvphigrq1daiazi411qflahlvgx8x8ssp581bng2lbq1vrbd";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
extra-cmake-modules extra-cmake-modules

View File

@ -47,17 +47,17 @@ let
libxkbcommon libxkbcommon
]; ];
in buildRustPackage rec { in buildRustPackage rec {
name = "alacritty-${version}"; pname = "alacritty";
version = "0.2.9"; version = "0.3.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "jwilm"; owner = "jwilm";
repo = "alacritty"; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "01wzkpbz6jjmpmnkqswilnn069ir3cx3jvd3j7zsvqdxqpwncz39"; sha256 = "0d9qnymi8v4aqm2p300ccdsgavrnd64sv7v0cz5dp0sp5c0vd7jl";
}; };
cargoSha256 = "0h9wczgpjh52lhrqg0r2dkrh5svmyvrvh4yj7p0nz45skgrnl8w9"; cargoSha256 = "11gpv0h15n12f97mcwjymlzcmkldbakkkb5h931qgm3mvhhq5ay5";
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
@ -92,19 +92,20 @@ in buildRustPackage rec {
mkdir $out/Applications mkdir $out/Applications
cp -r target/release/osx/Alacritty.app $out/Applications/Alacritty.app cp -r target/release/osx/Alacritty.app $out/Applications/Alacritty.app
'' else '' '' else ''
install -D alacritty.desktop $out/share/applications/alacritty.desktop install -D extra/linux/alacritty.desktop -t $out/share/applications/
install -D extra/logo/alacritty-term.svg $out/share/icons/hicolor/scalable/apps/Alacritty.svg
patchelf --set-rpath "${stdenv.lib.makeLibraryPath rpathLibs}" $out/bin/alacritty patchelf --set-rpath "${stdenv.lib.makeLibraryPath rpathLibs}" $out/bin/alacritty
'') + '' '') + ''
install -D alacritty-completions.zsh "$out/share/zsh/site-functions/_alacritty" install -D extra/completions/_alacritty -t "$out/share/zsh/site-functions/"
install -D alacritty-completions.bash "$out/etc/bash_completion.d/alacritty-completions.bash" install -D extra/completions/alacritty.bash -t "$out/etc/bash_completion.d/"
install -D alacritty-completions.fish "$out/share/fish/vendor_completions.d/alacritty.fish" install -D extra/completions/alacritty.fish -t "$out/share/fish/vendor_completions.d/"
install -dm 755 "$out/share/man/man1" install -dm 755 "$out/share/man/man1"
gzip -c alacritty.man > "$out/share/man/man1/alacritty.1.gz" gzip -c extra/alacritty.man > "$out/share/man/man1/alacritty.1.gz"
install -dm 755 "$terminfo/share/terminfo/a/" install -dm 755 "$terminfo/share/terminfo/a/"
tic -x -o "$terminfo/share/terminfo" alacritty.info tic -x -o "$terminfo/share/terminfo" extra/alacritty.info
mkdir -p $out/nix-support mkdir -p $out/nix-support
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages echo "$terminfo" >> $out/nix-support/propagated-user-env-packages

View File

@ -1,14 +1,14 @@
{ stdenv, fetchFromGitHub, fftw, ncurses5, libpulseaudio, makeWrapper }: { stdenv, fetchFromGitHub, fftw, ncurses5, libpulseaudio, makeWrapper }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.7"; version = "1.8";
name = "cli-visualizer-${version}"; name = "cli-visualizer-${version}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "dpayne"; owner = "dpayne";
repo = "cli-visualizer"; repo = "cli-visualizer";
rev = version; rev = "v${version}";
sha256 = "06z6vj87xjmacppcxvgm47wby6mv1hnbqav8lpdk9v5s1hmmp1cr"; sha256 = "003mbbwsz43mg3d7llphpypqa9g7rs1p1cdbqi1mbc2bfrc1gcq2";
}; };
postPatch = '' postPatch = ''

View File

@ -1,8 +1,8 @@
{ stdenv, appimage-run, fetchurl }: { stdenv, appimage-run, fetchurl, gsettings-desktop-schemas, gtk3, gobject-introspection, wrapGAppsHook }:
let let
version = "1.0.140"; version = "1.0.142";
sha256 = "1114v141jayqhvkkxf7dr864j09nf5nz002c7z0pprzr00fifqzx"; sha256 = "0k7lnv3qqz17a2a2d431sic3ggi3373r5k0kwxm4017ama7d72m1";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "joplin-${version}"; name = "joplin-${version}";
@ -12,7 +12,8 @@ in
inherit sha256; inherit sha256;
}; };
buildInputs = [ appimage-run ]; nativeBuildInputs = [ wrapGAppsHook ];
buildInputs = [ appimage-run gtk3 gsettings-desktop-schemas gobject-introspection ];
unpackPhase = ":"; unpackPhase = ":";

View File

@ -3,13 +3,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "opencpn-${version}"; name = "opencpn-${version}";
version = "4.8.8"; version = "5.0.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "OpenCPN"; owner = "OpenCPN";
repo = "OpenCPN"; repo = "OpenCPN";
rev = "v${version}"; rev = "v${version}";
sha256 = "1z9xfc5fgbdslzak3iqg9nx6wggxwv8qwfxfhvfblkyg6kjw30dg"; sha256 = "1xv3h6svw9aay5ixpql231md3pf00qxvhg62z88daraf18hlkfja";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];

View File

@ -2,14 +2,14 @@
with python3Packages; with python3Packages;
buildPythonApplication rec { buildPythonApplication rec {
version = "1.25.1"; version = "1.26.0";
pname = "rtv"; pname = "rtv";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "michael-lazar"; owner = "michael-lazar";
repo = "rtv"; repo = "rtv";
rev = "v${version}"; rev = "v${version}";
sha256 = "0pfsf17g37d2v1xrsbfdbv460vs7m955h6q51z71rhb840r9812p"; sha256 = "0smwlhc4sj92365pl7yy6a821xddmh9px43nbd0kdd2z9xrndyx1";
}; };
# Tests try to access network # Tests try to access network

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub { stdenv, fetchFromGitHub
, meson, ninja, pkgconfig, pantheon, gettext, wrapGAppsHook, python3, desktop-file-utils , meson, ninja, pkgconfig, pantheon, gettext, wrapGAppsHook, python3, desktop-file-utils
, gtk3, glib, libgee, libgda, gtksourceview, libxml2, libsecret, libfixposix, libssh2 }: , gtk3, glib, libgee, libgda, gtksourceview, libxml2, libsecret, libssh2 }:
let let
@ -11,18 +11,18 @@ let
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "sequeler"; pname = "sequeler";
version = "0.6.8"; version = "0.7.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Alecaddd"; owner = "Alecaddd";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "1rx8h3bi86vk8j7c447pwm590z061js4w45nzrp66r41v0rnh5vk"; sha256 = "1x2ikagjsgnhhhwkj09ihln17mq4wjq3wwbnf02j2p3jpp4i8w1i";
}; };
nativeBuildInputs = [ meson ninja pkgconfig pantheon.vala gettext wrapGAppsHook python3 desktop-file-utils ]; nativeBuildInputs = [ meson ninja pkgconfig pantheon.vala gettext wrapGAppsHook python3 desktop-file-utils ];
buildInputs = [ gtk3 glib pantheon.granite libgee sqlGda gtksourceview libxml2 libsecret libfixposix libssh2 ]; buildInputs = [ gtk3 glib pantheon.granite libgee sqlGda gtksourceview libxml2 libsecret libssh2 ];
postPatch = '' postPatch = ''
chmod +x build-aux/meson_post_install.py chmod +x build-aux/meson_post_install.py
@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
''; '';
homepage = https://github.com/Alecaddd/sequeler; homepage = https://github.com/Alecaddd/sequeler;
license = licenses.gpl3; license = licenses.gpl3;
maintainers = [ maintainers.etu ]; maintainers = [ maintainers.etu ] ++ pantheon.maintainers;
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View File

@ -8,13 +8,13 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "waybar-${version}"; name = "waybar-${version}";
version = "0.5.0"; version = "0.5.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Alexays"; owner = "Alexays";
repo = "Waybar"; repo = "Waybar";
rev = version; rev = version;
sha256 = "006pzx4crsqn9vk28g87306xh3jrfwk4ib9cmsxqrxy8v0kl2s4g"; sha256 = "1h3ifiklzcbrvqzzhs7rij8w45k96cir2d4kkyd2ap93akvcnsr9";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -8,10 +8,10 @@
, libjpeg, zlib, dbus, dbus-glib, bzip2, xorg , libjpeg, zlib, dbus, dbus-glib, bzip2, xorg
, freetype, fontconfig, file, nspr, nss, libnotify , freetype, fontconfig, file, nspr, nss, libnotify
, yasm, libGLU_combined, sqlite, unzip, makeWrapper , yasm, libGLU_combined, sqlite, unzip, makeWrapper
, hunspell, libevent, libstartup_notification, libvpx , hunspell, libXdamage, libevent, libstartup_notification, libvpx
, icu, libpng, jemalloc, glib , icu, libpng, jemalloc, glib
, autoconf213, which, gnused, cargo, rustc, llvmPackages , autoconf213, which, gnused, cargo, rustc, llvmPackages
, rust-cbindgen, nodejs, nasm , rust-cbindgen, nodejs, nasm, fetchpatch
, debugBuild ? false , debugBuild ? false
### optionals ### optionals
@ -30,11 +30,13 @@
, privacySupport ? isTorBrowserLike || isIceCatLike , privacySupport ? isTorBrowserLike || isIceCatLike
# WARNING: NEVER set any of the options below to `true` by default. # WARNING: NEVER set any of the options below to `true` by default.
# Set to `privacySupport` or `false`. # Set to `!privacySupport` or `false`.
# webrtcSupport breaks the aarch64 build on version >= 60. # webrtcSupport breaks the aarch64 build on version >= 60, fixed in 63.
# https://bugzilla.mozilla.org/show_bug.cgi?id=1434589 # https://bugzilla.mozilla.org/show_bug.cgi?id=1434589
, webrtcSupport ? (if lib.versionAtLeast ffversion "60" && stdenv.isAarch64 then false else !privacySupport) , webrtcSupport ? !privacySupport && (!stdenv.isAarch64 || !(
lib.versionAtLeast ffversion "60" && lib.versionOlder ffversion "63"
))
, geolocationSupport ? !privacySupport , geolocationSupport ? !privacySupport
, googleAPISupport ? geolocationSupport , googleAPISupport ? geolocationSupport
, crashreporterSupport ? false , crashreporterSupport ? false
@ -92,6 +94,15 @@ let
browserPatches = [ browserPatches = [
./env_var_for_system_dir.patch ./env_var_for_system_dir.patch
] ++ lib.optionals (stdenv.isAarch64 && lib.versionAtLeast ffversion "66") [
(fetchpatch {
url = "https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/09c7fa0dc1d87922e3b464c0fa084df1227fca79/extra/firefox/arm.patch";
sha256 = "1vbpih23imhv5r3g21m3m541z08n9n9j1nvmqax76bmyhn7mxp32";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/09c7fa0dc1d87922e3b464c0fa084df1227fca79/extra/firefox/build-arm-libopus.patch";
sha256 = "1zg56v3lc346fkzcjjx21vjip2s9hb2xw4pvza1dsfdnhsnzppfp";
})
] ++ patches; ] ++ patches;
in in
@ -120,6 +131,7 @@ stdenv.mkDerivation rec {
icu libpng jemalloc glib icu libpng jemalloc glib
] ]
++ lib.optionals (!isTorBrowserLike) [ nspr nss ] ++ lib.optionals (!isTorBrowserLike) [ nspr nss ]
++ lib.optional (lib.versionOlder ffversion "53") libXdamage
++ lib.optional (lib.versionOlder ffversion "61") hunspell ++ lib.optional (lib.versionOlder ffversion "61") hunspell
# >= 66 requires nasm for the AV1 lib dav1d # >= 66 requires nasm for the AV1 lib dav1d

View File

@ -1,4 +1,4 @@
{ lib, callPackage, stdenv, fetchurl, fetchFromGitHub, fetchpatch, python3 }: { lib, callPackage, stdenv, fetchurl, fetchFromGitHub, fetchpatch, python3, overrideCC, gccStdenv, gcc6 }:
let let
@ -47,7 +47,7 @@ rec {
# the web, there are many old useful plugins targeting offline # the web, there are many old useful plugins targeting offline
# activities (e.g. ebook readers, syncronous translation, etc) that # activities (e.g. ebook readers, syncronous translation, etc) that
# will probably never be ported to WebExtensions API. # will probably never be ported to WebExtensions API.
firefox-esr-52 = common rec { firefox-esr-52 = (common rec {
pname = "firefox-esr"; pname = "firefox-esr";
ffversion = "52.9.0esr"; ffversion = "52.9.0esr";
src = fetchurl { src = fetchurl {
@ -65,6 +65,9 @@ rec {
description = "A web browser built from Firefox Extended Support Release source tree"; description = "A web browser built from Firefox Extended Support Release source tree";
knownVulnerabilities = [ "Support ended in August 2018." ]; knownVulnerabilities = [ "Support ended in August 2018." ];
}; };
}).override {
stdenv = overrideCC gccStdenv gcc6; # gcc7 fails with "undefined reference to `__divmoddi4'"
gtk3Support = false;
}; };
firefox-esr-60 = common rec { firefox-esr-60 = common rec {

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "cni-plugins-${version}"; name = "cni-plugins-${version}";
version = "0.7.4"; version = "0.7.5";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "containernetworking"; owner = "containernetworking";
repo = "plugins"; repo = "plugins";
rev = "v${version}"; rev = "v${version}";
sha256 = "1sywllwnr6lc812sgkqjdd3y10r82shl88dlnwgnbgzs738q2vp2"; sha256 = "1kfi0iz2hs4rq3cdkw12j8d47ac4f5vrpzcwcrs2yzmh2j4n5sz5";
}; };
buildInputs = [ removeReferencesTo go ]; buildInputs = [ removeReferencesTo go ];

View File

@ -1,4 +1,4 @@
{ stdenv, pkgconfig, fetchurl, python, dropbox }: { stdenv, pkgconfig, fetchurl, python3, dropbox }:
let let
version = "2019.02.14"; version = "2019.02.14";
dropboxd = "${dropbox}/bin/dropbox"; dropboxd = "${dropbox}/bin/dropbox";
@ -12,7 +12,7 @@ stdenv.mkDerivation {
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ python ]; buildInputs = [ python3 ];
phases = "unpackPhase installPhase"; phases = "unpackPhase installPhase";

View File

@ -2,7 +2,7 @@
let let
stableVersion = "2.1.15"; stableVersion = "2.1.15";
previewVersion = "2.2.0a3"; previewVersion = "2.2.0a4";
addVersion = args: addVersion = args:
let version = if args.stable then stableVersion else previewVersion; let version = if args.stable then stableVersion else previewVersion;
branch = if args.stable then "stable" else "preview"; branch = if args.stable then "stable" else "preview";
@ -18,7 +18,7 @@ in {
}; };
guiPreview = mkGui { guiPreview = mkGui {
stable = false; stable = false;
sha256Hash = "110mghkhanz92p8vfzyh4199mnihb24smxsc44a8v534ds6hww74"; sha256Hash = "1a64c314v7mbaiipyap2skqgf69pyp1ld58cn2g3d89w2zrhf5q7";
}; };
serverStable = mkServer { serverStable = mkServer {
@ -27,6 +27,6 @@ in {
}; };
serverPreview = mkServer { serverPreview = mkServer {
stable = false; stable = false;
sha256Hash = "104pvrba7n9gp7mx31xg520cfahcy0vsmbzx23007c50kp0nxc56"; sha256Hash = "1jlz8a34q3s1sz9r6swh3jnlp96602axnvh1byywry5fb9ga8mfy";
}; };
} }

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl, makeWrapper }: { stdenv, fetchurl, makeWrapper }:
let let
version = "3.6.1"; version = "3.7.1";
arch = if stdenv.is64bit then "amd64" else "x86"; arch = if stdenv.is64bit then "amd64" else "x86";
libDir = if stdenv.is64bit then "lib64" else "lib"; libDir = if stdenv.is64bit then "lib64" else "lib";
in in
@ -15,8 +15,8 @@ stdenv.mkDerivation {
"http://teamspeak.gameserver.gamed.de/ts3/releases/${version}/teamspeak3-server_linux_${arch}-${version}.tar.bz2" "http://teamspeak.gameserver.gamed.de/ts3/releases/${version}/teamspeak3-server_linux_${arch}-${version}.tar.bz2"
]; ];
sha256 = if stdenv.is64bit sha256 = if stdenv.is64bit
then "0wgnb7fdy393anridymm1frlgr86j0awxnzvd498ar5fch06ij87" then "1w60241zsvr8d1qlkca6a1sfxa1jz4w1z9kjd0wd2wkgzp4x91v7"
else "0x6p1z4qvgy464n6gnkaqrm7dns1ysyadm68sr260d39a7028q1c"; else "0s835dnaw662sb2v5ahqiwry0qjcpl7ff9krnhbw2iblsbqis3fj";
}; };
buildInputs = [ makeWrapper ]; buildInputs = [ makeWrapper ];

View File

@ -2,10 +2,10 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "jmeter-${version}"; name = "jmeter-${version}";
version = "4.0"; version = "5.1";
src = fetchurl { src = fetchurl {
url = "https://archive.apache.org/dist/jmeter/binaries/apache-${name}.tgz"; url = "https://archive.apache.org/dist/jmeter/binaries/apache-${name}.tgz";
sha256 = "1dvngvi6j8qb6nmf5a3gpi5wxck4xisj41qkrj8sjwb1f8jq6nw4"; sha256 = "04n7srrg47iyrzhskm2w5g8pd8269kjsly5ixsgifl6aqcbvxpcz";
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];

View File

@ -10,11 +10,11 @@ let
inherit (pythonPackages) python; inherit (pythonPackages) python;
in pythonPackages.buildPythonApplication rec { in pythonPackages.buildPythonApplication rec {
name = "mailnag-${version}"; name = "mailnag-${version}";
version = "1.2.1"; version = "1.3.0";
src = fetchurl { src = fetchurl {
url = "https://github.com/pulb/mailnag/archive/v${version}.tar.gz"; url = "https://github.com/pulb/mailnag/archive/v${version}.tar.gz";
sha256 = "ec7ac027d93bc7d88fc270858f5a181453a6ff07f43cab20563d185818801fee"; sha256 = "0cp5pad6jzd5c14pddbi9ap5bi78wjhk1x2p0gbblmvmcasw309s";
}; };
buildInputs = [ buildInputs = [

View File

@ -1,8 +1,8 @@
{ stdenv, fetchFromGitHub, libiconv }: { stdenv, fetchFromGitHub, fetchpatch, libiconv }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "mblaze-${version}"; name = "mblaze-${version}";
version = "0.5"; version = "0.5.1";
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv ]; buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
@ -10,9 +10,16 @@ stdenv.mkDerivation rec {
owner = "chneukirchen"; owner = "chneukirchen";
repo = "mblaze"; repo = "mblaze";
rev = "v${version}"; rev = "v${version}";
sha256 = "0fyvydafpz7vmwgn7hc4drm9sb7367smrd07wfyizpas0gmxw2j8"; sha256 = "11x548dl2jy9cmgsakqrzfdq166whhk4ja7zkiaxrapkjmkf6pbh";
}; };
patches = [
(fetchpatch {
url = "https://github.com/leahneukirchen/mblaze/commit/53151f4f890f302291eb8d3375dec4f8ecb66ed7.patch";
sha256 = "1mcyrh053iiyzdhgm09g5h3a77np496whnc7jr4agpk1nkbcpfxc";
})
];
makeFlags = "PREFIX=$(out)"; makeFlags = "PREFIX=$(out)";
postInstall = '' postInstall = ''

View File

@ -27,16 +27,16 @@ with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "mutt-${version}"; name = "mutt-${version}";
version = "1.11.3"; version = "1.11.4";
src = fetchurl { src = fetchurl {
url = "http://ftp.mutt.org/pub/mutt/${name}.tar.gz"; url = "http://ftp.mutt.org/pub/mutt/${name}.tar.gz";
sha256 = "0h8rmcc62n1pagm7mjjccd5fxyhhi4vbvp8m88digkdf5z0g8hm5"; sha256 = "0098pr4anmq2a0id8wfi2vci3cgcfwf9k4q411w22xn8lrz3aldn";
}; };
patches = optional smimeSupport (fetchpatch { patches = optional smimeSupport (fetchpatch {
url = "https://salsa.debian.org/mutt-team/mutt/raw/debian/1.11.2-2/debian/patches/misc/smime.rc.patch"; url = "https://salsa.debian.org/mutt-team/mutt/raw/debian/1.10.1-2/debian/patches/misc/smime.rc.patch";
sha256 = "1rl27qqwl4nw321ll5jcvfmkmz4fkvcsh5vihjcrhzzyf6vz8wmj"; sha256 = "0b4i00chvx6zj9pcb06x2jysmrcb2znn831lcy32cgfds6gr3nsi";
}); });
buildInputs = buildInputs =

View File

@ -1,16 +1,17 @@
{ libsmbios, stdenv, autoreconfHook, fetchFromGitHub }: { libsmbios, stdenv, autoreconfHook, fetchFromGitHub }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "netperf-20180504"; name = "netperf-${version}";
version = "20180613";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "HewlettPackard"; owner = "HewlettPackard";
repo = "netperf"; repo = "netperf";
rev = "c0a0d9f31f9940abf375a41b43a343cdbf87caab"; rev = "bcb868bde7f0203bbab69609f65d4088ba7398db";
sha256 = "0wfj9kkhar6jb5639f5wxpwsraxw4v9yzg71rsdidvj5fyncjjq2"; sha256 = "1wbbgdvhadd3qs3afv6i777argdpcyxkwz4yv6aqp223n8ki6dm8";
}; };
buildInputs = [ libsmbios ]; buildInputs = stdenv.lib.optional (stdenv.hostPlatform.isx86) libsmbios;
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [ autoreconfHook ];
autoreconfPhase = '' autoreconfPhase = ''
autoreconf -i -I src/missing/m4 autoreconf -i -I src/missing/m4

Some files were not shown because too many files have changed in this diff Show More