Merge master into staging-next

This commit is contained in:
Frederik Rietdijk 2019-04-09 16:38:35 +02:00
commit d108b49168
288 changed files with 10485 additions and 4093 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).
```nix
{ # ...
{ lib, buildPythonPackage, fetchPypi, numpy, multipledispatch, dateutil, pytest }:
datashape = buildPythonPackage rec {
pname = "datashape";
version = "0.4.7";
buildPythonPackage rec {
pname = "datashape";
version = "0.4.7";
src = fetchPypi {
inherit pname version;
sha256 = "14b2ef766d4c9652ab813182e866f493475e65e558bed0822e38bf07bba1a278";
};
src = fetchPypi {
inherit pname version;
sha256 = "14b2ef766d4c9652ab813182e866f493475e65e558bed0822e38bf07bba1a278";
};
checkInputs = with self; [ pytest ];
propagatedBuildInputs = with self; [ numpy multipledispatch dateutil ];
checkInputs = [ pytest ];
propagatedBuildInputs = [ numpy multipledispatch dateutil ];
meta = with lib; {
homepage = https://github.com/ContinuumIO/datashape;
description = "A data description language";
license = licenses.bsd2;
maintainers = with maintainers; [ fridh ];
};
meta = with lib; {
homepage = https://github.com/ContinuumIO/datashape;
description = "A data description language";
license = licenses.bsd2;
maintainers = with maintainers; [ fridh ];
};
}
```
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
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`.
```nix
{ # ...
{ lib, pkgs, buildPythonPackage, fetchPypi }:
lxml = buildPythonPackage rec {
pname = "lxml";
version = "3.4.4";
buildPythonPackage rec {
pname = "lxml";
version = "3.4.4";
src = fetchPypi {
inherit pname version;
sha256 = "16a0fa97hym9ysdk3rmqz32xdjqmy4w34ld3rm3jf5viqjx65lxk";
};
src = fetchPypi {
inherit pname version;
sha256 = "16a0fa97hym9ysdk3rmqz32xdjqmy4w34ld3rm3jf5viqjx65lxk";
};
buildInputs = with self; [ pkgs.libxml2 pkgs.libxslt ];
buildInputs = [ pkgs.libxml2 pkgs.libxslt ];
meta = with lib; {
description = "Pythonic binding for the libxml2 and libxslt libraries";
homepage = https://lxml.de;
license = licenses.bsd3;
maintainers = with maintainers; [ sjourdois ];
};
meta = with lib; {
description = "Pythonic binding for the libxml2 and libxslt libraries";
homepage = https://lxml.de;
license = licenses.bsd3;
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`.
```nix
{ # ...
{ lib, pkgs, buildPythonPackage, fetchPypi, numpy, scipy }:
pyfftw = buildPythonPackage rec {
pname = "pyFFTW";
version = "0.9.2";
buildPythonPackage rec {
pname = "pyFFTW";
version = "0.9.2";
src = fetchPypi {
inherit pname version;
sha256 = "f6bbb6afa93085409ab24885a1a3cdb8909f095a142f4d49e346f2bd1b789074";
};
src = fetchPypi {
inherit pname version;
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.
doCheck = false;
# Tests cannot import pyfftw. pyfftw works fine though.
doCheck = false;
preConfigure = ''
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"
'';
preConfigure = ''
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"
'';
meta = with lib; {
description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms";
homepage = http://hgomersall.github.com/pyFFTW;
license = with licenses; [ bsd2 bsd3 ];
maintainers = with maintainers; [ fridh ];
};
meta = with lib; {
description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms";
homepage = http://hgomersall.github.com/pyFFTW;
license = with licenses; [ bsd2 bsd3 ];
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
with import <nixpkgs> {};
with pkgs.python35Packages;
with python35Packages;
buildPythonPackage rec {
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`
```nix
{ lib, pkgs, buildPythonPackage }:
{ lib, buildPythonPackage }:
buildPythonPackage rec {
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
```nix
with import <nixpkgs> {};
( let
toolz = pkgs.callPackage /path/to/toolz/release.nix {
pkgs = pkgs;
buildPythonPackage = pkgs.python35Packages.buildPythonPackage;
toolz = callPackage /path/to/toolz/release.nix {
buildPythonPackage = python35Packages.buildPythonPackage;
};
in pkgs.python35.withPackages (ps: [ ps.numpy toolz ])
in python35.withPackages (ps: [ ps.numpy toolz ])
).env
```
@ -565,7 +561,7 @@ buildPythonPackage rec {
'';
checkInputs = [ hypothesis ];
buildInputs = [ setuptools_scm ];
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ attrs py setuptools six pluggy ];
meta = with lib; {
@ -585,11 +581,6 @@ The `buildPythonPackage` mainly does four things:
environment variable and add dependent libraries to script's `sys.path`.
* 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
e.g. the test runner, should be added to `checkInputs`.
@ -733,7 +724,7 @@ Saving the following as `default.nix`
with import <nixpkgs> {};
python.buildEnv.override {
extraLibs = [ pkgs.pythonPackages.pyramid ];
extraLibs = [ pythonPackages.pyramid ];
ignoreCollisions = true;
}
```
@ -815,11 +806,12 @@ Given a `default.nix`:
```nix
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
@ -1005,10 +997,13 @@ Create this `default.nix` file, together with a `requirements.txt` and simply ex
```nix
with import <nixpkgs> {};
with pkgs.python27Packages;
with python27Packages;
stdenv.mkDerivation {
name = "impurePythonEnv";
src = null;
buildInputs = [
# these packages are required for virtualenv and pip to work:
#
@ -1028,14 +1023,15 @@ stdenv.mkDerivation {
libxslt
libzip
stdenv
zlib ];
src = null;
zlib
];
shellHook = ''
# set SOURCE_DATE_EPOCH so that we can use python wheels
SOURCE_DATE_EPOCH=$(date +%s)
virtualenv --no-setuptools venv
export PATH=$PWD/venv/bin:$PATH
pip install -r requirements.txt
# set SOURCE_DATE_EPOCH so that we can use python wheels
SOURCE_DATE_EPOCH=$(date +%s)
virtualenv --no-setuptools venv
export PATH=$PWD/venv/bin:$PATH
pip install -r requirements.txt
'';
}
```

View File

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

View File

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

View File

@ -534,6 +534,13 @@
Same applies to the new <literal>users.ldap.daemon.rootpwmodpwFile</literal> option.
</para>
</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>
</section>

View File

@ -37,7 +37,52 @@
<itemizedlist>
<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>
</itemizedlist>
</section>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -85,7 +85,7 @@ in {
uriFile = mkOption {
type = types.path;
default = "/var/run/couchdb/couchdb.uri";
default = "/run/couchdb/couchdb.uri";
description = ''
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

View File

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

View File

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

View File

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

View File

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

View File

@ -48,8 +48,8 @@ with lib;
requiredBy = [ "postfix.service" ];
serviceConfig = {
Type = "forking";
PIDFile = "/var/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}";
PIDFile = "/run/pfix-srsd.pid";
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 = {
path = mkOption {
type = path;
default = "/var/run/postgrey.sock";
default = "/run/postgrey.sock";
description = "Path of the unix socket";
};
@ -53,7 +53,7 @@ in {
socket = mkOption {
type = socket;
default = {
path = "/var/run/postgrey.sock";
path = "/run/postgrey.sock";
mode = "0777";
};
example = {

View File

@ -174,7 +174,7 @@ in
after = [ "network.target" ];
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";
};

View File

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

View File

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

View File

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

View File

@ -38,7 +38,7 @@ in
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
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
object_cache_file=${nagiosState}/objects.cache
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
query_socket=${nagiosState}/nagios.qh
check_result_path=${nagiosState}

View File

@ -4,9 +4,24 @@ with lib;
let
cfg = config.services.prometheus;
cfg2 = config.services.prometheus2;
promUser = "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:
_filter = x: filterAttrs (k: v: k != "_module") x;
@ -17,13 +32,23 @@ let
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
writePrettyJSON = name: x:
pkgs.runCommand name { preferLocalBuild = true; } ''
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 = {
global = cfg.globalConfig;
rule_files = map (promtoolCheck "check-rules" "rules") (cfg.ruleFiles ++ [
@ -35,20 +60,53 @@ let
generatedPrometheusYml = writePrettyJSON "prometheus.yml" promConfig;
prometheusYml = let
yml = if cfg.configText != null then
yml = if cfg.configText != null then
pkgs.writeText "prometheus.yml" cfg.configText
else generatedPrometheusYml;
in promtoolCheck "check-config" "prometheus.yml" yml;
cmdlineArgs = cfg.extraFlags ++ [
"-storage.local.path=${cfg.dataDir}/metrics"
"-storage.local.path=${workingDir}/metrics"
"-config.file=${prometheusYml}"
"-web.listen-address=${cfg.listenAddress}"
"-alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity}"
"-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 {
options = {
@ -403,10 +461,21 @@ in {
};
dataDir = mkOption {
type = types.path;
default = "/var/lib/prometheus";
type = types.nullOr types.path;
default = null;
description = ''
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 {
users.groups.${promGroup}.gid = config.ids.gids.prometheus;
users.users.${promUser} = {
description = "Prometheus daemon user";
uid = config.ids.uids.prometheus;
group = promGroup;
home = cfg.dataDir;
createHome = true;
};
systemd.services.prometheus = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
script = ''
#!/bin/sh
exec ${cfg.package}/bin/prometheus \
${concatStringsSep " \\\n " cmdlineArgs}
'';
serviceConfig = {
User = promUser;
Restart = "always";
WorkingDirectory = cfg.dataDir;
enable = mkOption {
type = types.bool;
default = false;
description = ''
Enable the Prometheus 2 monitoring daemon.
'';
};
package = mkOption {
type = types.package;
default = pkgs.prometheus_2;
defaultText = "pkgs.prometheus_2";
description = ''
The prometheus2 package that should be used.
'';
};
listenAddress = mkOption {
type = types.str;
default = "0.0.0.0:9090";
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;
stateDir = "/var/run/zabbix";
stateDir = "/run/zabbix";
logDir = "/var/log/zabbix";

View File

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

View File

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

View File

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

View File

@ -25,8 +25,8 @@ let
blackhole { badnetworks; };
forward first;
forwarders { ${concatMapStrings (entry: " ${entry}; ") cfg.forwarders} };
directory "/var/run/named";
pid-file "/var/run/named/named.pid";
directory "/run/named";
pid-file "/run/named/named.pid";
${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
fi
${pkgs.coreutils}/bin/mkdir -p /var/run/named
chown ${bindUser} /var/run/named
${pkgs.coreutils}/bin/mkdir -p /run/named
chown ${bindUser} /run/named
'';
serviceConfig = {

View File

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

View File

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

View File

@ -63,7 +63,7 @@ in
passwordFile = mkOption {
type = types.str;
default = "";
description = "File that containts password";
description = "File that contains password";
};
};
}));
@ -100,7 +100,7 @@ in
passwordFile = mkOption {
type = types.str;
default = "";
description = "File that containts password";
description = "File that contains password";
};
};
@ -120,7 +120,7 @@ in
description = "iodine client - ${name}";
after = [ "network.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 = {
RestartSec = "30s";
Restart = "always";
@ -136,7 +136,7 @@ in
description = "iodine, ip over dns server daemon";
after = [ "network.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
* 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 = {
description = "lldpd user";
group = "_lldpd";
home = "/var/run/lldpd";
home = "/run/lldpd";
isSystemUser = true;
};
users.groups._lldpd = {};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,7 +6,7 @@ let
cfg = config.networking.wireless;
configFile = if cfg.networks != {} then pkgs.writeText "wpa_supplicant.conf" ''
${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''}
${cfg.extraConfig}
${concatStringsSep "\n" (mapAttrsToList (ssid: config: with config; let

View File

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

View File

@ -74,7 +74,7 @@ let
${concatMapStrings (addr: ''
Listen ${addr}
'') 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

View File

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

View File

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

View File

@ -67,7 +67,7 @@ in
path = mkOption {
type = types.nullOr types.str;
default = null;
example = "/var/run/codimd.sock";
example = "/run/codimd.sock";
description = ''
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

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

View File

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

View File

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

View File

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

View File

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

View File

@ -221,7 +221,7 @@ in
services.xserver.displayManager.job.execCmd = ''
${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 \
--daemon=off \
--log-dir=/var/log \
@ -233,7 +233,7 @@ in
--mdns=no \
--pulseaudio=no \
${optionalString (cfg.pulseaudio) "--sound-source=pulse"} \
--socket-dirs=/var/run/xpra \
--socket-dirs=/run/xpra \
--xvfb="xpra_Xdummy ${concatStringsSep " " dmcfg.xserverArgs}" \
${optionalString (cfg.bindTcp != null) "--bind-tcp=${cfg.bindTcp}"} \
--auth=${cfg.auth} \

View File

@ -61,7 +61,7 @@ let
inherit (cfg)
version extraConfig extraPerEntryConfig extraEntries forceInstall useOSProber
extraEntriesBeforeNixOS extraPrepareConfig extraInitrd configurationLimit copyKernels
default fsIdentifier efiSupport efiInstallAsRemovable gfxmodeEfi gfxmodeBios;
default fsIdentifier efiSupport efiInstallAsRemovable gfxmodeEfi gfxmodeBios gfxpayloadEfi gfxpayloadBios;
path = with pkgs; makeBinPath (
[ coreutils gnused gnugrep findutils diffutils btrfs-progs utillinux mdadm ]
++ 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 {
default = 100;
example = 120;

View File

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

View File

@ -31,7 +31,7 @@ in
listenOptions =
mkOption {
type = types.listOf types.str;
default = ["/var/run/docker.sock"];
default = ["/run/docker.sock"];
description =
''
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
# Where the communication sockets live
runDir = "/var/run/openvswitch";
runDir = "/run/openvswitch";
# The path to the an initialized version of the database
db = pkgs.stdenv.mkDerivation {
@ -99,13 +99,13 @@ in {
--certificate=db:Open_vSwitch,SSL,certificate \
--bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \
--unixctl=ovsdb.ctl.sock \
--pidfile=/var/run/openvswitch/ovsdb.pid \
--pidfile=/run/openvswitch/ovsdb.pid \
--detach \
/var/db/openvswitch/conf.db
'';
Restart = "always";
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.
Type = "forking";
};
@ -123,10 +123,10 @@ in {
serviceConfig = {
ExecStart = ''
${cfg.package}/bin/ovs-vswitchd \
--pidfile=/var/run/openvswitch/ovs-vswitchd.pid \
--pidfile=/run/openvswitch/ovs-vswitchd.pid \
--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.
Type = "forking";
};
@ -152,11 +152,11 @@ in {
ExecStart = ''
${cfg.package}/bin/ovs-monitor-ipsec \
--root-prefix ${runDir}/ipsec \
--pidfile /var/run/openvswitch/ovs-monitor-ipsec.pid \
--pidfile /run/openvswitch/ovs-monitor-ipsec.pid \
--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.
Type = "forking";
};
@ -167,7 +167,7 @@ in {
ln -fs ${pkgs.ipsecTools}/bin/setkey ${runDir}/ipsec/usr/sbin/setkey
ln -fs ${pkgs.writeScript "racoon-restart" ''
#!${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
'';
};

View File

@ -65,6 +65,7 @@ in
docker-registry = handleTest ./docker-registry.nix {};
docker-tools = handleTestOn ["x86_64-linux"] ./docker-tools.nix {};
docker-tools-overlay = handleTestOn ["x86_64-linux"] ./docker-tools-overlay.nix {};
documize = handleTest ./documize.nix {};
dovecot = handleTest ./dovecot.nix {};
# 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 {};
@ -193,6 +194,7 @@ in
predictable-interface-names = handleTest ./predictable-interface-names.nix {};
printing = handleTest ./printing.nix {};
prometheus = handleTest ./prometheus.nix {};
prometheus2 = handleTest ./prometheus-2.nix {};
prometheus-exporters = handleTest ./prometheus-exporters.nix {};
prosody = handleTest ./prosody.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 ? {},
pkgs ? import ../.. { inherit system config; },
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; };

View File

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

View File

@ -11,7 +11,7 @@ with lib;
machine = {
services.osquery.enable = true;
services.osquery.loggerPath = "/var/log/osquery/logs";
services.osquery.pidfile = "/var/run/osqueryd.pid";
services.osquery.pidfile = "/run/osqueryd.pid";
};
testScript = ''
@ -23,6 +23,6 @@ with lib;
"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
$client->succeed("lpstat -E -r") =~ /scheduler is running/ or die;
# 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.
$client->succeed("curl --fail http://localhost: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 {
name = "kid3-${version}";
version = "3.7.0";
version = "3.7.1";
src = fetchurl {
url = "mirror://sourceforge/project/kid3/kid3/${version}/${name}.tar.gz";
sha256 = "1bj4kq9hklgfp81rbxcjzbxmdgxjqksx7cqnw3m9dc0pnns5jx0x";
sha256 = "0xkrsjrbr3z8cn8hjf623l28r3b755gr11i0clv8d8i3s10vhbd8";
};
buildInputs = with stdenv.lib;

View File

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

View File

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

View File

@ -6,11 +6,11 @@
stdenv.mkDerivation rec {
name = "reaper-${version}";
version = "5.965";
version = "5.973";
src = fetchurl {
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 ];

View File

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

View File

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

View File

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

View File

@ -1,10 +1,10 @@
{ 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;
let
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
stdenv.mkDerivation rec {

View File

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

View File

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

View File

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

View File

@ -47,17 +47,17 @@ let
libxkbcommon
];
in buildRustPackage rec {
name = "alacritty-${version}";
version = "0.2.9";
pname = "alacritty";
version = "0.3.0";
src = fetchFromGitHub {
owner = "jwilm";
repo = "alacritty";
repo = pname;
rev = "v${version}";
sha256 = "01wzkpbz6jjmpmnkqswilnn069ir3cx3jvd3j7zsvqdxqpwncz39";
sha256 = "0d9qnymi8v4aqm2p300ccdsgavrnd64sv7v0cz5dp0sp5c0vd7jl";
};
cargoSha256 = "0h9wczgpjh52lhrqg0r2dkrh5svmyvrvh4yj7p0nz45skgrnl8w9";
cargoSha256 = "11gpv0h15n12f97mcwjymlzcmkldbakkkb5h931qgm3mvhhq5ay5";
nativeBuildInputs = [
cmake
@ -92,19 +92,20 @@ in buildRustPackage rec {
mkdir $out/Applications
cp -r target/release/osx/Alacritty.app $out/Applications/Alacritty.app
'' 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
'') + ''
install -D alacritty-completions.zsh "$out/share/zsh/site-functions/_alacritty"
install -D alacritty-completions.bash "$out/etc/bash_completion.d/alacritty-completions.bash"
install -D alacritty-completions.fish "$out/share/fish/vendor_completions.d/alacritty.fish"
install -D extra/completions/_alacritty -t "$out/share/zsh/site-functions/"
install -D extra/completions/alacritty.bash -t "$out/etc/bash_completion.d/"
install -D extra/completions/alacritty.fish -t "$out/share/fish/vendor_completions.d/"
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/"
tic -x -o "$terminfo/share/terminfo" alacritty.info
tic -x -o "$terminfo/share/terminfo" extra/alacritty.info
mkdir -p $out/nix-support
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub
, 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
@ -11,18 +11,18 @@ let
in stdenv.mkDerivation rec {
pname = "sequeler";
version = "0.6.8";
version = "0.7.0";
src = fetchFromGitHub {
owner = "Alecaddd";
repo = pname;
rev = "v${version}";
sha256 = "1rx8h3bi86vk8j7c447pwm590z061js4w45nzrp66r41v0rnh5vk";
sha256 = "1x2ikagjsgnhhhwkj09ihln17mq4wjq3wwbnf02j2p3jpp4i8w1i";
};
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 = ''
chmod +x build-aux/meson_post_install.py
@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
'';
homepage = https://github.com/Alecaddd/sequeler;
license = licenses.gpl3;
maintainers = [ maintainers.etu ];
maintainers = [ maintainers.etu ] ++ pantheon.maintainers;
platforms = platforms.linux;
};
}

View File

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

View File

@ -8,7 +8,7 @@
, libjpeg, zlib, dbus, dbus-glib, bzip2, xorg
, freetype, fontconfig, file, nspr, nss, libnotify
, yasm, libGLU_combined, sqlite, unzip, makeWrapper
, hunspell, libevent, libstartup_notification, libvpx
, hunspell, libXdamage, libevent, libstartup_notification, libvpx
, icu, libpng, jemalloc, glib
, autoconf213, which, gnused, cargo, rustc, llvmPackages
, rust-cbindgen, nodejs, nasm, fetchpatch
@ -131,6 +131,7 @@ stdenv.mkDerivation rec {
icu libpng jemalloc glib
]
++ lib.optionals (!isTorBrowserLike) [ nspr nss ]
++ lib.optional (lib.versionOlder ffversion "53") libXdamage
++ lib.optional (lib.versionOlder ffversion "61") hunspell
# >= 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
@ -47,7 +47,7 @@ rec {
# the web, there are many old useful plugins targeting offline
# activities (e.g. ebook readers, syncronous translation, etc) that
# will probably never be ported to WebExtensions API.
firefox-esr-52 = common rec {
firefox-esr-52 = (common rec {
pname = "firefox-esr";
ffversion = "52.9.0esr";
src = fetchurl {
@ -65,6 +65,9 @@ rec {
description = "A web browser built from Firefox Extended Support Release source tree";
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 {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,13 +1,14 @@
{ libsmbios, stdenv, autoreconfHook, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "netperf-20180504";
name = "netperf-${version}";
version = "20180613";
src = fetchFromGitHub {
owner = "HewlettPackard";
repo = "netperf";
rev = "c0a0d9f31f9940abf375a41b43a343cdbf87caab";
sha256 = "0wfj9kkhar6jb5639f5wxpwsraxw4v9yzg71rsdidvj5fyncjjq2";
rev = "bcb868bde7f0203bbab69609f65d4088ba7398db";
sha256 = "1wbbgdvhadd3qs3afv6i777argdpcyxkwz4yv6aqp223n8ki6dm8";
};
buildInputs = stdenv.lib.optional (stdenv.hostPlatform.isx86) libsmbios;

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "ncdc-${version}";
version = "1.20";
version = "1.21";
src = fetchurl {
url = "https://dev.yorhel.nl/download/ncdc-${version}.tar.gz";
sha256 = "0ccn7dqbqpqsbglqyalz32c20rjvf1pw0zr88jyvd2b2vxbqi6ca";
sha256 = "10hrk7pcvfl9cj6d0kr4qf3l068ikqhccbg7lf25pr2kln9lz412";
};
nativeBuildInputs = [ pkgconfig ];

View File

@ -3,11 +3,11 @@
stdenv.mkDerivation rec {
name = "teamviewer-${version}";
version = "14.1.3399";
version = "14.2.2558";
src = fetchurl {
url = "https://dl.tvcdn.de/download/linux/version_14x/teamviewer_${version}_amd64.deb";
sha256 = "166ndijis2i3afz3l6nsnrdhs56v33w5cnjd0m7giqj0fbq43ws5";
sha256 = "1wfdvs0jfhm1ri1mni4bf9qszzca17p07w6ih7k4k0x4j8ga18cs";
};
unpackPhase = ''

View File

@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
name = "ledger-${version}";
version = "3.1.2";
version = "3.1.3";
src = fetchFromGitHub {
owner = "ledger";
repo = "ledger";
rev = version;
sha256 = "0hwnipj2m9p95hhyv6kyq54m27g14r58gnsy2my883kxhpcyb2vc";
rev = "v${version}";
sha256 = "0bfnrqrd6wqgsngfpqi30xh6yy86pwl25iwzrqy44q31r0zl4mm3";
};
buildInputs = [

View File

@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
name = "wordgrinder-${version}";
version = "0.7.1";
version = "0.7.2";
src = fetchFromGitHub {
repo = "wordgrinder";
owner = "davidgiven";
rev = "${version}";
sha256 = "19n4vn8zyvcvgwygm63d3jcmiwh6a2ikrrqqmkm8fvhdvwkqgr9k";
sha256 = "1zqx3p9l22njni44ads3fyw3xh6807wmb5k1x2glg61z81cwc6sf";
};
makeFlags = [

View File

@ -72,7 +72,7 @@ stdenv.mkDerivation rec {
# The store path to "which" is baked into src/library/base/R/unix/system.unix.R,
# but Nix cannot detect it as a run-time dependency because the installed file
# is compiled and compressed, which hides the store path.
postInstall = "echo ${which} > $out/nix-support/undetected-runtime-dependencies";
postFixup = "echo ${which} > $out/nix-support/undetected-runtime-dependencies";
doCheck = true;
preCheck = "export TZ=CET; bin/Rscript -e 'sessionInfo()'";

View File

@ -0,0 +1,18 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts jq
set -eu -o pipefail
oldVersion="$(nix-instantiate --eval -E "with import ./. {}; git.version or (builtins.parseDrvName git.name).version" | tr -d '"')"
latestTag="$(git ls-remote --tags --sort="v:refname" git://github.com/git/git.git | grep -v '\{\}' | grep -v '\-rc' | tail -1 | sed 's|^.*/v\(.*\)|\1|')"
if [ ! "${oldVersion}" = "${latestTag}" ]; then
update-source-version git "${latestTag}"
nixpkgs="$(git rev-parse --show-toplevel)"
default_nix="$nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix"
nix-build -A git
git add "${default_nix}"
git commit -m "git: ${oldVersion} -> ${latestTag}"
else
echo "git is already up-to-date"
fi

View File

@ -4,7 +4,7 @@
let
# if you bump version, update pkgs.tortoisehg too or ping maintainer
version = "4.9";
version = "4.9.1";
name = "mercurial-${version}";
inherit (python2Packages) docutils hg-git dulwich python;
in python2Packages.buildPythonApplication {
@ -13,7 +13,7 @@ in python2Packages.buildPythonApplication {
src = fetchurl {
url = "https://mercurial-scm.org/release/${name}.tar.gz";
sha256 = "01ig0464cvy9d87rn274g39frxr0p5q4lxf1xn5k3m24grf0qq0g";
sha256 = "0iybbkd9add066729zg01kwz5hhc1s6lhp9rrnsmzq6ihyxj3p8v";
};
inherit python; # pass it so that the same version can be used in hg2git

View File

@ -1,54 +1,19 @@
{ fetchurl, stdenv, perl, makeWrapper
, iproute, acpi, sysstat, xset, playerctl
, cmus, openvpn, lm_sensors, alsaUtils
, scripts ? [ "bandwidth" "battery" "cpu_usage" "disk" "iface"
"keyindicator" "load_average" "mediaplayer" "memory"
"openvpn" "temperature" "volume" "wifi" ]
}:
{ fetchFromGitHub, stdenv, autoreconfHook }:
with stdenv.lib;
let
perlscripts = [ "battery" "cpu_usage" "keyindicator"
"mediaplayer" "openvpn" "temperature" ];
contains_any = l1: l2: 0 < length( intersectLists l1 l2 );
in
stdenv.mkDerivation rec {
name = "i3blocks-${version}";
version = "1.4";
version = "unstable-2019-02-07";
src = fetchurl {
url = "https://github.com/vivien/i3blocks/releases/download/${version}/${name}.tar.gz";
sha256 = "c64720057e22cc7cac5e8fcd58fd37e75be3a7d5a3cb8995841a7f18d30c0536";
src = fetchFromGitHub {
owner = "vivien";
repo = "i3blocks";
rev = "ec050e79ad8489a6f8deb37d4c20ab10729c25c3";
sha256 = "1fx4230lmqa5rpzph68dwnpcjfaaqv5gfkradcr85hd1z8d1qp1b";
};
buildFlags = "SYSCONFDIR=/etc all";
installFlags = "PREFIX=\${out} VERSION=${version}";
buildInputs = optional (contains_any scripts perlscripts) perl;
nativeBuildInputs = [ makeWrapper ];
postFixup = ''
wrapProgram $out/libexec/i3blocks/bandwidth \
--prefix PATH : ${makeBinPath (optional (elem "bandwidth" scripts) iproute)}
wrapProgram $out/libexec/i3blocks/battery \
--prefix PATH : ${makeBinPath (optional (elem "battery" scripts) acpi)}
wrapProgram $out/libexec/i3blocks/cpu_usage \
--prefix PATH : ${makeBinPath (optional (elem "cpu_usage" scripts) sysstat)}
wrapProgram $out/libexec/i3blocks/iface \
--prefix PATH : ${makeBinPath (optional (elem "iface" scripts) iproute)}
wrapProgram $out/libexec/i3blocks/keyindicator \
--prefix PATH : ${makeBinPath (optional (elem "keyindicator" scripts) xset)}
wrapProgram $out/libexec/i3blocks/mediaplayer \
--prefix PATH : ${makeBinPath (optionals (elem "mediaplayer" scripts) [playerctl cmus])}
wrapProgram $out/libexec/i3blocks/openvpn \
--prefix PATH : ${makeBinPath (optional (elem "openvpn" scripts) openvpn)}
wrapProgram $out/libexec/i3blocks/temperature \
--prefix PATH : ${makeBinPath (optional (elem "temperature" scripts) lm_sensors)}
wrapProgram $out/libexec/i3blocks/volume \
--prefix PATH : ${makeBinPath (optional (elem "volume" scripts) alsaUtils)}
'';
nativeBuildInputs = [ autoreconfHook ];
meta = {
description = "A flexible scheduler for your i3bar blocks";

View File

@ -1,4 +1,4 @@
# Generated by carnix 0.9.8: carnix generate-nix
# Generated by carnix 0.9.10: carnix generate-nix
{ lib, buildPlatform, buildRustCrate, buildRustCrateHelpers, cratesIO, fetchgit }:
with buildRustCrateHelpers;
let inherit (lib.lists) fold;
@ -6,10 +6,10 @@ let inherit (lib.lists) fold;
in
rec {
crates = cratesIO;
carnix = crates.crates.carnix."0.9.8" deps;
carnix = crates.crates.carnix."0.10.0" deps;
__all = [ (carnix {}) ];
deps.aho_corasick."0.6.8" = {
memchr = "2.1.0";
deps.aho_corasick."0.6.10" = {
memchr = "2.2.0";
};
deps.ansi_term."0.11.0" = {
winapi = "0.3.6";
@ -18,48 +18,51 @@ rec {
blake2_rfc = "0.2.18";
scoped_threadpool = "0.1.9";
};
deps.arrayvec."0.4.7" = {
nodrop = "0.1.12";
deps.arrayvec."0.4.10" = {
nodrop = "0.1.13";
};
deps.atty."0.2.11" = {
termion = "1.5.1";
libc = "0.2.43";
libc = "0.2.50";
winapi = "0.3.6";
};
deps.backtrace."0.3.9" = {
cfg_if = "0.1.6";
rustc_demangle = "0.1.9";
backtrace_sys = "0.1.24";
libc = "0.2.43";
deps.autocfg."0.1.2" = {};
deps.backtrace."0.3.14" = {
cfg_if = "0.1.7";
rustc_demangle = "0.1.13";
autocfg = "0.1.2";
backtrace_sys = "0.1.28";
libc = "0.2.50";
winapi = "0.3.6";
};
deps.backtrace_sys."0.1.24" = {
libc = "0.2.43";
cc = "1.0.25";
deps.backtrace_sys."0.1.28" = {
libc = "0.2.50";
cc = "1.0.32";
};
deps.bitflags."1.0.4" = {};
deps.blake2_rfc."0.2.18" = {
arrayvec = "0.4.7";
arrayvec = "0.4.10";
constant_time_eq = "0.1.3";
};
deps.carnix."0.9.8" = {
deps.carnix."0.10.0" = {
clap = "2.32.0";
dirs = "1.0.4";
env_logger = "0.5.13";
error_chain = "0.12.0";
itertools = "0.7.8";
log = "0.4.5";
dirs = "1.0.5";
env_logger = "0.6.1";
failure = "0.1.5";
failure_derive = "0.1.5";
itertools = "0.8.0";
log = "0.4.6";
nom = "3.2.1";
regex = "1.0.5";
serde = "1.0.80";
serde_derive = "1.0.80";
serde_json = "1.0.32";
regex = "1.1.2";
serde = "1.0.89";
serde_derive = "1.0.89";
serde_json = "1.0.39";
tempdir = "0.3.7";
toml = "0.4.8";
toml = "0.5.0";
url = "1.7.2";
};
deps.cc."1.0.25" = {};
deps.cfg_if."0.1.6" = {};
deps.cc."1.0.32" = {};
deps.cfg_if."0.1.7" = {};
deps.clap."2.32.0" = {
atty = "0.2.11";
bitflags = "1.0.4";
@ -69,158 +72,168 @@ rec {
vec_map = "0.8.1";
ansi_term = "0.11.0";
};
deps.cloudabi."0.0.3" = {
bitflags = "1.0.4";
};
deps.constant_time_eq."0.1.3" = {};
deps.dirs."1.0.4" = {
redox_users = "0.2.0";
libc = "0.2.43";
deps.dirs."1.0.5" = {
redox_users = "0.3.0";
libc = "0.2.50";
winapi = "0.3.6";
};
deps.either."1.5.0" = {};
deps.env_logger."0.5.13" = {
deps.either."1.5.1" = {};
deps.env_logger."0.6.1" = {
atty = "0.2.11";
humantime = "1.1.1";
log = "0.4.5";
regex = "1.0.5";
humantime = "1.2.0";
log = "0.4.6";
regex = "1.1.2";
termcolor = "1.0.4";
};
deps.error_chain."0.12.0" = {
backtrace = "0.3.9";
deps.failure."0.1.5" = {
backtrace = "0.3.14";
failure_derive = "0.1.5";
};
deps.failure."0.1.3" = {
backtrace = "0.3.9";
failure_derive = "0.1.3";
deps.failure_derive."0.1.5" = {
proc_macro2 = "0.4.27";
quote = "0.6.11";
syn = "0.15.29";
synstructure = "0.10.1";
};
deps.failure_derive."0.1.3" = {
proc_macro2 = "0.4.20";
quote = "0.6.8";
syn = "0.15.13";
synstructure = "0.10.0";
};
deps.fuchsia_zircon."0.3.3" = {
bitflags = "1.0.4";
fuchsia_zircon_sys = "0.3.3";
};
deps.fuchsia_zircon_sys."0.3.3" = {};
deps.humantime."1.1.1" = {
deps.fuchsia_cprng."0.1.1" = {};
deps.humantime."1.2.0" = {
quick_error = "1.2.2";
};
deps.idna."0.1.5" = {
matches = "0.1.8";
unicode_bidi = "0.3.4";
unicode_normalization = "0.1.7";
unicode_normalization = "0.1.8";
};
deps.itertools."0.7.8" = {
either = "1.5.0";
deps.itertools."0.8.0" = {
either = "1.5.1";
};
deps.itoa."0.4.3" = {};
deps.lazy_static."1.1.0" = {
version_check = "0.1.5";
};
deps.libc."0.2.43" = {};
deps.log."0.4.5" = {
cfg_if = "0.1.6";
deps.lazy_static."1.3.0" = {};
deps.libc."0.2.50" = {};
deps.log."0.4.6" = {
cfg_if = "0.1.7";
};
deps.matches."0.1.8" = {};
deps.memchr."1.0.2" = {
libc = "0.2.43";
libc = "0.2.50";
};
deps.memchr."2.1.0" = {
cfg_if = "0.1.6";
libc = "0.2.43";
version_check = "0.1.5";
};
deps.nodrop."0.1.12" = {};
deps.memchr."2.2.0" = {};
deps.nodrop."0.1.13" = {};
deps.nom."3.2.1" = {
memchr = "1.0.2";
};
deps.percent_encoding."1.0.1" = {};
deps.proc_macro2."0.4.20" = {
deps.proc_macro2."0.4.27" = {
unicode_xid = "0.1.0";
};
deps.quick_error."1.2.2" = {};
deps.quote."0.6.8" = {
proc_macro2 = "0.4.20";
deps.quote."0.6.11" = {
proc_macro2 = "0.4.27";
};
deps.rand."0.4.3" = {
fuchsia_zircon = "0.3.3";
libc = "0.2.43";
deps.rand."0.4.6" = {
rand_core = "0.3.1";
rdrand = "0.4.0";
fuchsia_cprng = "0.1.1";
libc = "0.2.50";
winapi = "0.3.6";
};
deps.redox_syscall."0.1.40" = {};
deps.rand_core."0.3.1" = {
rand_core = "0.4.0";
};
deps.rand_core."0.4.0" = {};
deps.rand_os."0.1.3" = {
rand_core = "0.4.0";
rdrand = "0.4.0";
cloudabi = "0.0.3";
fuchsia_cprng = "0.1.1";
libc = "0.2.50";
winapi = "0.3.6";
};
deps.rdrand."0.4.0" = {
rand_core = "0.3.1";
};
deps.redox_syscall."0.1.51" = {};
deps.redox_termios."0.1.1" = {
redox_syscall = "0.1.40";
redox_syscall = "0.1.51";
};
deps.redox_users."0.2.0" = {
deps.redox_users."0.3.0" = {
argon2rs = "0.2.5";
failure = "0.1.3";
rand = "0.4.3";
redox_syscall = "0.1.40";
failure = "0.1.5";
rand_os = "0.1.3";
redox_syscall = "0.1.51";
};
deps.regex."1.0.5" = {
aho_corasick = "0.6.8";
memchr = "2.1.0";
regex_syntax = "0.6.2";
deps.regex."1.1.2" = {
aho_corasick = "0.6.10";
memchr = "2.2.0";
regex_syntax = "0.6.5";
thread_local = "0.3.6";
utf8_ranges = "1.0.1";
utf8_ranges = "1.0.2";
};
deps.regex_syntax."0.6.2" = {
ucd_util = "0.1.1";
deps.regex_syntax."0.6.5" = {
ucd_util = "0.1.3";
};
deps.remove_dir_all."0.5.1" = {
winapi = "0.3.6";
};
deps.rustc_demangle."0.1.9" = {};
deps.ryu."0.2.6" = {};
deps.rustc_demangle."0.1.13" = {};
deps.ryu."0.2.7" = {};
deps.scoped_threadpool."0.1.9" = {};
deps.serde."1.0.80" = {};
deps.serde_derive."1.0.80" = {
proc_macro2 = "0.4.20";
quote = "0.6.8";
syn = "0.15.13";
deps.serde."1.0.89" = {};
deps.serde_derive."1.0.89" = {
proc_macro2 = "0.4.27";
quote = "0.6.11";
syn = "0.15.29";
};
deps.serde_json."1.0.32" = {
deps.serde_json."1.0.39" = {
itoa = "0.4.3";
ryu = "0.2.6";
serde = "1.0.80";
ryu = "0.2.7";
serde = "1.0.89";
};
deps.smallvec."0.6.9" = {};
deps.strsim."0.7.0" = {};
deps.syn."0.15.13" = {
proc_macro2 = "0.4.20";
quote = "0.6.8";
deps.syn."0.15.29" = {
proc_macro2 = "0.4.27";
quote = "0.6.11";
unicode_xid = "0.1.0";
};
deps.synstructure."0.10.0" = {
proc_macro2 = "0.4.20";
quote = "0.6.8";
syn = "0.15.13";
deps.synstructure."0.10.1" = {
proc_macro2 = "0.4.27";
quote = "0.6.11";
syn = "0.15.29";
unicode_xid = "0.1.0";
};
deps.tempdir."0.3.7" = {
rand = "0.4.3";
rand = "0.4.6";
remove_dir_all = "0.5.1";
};
deps.termcolor."1.0.4" = {
wincolor = "1.0.1";
};
deps.termion."1.5.1" = {
libc = "0.2.43";
redox_syscall = "0.1.40";
libc = "0.2.50";
redox_syscall = "0.1.51";
redox_termios = "0.1.1";
};
deps.textwrap."0.10.0" = {
unicode_width = "0.1.5";
};
deps.thread_local."0.3.6" = {
lazy_static = "1.1.0";
lazy_static = "1.3.0";
};
deps.toml."0.4.8" = {
serde = "1.0.80";
deps.toml."0.5.0" = {
serde = "1.0.89";
};
deps.ucd_util."0.1.1" = {};
deps.ucd_util."0.1.3" = {};
deps.unicode_bidi."0.3.4" = {
matches = "0.1.8";
};
deps.unicode_normalization."0.1.7" = {};
deps.unicode_normalization."0.1.8" = {
smallvec = "0.6.9";
};
deps.unicode_width."0.1.5" = {};
deps.unicode_xid."0.1.0" = {};
deps.url."1.7.2" = {
@ -228,20 +241,19 @@ rec {
matches = "0.1.8";
percent_encoding = "1.0.1";
};
deps.utf8_ranges."1.0.1" = {};
deps.utf8_ranges."1.0.2" = {};
deps.vec_map."0.8.1" = {};
deps.version_check."0.1.5" = {};
deps.winapi."0.3.6" = {
winapi_i686_pc_windows_gnu = "0.4.0";
winapi_x86_64_pc_windows_gnu = "0.4.0";
};
deps.winapi_i686_pc_windows_gnu."0.4.0" = {};
deps.winapi_util."0.1.1" = {
deps.winapi_util."0.1.2" = {
winapi = "0.3.6";
};
deps.winapi_x86_64_pc_windows_gnu."0.4.0" = {};
deps.wincolor."1.0.1" = {
winapi = "0.3.6";
winapi_util = "0.1.1";
winapi_util = "0.1.2";
};
}

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