Merge master into staging-next

This commit is contained in:
Frederik Rietdijk 2019-12-29 10:19:39 +01:00
commit fb66525297
273 changed files with 4748 additions and 2531 deletions

View File

@ -66,6 +66,15 @@ pet = buildGoModule rec {
</callout> </callout>
</calloutlist> </calloutlist>
</para> </para>
<para>
<varname>modSha256</varname> can also take <varname>null</varname> as an input.
When `null` is used as a value, the derivation won't be a
fixed-output derivation but disable the build sandbox instead. This can be useful outside
of nixpkgs where re-generating the modSha256 on each mod.sum changes is cumbersome,
but will fail to build by Hydra, as builds with a disabled sandbox are discouraged.
</para>
</section> </section>
<section xml:id="ssec-go-legacy"> <section xml:id="ssec-go-legacy">

View File

@ -2005,7 +2005,7 @@
name = "Edward Tjörnhammar"; name = "Edward Tjörnhammar";
}; };
eelco = { eelco = {
email = "eelco.dolstra@logicblox.com"; email = "edolstra+nixpkgs@gmail.com";
github = "edolstra"; github = "edolstra";
githubId = 1148549; githubId = 1148549;
name = "Eelco Dolstra"; name = "Eelco Dolstra";
@ -2968,7 +2968,12 @@
infinisil = { infinisil = {
email = "contact@infinisil.com"; email = "contact@infinisil.com";
github = "infinisil"; github = "infinisil";
githubId = 20525370;
name = "Silvan Mosberger"; name = "Silvan Mosberger";
keys = [{
longkeyid = "rsa4096/0x422E9EDAE0157170";
fingerprint = "6C2B 55D4 4E04 8266 6B7D DA1A 422E 9EDA E015 7170";
}];
}; };
ingenieroariel = { ingenieroariel = {
email = "ariel@nunez.co"; email = "ariel@nunez.co";
@ -4898,12 +4903,6 @@
githubId = 364510; githubId = 364510;
name = "Tobias Geerinckx-Rice"; name = "Tobias Geerinckx-Rice";
}; };
ndowens = {
email = "ndowens04@gmail.com";
github = "ndowens";
githubId = 117743;
name = "Nathan Owens";
};
neeasade = { neeasade = {
email = "nathanisom27@gmail.com"; email = "nathanisom27@gmail.com";
github = "neeasade"; github = "neeasade";

View File

@ -11,50 +11,46 @@
<programlisting> <programlisting>
{ {
<xref linkend="opt-services.httpd.virtualHosts"/> = <xref linkend="opt-services.httpd.virtualHosts"/> =
[ { hostName = "example.org"; { "blog.example.org" = {
documentRoot = "/webroot"; documentRoot = "/webroot/blog.example.org";
adminAddr = "alice@example.org"; adminAddr = "alice@example.org";
enableUserDir = true; forceSSL = true;
} enableACME = true;
{ hostName = "example.org"; enablePHP = true;
documentRoot = "/webroot"; };
"wiki.example.org" = {
documentRoot = "/webroot/wiki.example.org";
adminAddr = "alice@example.org"; adminAddr = "alice@example.org";
enableUserDir = true; forceSSL = true;
enableSSL = true; enableACME = true;
sslServerCert = "/root/ssl-example-org.crt"; enablePHP = true;
sslServerKey = "/root/ssl-example-org.key"; };
} };
];
} }
</programlisting> </programlisting>
It defines two virtual hosts with nearly identical configuration; the only It defines two virtual hosts with nearly identical configuration; the only
difference is that the second one has SSL enabled. To prevent this difference is the document root directories. To prevent this
duplication, we can use a <literal>let</literal>: duplication, we can use a <literal>let</literal>:
<programlisting> <programlisting>
let let
exampleOrgCommon = commonConfig =
{ hostName = "example.org"; { adminAddr = "alice@example.org";
documentRoot = "/webroot"; forceSSL = true;
adminAddr = "alice@example.org"; enableACME = true;
enableUserDir = true;
}; };
in in
{ {
<xref linkend="opt-services.httpd.virtualHosts"/> = <xref linkend="opt-services.httpd.virtualHosts"/> =
[ exampleOrgCommon { "blog.example.org" = (commonConfig // { documentRoot = "/webroot/blog.example.org"; });
(exampleOrgCommon // { "wiki.example.org" = (commonConfig // { documentRoot = "/webroot/wiki.example.com"; });
enableSSL = true; };
sslServerCert = "/root/ssl-example-org.crt";
sslServerKey = "/root/ssl-example-org.key";
})
];
} }
</programlisting> </programlisting>
The <literal>let exampleOrgCommon = <replaceable>...</replaceable></literal> The <literal>let commonConfig = <replaceable>...</replaceable></literal>
defines a variable named <literal>exampleOrgCommon</literal>. The defines a variable named <literal>commonConfig</literal>. The
<literal>//</literal> operator merges two attribute sets, so the <literal>//</literal> operator merges two attribute sets, so the
configuration of the second virtual host is the set configuration of the second virtual host is the set
<literal>exampleOrgCommon</literal> extended with the SSL options. <literal>commonConfig</literal> extended with the document root option.
</para> </para>
<para> <para>
@ -63,13 +59,13 @@ in
<programlisting> <programlisting>
{ {
<xref linkend="opt-services.httpd.virtualHosts"/> = <xref linkend="opt-services.httpd.virtualHosts"/> =
let exampleOrgCommon = <replaceable>...</replaceable>; in let commonConfig = <replaceable>...</replaceable>; in
[ exampleOrgCommon { "blog.example.org" = (commonConfig // { <replaceable>...</replaceable> })
(exampleOrgCommon // { <replaceable>...</replaceable> }) "wiki.example.org" = (commonConfig // { <replaceable>...</replaceable> })
]; };
} }
</programlisting> </programlisting>
but not <literal>{ let exampleOrgCommon = <replaceable>...</replaceable>; in but not <literal>{ let commonConfig = <replaceable>...</replaceable>; in
<replaceable>...</replaceable>; }</literal> since attributes (as opposed to <replaceable>...</replaceable>; }</literal> since attributes (as opposed to
attribute values) are not expressions. attribute values) are not expressions.
</para> </para>
@ -77,80 +73,29 @@ in
<para> <para>
<emphasis>Functions</emphasis> provide another method of abstraction. For <emphasis>Functions</emphasis> provide another method of abstraction. For
instance, suppose that we want to generate lots of different virtual hosts, instance, suppose that we want to generate lots of different virtual hosts,
all with identical configuration except for the host name. This can be done all with identical configuration except for the document root. This can be done
as follows: as follows:
<programlisting> <programlisting>
{ {
<xref linkend="opt-services.httpd.virtualHosts"/> = <xref linkend="opt-services.httpd.virtualHosts"/> =
let let
makeVirtualHost = name: makeVirtualHost = webroot:
{ hostName = name; { documentRoot = webroot;
documentRoot = "/webroot";
adminAddr = "alice@example.org"; adminAddr = "alice@example.org";
forceSSL = true;
enableACME = true;
}; };
in in
[ (makeVirtualHost "example.org") { "example.org" = (makeVirtualHost "/webroot/example.org");
(makeVirtualHost "example.com") "example.com" = (makeVirtualHost "/webroot/example.com");
(makeVirtualHost "example.gov") "example.gov" = (makeVirtualHost "/webroot/example.gov");
(makeVirtualHost "example.nl") "example.nl" = (makeVirtualHost "/webroot/example.nl");
]; };
} }
</programlisting> </programlisting>
Here, <varname>makeVirtualHost</varname> is a function that takes a single Here, <varname>makeVirtualHost</varname> is a function that takes a single
argument <literal>name</literal> and returns the configuration for a virtual argument <literal>webroot</literal> and returns the configuration for a virtual
host. That function is then called for several names to produce the list of host. That function is then called for several names to produce the list of
virtual host configurations. virtual host configurations.
</para> </para>
<para>
We can further improve on this by using the function <varname>map</varname>,
which applies another function to every element in a list:
<programlisting>
{
<xref linkend="opt-services.httpd.virtualHosts"/> =
let
makeVirtualHost = <replaceable>...</replaceable>;
in map makeVirtualHost
[ "example.org" "example.com" "example.gov" "example.nl" ];
}
</programlisting>
(The function <literal>map</literal> is called a <emphasis>higher-order
function</emphasis> because it takes another function as an argument.)
</para>
<para>
What if you need more than one argument, for instance, if we want to use a
different <literal>documentRoot</literal> for each virtual host? Then we can
make <varname>makeVirtualHost</varname> a function that takes a
<emphasis>set</emphasis> as its argument, like this:
<programlisting>
{
<xref linkend="opt-services.httpd.virtualHosts"/> =
let
makeVirtualHost = { name, root }:
{ hostName = name;
documentRoot = root;
adminAddr = "alice@example.org";
};
in map makeVirtualHost
[ { name = "example.org"; root = "/sites/example.org"; }
{ name = "example.com"; root = "/sites/example.com"; }
{ name = "example.gov"; root = "/sites/example.gov"; }
{ name = "example.nl"; root = "/sites/example.nl"; }
];
}
</programlisting>
But in this case (where every root is a subdirectory of
<filename>/sites</filename> named after the virtual host), it would have been
shorter to define <varname>makeVirtualHost</varname> as
<programlisting>
makeVirtualHost = name:
{ hostName = name;
documentRoot = "/sites/${name}";
adminAddr = "alice@example.org";
};
</programlisting>
Here, the construct <literal>${<replaceable>...</replaceable>}</literal>
allows the result of an expression to be spliced into a string.
</para>
</section> </section>

View File

@ -27,7 +27,7 @@
{ <xref linkend="opt-services.httpd.enable"/> = true; { <xref linkend="opt-services.httpd.enable"/> = true;
<xref linkend="opt-services.httpd.adminAddr"/> = "alice@example.org"; <xref linkend="opt-services.httpd.adminAddr"/> = "alice@example.org";
<xref linkend="opt-services.httpd.documentRoot"/> = "/webroot"; <link linkend="opt-services.httpd.virtualHosts">services.httpd.virtualHosts.localhost.documentRoot</link> = "/webroot";
} }
</programlisting> </programlisting>
defines a configuration with three option definitions that together enable defines a configuration with three option definitions that together enable
@ -50,7 +50,11 @@
httpd = { httpd = {
enable = true; enable = true;
adminAddr = "alice@example.org"; adminAddr = "alice@example.org";
documentRoot = "/webroot"; virtualHosts = {
localhost = {
documentRoot = "/webroot";
};
};
}; };
}; };
} }

View File

@ -14,6 +14,26 @@
<refsynopsisdiv> <refsynopsisdiv>
<cmdsynopsis> <cmdsynopsis>
<command>nixos-install</command> <command>nixos-install</command>
<arg>
<group choice='req'>
<arg choice='plain'>
<option>--verbose</option>
</arg>
<arg choice='plain'>
<option>-v</option>
</arg>
</group>
</arg>
<arg>
<group choice='req'>
<arg choice='plain'>
<option>--print-build-logs</option>
</arg>
<arg choice='plain'>
<option>-L</option>
</arg>
</group>
</arg>
<arg> <arg>
<arg choice='plain'> <arg choice='plain'>
<option>-I</option> <option>-I</option>
@ -134,6 +154,23 @@
This command accepts the following options: This command accepts the following options:
</para> </para>
<variablelist> <variablelist>
<varlistentry>
<term><option>--verbose</option> / <option>-v</option></term>
<listitem>
<para>Increases the level of verbosity of diagnostic messages
printed on standard error. For each Nix operation, the information
printed on standard output is well-defined; any diagnostic
information is printed on standard error, never on standard
output.</para>
<para>Please note that this option may be specified repeatedly.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--print-build-logs</option> / <option>-L</option></term>
<listitem>
<para>Print the full build logs of <command>nix build</command> to stderr.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<option>--root</option> <option>--root</option>

View File

@ -264,6 +264,14 @@ services.xserver.displayManager.defaultSession = "xfce+icewm";
in container config. in container config.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
The <literal>kresd</literal> services deprecates the <literal>interfaces</literal> option
in favor of the <literal>listenPlain</literal> option which requires full
<link xlink:href="https://www.freedesktop.org/software/systemd/man/systemd.socket.html#ListenStream=">systemd.socket compatible</link>
declaration which always include a port.
</para>
</listitem>
<listitem> <listitem>
<para> <para>
Virtual console options have been reorganized and can be found under Virtual console options have been reorganized and can be found under
@ -317,16 +325,38 @@ services.xserver.displayManager.defaultSession = "xfce+icewm";
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The <link linkend="opt-services.awstats">awstats</link> module has been rewritten The <link linkend="opt-services.awstats.enable">awstats</link> module has been rewritten
to serve stats via static html pages, updated on a timer, over <link linkend="opt-services.nginx.virtualHosts">nginx</link>, to serve stats via static html pages, updated on a timer, over <link linkend="opt-services.nginx.virtualHosts">nginx</link>,
instead of dynamic cgi pages over <link linkend="opt-services.httpd">apache</link>. instead of dynamic cgi pages over <link linkend="opt-services.httpd.enable">apache</link>.
</para> </para>
<para> <para>
Minor changes will be required to migrate existing configurations. Details of the Minor changes will be required to migrate existing configurations. Details of the
required changes can seen by looking through the <link linkend="opt-services.awstats">awstats</link> required changes can seen by looking through the <link linkend="opt-services.awstats.enable">awstats</link>
module. module.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
The httpd module no longer provides options to support serving web content without defining a virtual host. As a
result of this the <link linkend="opt-services.httpd.logPerVirtualHost">services.httpd.logPerVirtualHost</link>
option now defaults to <literal>true</literal> instead of <literal>false</literal>. Please update your
configuration to make use of <link linkend="opt-services.httpd.virtualHosts">services.httpd.virtualHosts</link>.
</para>
<para>
The <link linkend="opt-services.httpd.virtualHosts">services.httpd.virtualHosts.&lt;name&gt;</link>
option has changed type from a list of submodules to an attribute set of submodules, better matching
<link linkend="opt-services.nginx.virtualHosts">services.nginx.virtualHosts.&lt;name&gt;</link>.
</para>
<para>
This change comes with the addition of the following options which mimic the functionality of their <literal>nginx</literal> counterparts:
<link linkend="opt-services.httpd.virtualHosts">services.httpd.virtualHosts.&lt;name&gt;.addSSL</link>,
<link linkend="opt-services.httpd.virtualHosts">services.httpd.virtualHosts.&lt;name&gt;.forceSSL</link>,
<link linkend="opt-services.httpd.virtualHosts">services.httpd.virtualHosts.&lt;name&gt;.onlySSL</link>,
<link linkend="opt-services.httpd.virtualHosts">services.httpd.virtualHosts.&lt;name&gt;.enableACME</link>,
<link linkend="opt-services.httpd.virtualHosts">services.httpd.virtualHosts.&lt;name&gt;.acmeRoot</link>, and
<link linkend="opt-services.httpd.virtualHosts">services.httpd.virtualHosts.&lt;name&gt;.useACMEHost</link>.
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>

View File

@ -58,7 +58,7 @@ let
device = mkOption { device = mkOption {
example = "/dev/sda3"; example = "/dev/sda3";
type = types.str; type = types.str;
description = "Path of the device."; description = "Path of the device or swap file.";
}; };
label = mkOption { label = mkOption {

View File

@ -501,7 +501,7 @@ if (-f $fb_modes_file && -r $fb_modes_file) {
my $console_width = $1, my $console_height = $2; my $console_width = $1, my $console_height = $2;
if ($console_width > 1920) { if ($console_width > 1920) {
push @attrs, "# High-DPI console"; push @attrs, "# High-DPI console";
push @attrs, 'i18n.consoleFont = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";'; push @attrs, 'console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";';
} }
} }

View File

@ -14,6 +14,8 @@ extraBuildFlags=()
mountPoint=/mnt mountPoint=/mnt
channelPath= channelPath=
system= system=
verbosity=()
buildLogs=
while [ "$#" -gt 0 ]; do while [ "$#" -gt 0 ]; do
i="$1"; shift 1 i="$1"; shift 1
@ -55,6 +57,12 @@ while [ "$#" -gt 0 ]; do
--debug) --debug)
set -x set -x
;; ;;
-v*|--verbose)
verbosity+=("$i")
;;
-L|--print-build-logs)
buildLogs="$i"
;;
*) *)
echo "$0: unknown option \`$i'" echo "$0: unknown option \`$i'"
exit 1 exit 1
@ -94,7 +102,7 @@ if [[ -z $system ]]; then
outLink="$tmpdir/system" outLink="$tmpdir/system"
nix build --out-link "$outLink" --store "$mountPoint" "${extraBuildFlags[@]}" \ nix build --out-link "$outLink" --store "$mountPoint" "${extraBuildFlags[@]}" \
--extra-substituters "$sub" \ --extra-substituters "$sub" \
-f '<nixpkgs/nixos>' system -I "nixos-config=$NIXOS_CONFIG" -f '<nixpkgs/nixos>' system -I "nixos-config=$NIXOS_CONFIG" ${verbosity[@]} ${buildLogs}
system=$(readlink -f $outLink) system=$(readlink -f $outLink)
fi fi
@ -103,7 +111,7 @@ fi
# a progress bar. # a progress bar.
nix-env --store "$mountPoint" "${extraBuildFlags[@]}" \ nix-env --store "$mountPoint" "${extraBuildFlags[@]}" \
--extra-substituters "$sub" \ --extra-substituters "$sub" \
-p $mountPoint/nix/var/nix/profiles/system --set "$system" -p $mountPoint/nix/var/nix/profiles/system --set "$system" ${verbosity[@]}
# Copy the NixOS/Nixpkgs sources to the target as the initial contents # Copy the NixOS/Nixpkgs sources to the target as the initial contents
# of the NixOS channel. # of the NixOS channel.
@ -115,7 +123,8 @@ if [[ -z $noChannelCopy ]]; then
echo "copying channel..." echo "copying channel..."
mkdir -p $mountPoint/nix/var/nix/profiles/per-user/root mkdir -p $mountPoint/nix/var/nix/profiles/per-user/root
nix-env --store "$mountPoint" "${extraBuildFlags[@]}" --extra-substituters "$sub" \ nix-env --store "$mountPoint" "${extraBuildFlags[@]}" --extra-substituters "$sub" \
-p $mountPoint/nix/var/nix/profiles/per-user/root/channels --set "$channelPath" --quiet -p $mountPoint/nix/var/nix/profiles/per-user/root/channels --set "$channelPath" --quiet \
${verbosity[@]}
install -m 0700 -d $mountPoint/root/.nix-defexpr install -m 0700 -d $mountPoint/root/.nix-defexpr
ln -sfn /nix/var/nix/profiles/per-user/root/channels $mountPoint/root/.nix-defexpr/channels ln -sfn /nix/var/nix/profiles/per-user/root/channels $mountPoint/root/.nix-defexpr/channels
fi fi

View File

@ -68,7 +68,7 @@ let
{ BORG_PASSPHRASE = passphrase; } { BORG_PASSPHRASE = passphrase; }
else { }; else { };
mkBackupService = name: cfg: mkBackupService = name: cfg:
let let
userHome = config.users.users.${cfg.user}.home; userHome = config.users.users.${cfg.user}.home;
in nameValuePair "borgbackup-job-${name}" { in nameValuePair "borgbackup-job-${name}" {
@ -98,6 +98,23 @@ let
inherit (cfg) startAt; inherit (cfg) startAt;
}; };
# utility function around makeWrapper
mkWrapperDrv = {
original, name, set ? {}
}:
pkgs.runCommandNoCC "${name}-wrapper" {
buildInputs = [ pkgs.makeWrapper ];
} (with lib; ''
makeWrapper "${original}" "$out/bin/${name}" \
${concatStringsSep " \\\n " (mapAttrsToList (name: value: ''--set ${name} "${value}"'') set)}
'');
mkBorgWrapper = name: cfg: mkWrapperDrv {
original = "${pkgs.borgbackup}/bin/borg";
name = "borg-job-${name}";
set = { BORG_REPO = cfg.repo; } // (mkPassEnv cfg) // cfg.environment;
};
# Paths listed in ReadWritePaths must exist before service is started # Paths listed in ReadWritePaths must exist before service is started
mkActivationScript = name: cfg: mkActivationScript = name: cfg:
let let
@ -176,7 +193,11 @@ in {
###### interface ###### interface
options.services.borgbackup.jobs = mkOption { options.services.borgbackup.jobs = mkOption {
description = "Deduplicating backups using BorgBackup."; description = ''
Deduplicating backups using BorgBackup.
Adding a job will cause a borg-job-NAME wrapper to be added
to your system path, so that you can perform maintenance easily.
'';
default = { }; default = { };
example = literalExample '' example = literalExample ''
{ {
@ -623,6 +644,6 @@ in {
users = mkMerge (mapAttrsToList mkUsersConfig repos); users = mkMerge (mapAttrsToList mkUsersConfig repos);
environment.systemPackages = with pkgs; [ borgbackup ]; environment.systemPackages = with pkgs; [ borgbackup ] ++ (mapAttrsToList mkBorgWrapper jobs);
}); });
} }

View File

@ -221,8 +221,8 @@ in
type = types.lines; type = types.lines;
description = '' description = ''
Additional <command>hwdb</command> files. They'll be written Additional <command>hwdb</command> files. They'll be written
into file <filename>10-local.hwdb</filename>. Thus they are into file <filename>99-local.hwdb</filename>. Thus they are
read before all other files. read after all other files.
''; '';
}; };

View File

@ -65,6 +65,7 @@ let
"ValidHTTPCodes" = "404"; "ValidHTTPCodes" = "404";
} }
''; '';
description = "Extra configuration to be appendend to awstats.\${name}.conf.";
}; };
webService = { webService = {

View File

@ -71,7 +71,7 @@ in
maxPower = mkOption { maxPower = mkOption {
type = types.int; type = types.int;
default = 115; default = 113;
description = "Miner max watt usage."; description = "Miner max watt usage.";
}; };
@ -92,7 +92,9 @@ in
serviceConfig = { serviceConfig = {
DynamicUser = true; DynamicUser = true;
ExecStartPre = "${pkgs.ethminer}/bin/.ethminer-wrapped --list-devices";
ExecStartPost = optional (cfg.toolkit == "cuda") "+${getBin config.boot.kernelPackages.nvidia_x11}/bin/nvidia-smi -pl ${toString cfg.maxPower}"; ExecStartPost = optional (cfg.toolkit == "cuda") "+${getBin config.boot.kernelPackages.nvidia_x11}/bin/nvidia-smi -pl ${toString cfg.maxPower}";
Restart = "always";
}; };
environment = { environment = {

View File

@ -8,6 +8,7 @@ let
nagiosState = "/var/lib/nagios"; nagiosState = "/var/lib/nagios";
nagiosLogDir = "/var/log/nagios"; nagiosLogDir = "/var/log/nagios";
urlPath = "/nagios";
nagiosObjectDefs = cfg.objectDefs; nagiosObjectDefs = cfg.objectDefs;
@ -49,12 +50,12 @@ let
'' ''
main_config_file=${cfg.mainConfigFile} main_config_file=${cfg.mainConfigFile}
use_authentication=0 use_authentication=0
url_html_path=${cfg.urlPath} url_html_path=${urlPath}
''; '';
extraHttpdConfig = extraHttpdConfig =
'' ''
ScriptAlias ${cfg.urlPath}/cgi-bin ${pkgs.nagios}/sbin ScriptAlias ${urlPath}/cgi-bin ${pkgs.nagios}/sbin
<Directory "${pkgs.nagios}/sbin"> <Directory "${pkgs.nagios}/sbin">
Options ExecCGI Options ExecCGI
@ -62,7 +63,7 @@ let
SetEnv NAGIOS_CGI_CONFIG ${cfg.cgiConfigFile} SetEnv NAGIOS_CGI_CONFIG ${cfg.cgiConfigFile}
</Directory> </Directory>
Alias ${cfg.urlPath} ${pkgs.nagios}/share Alias ${urlPath} ${pkgs.nagios}/share
<Directory "${pkgs.nagios}/share"> <Directory "${pkgs.nagios}/share">
Options None Options None
@ -72,6 +73,10 @@ let
in in
{ {
imports = [
(mkRemovedOptionModule [ "services" "nagios" "urlPath" ] "The urlPath option has been removed as it is hard coded to /nagios in the nagios package.")
];
options = { options = {
services.nagios = { services.nagios = {
enable = mkOption { enable = mkOption {
@ -128,13 +133,20 @@ in
"; ";
}; };
urlPath = mkOption { virtualHost = mkOption {
default = "/nagios"; type = types.submodule (import ../web-servers/apache-httpd/per-server-options.nix);
description = " example = literalExample ''
The URL path under which the Nagios web interface appears. { hostName = "example.org";
That is, you can access the Nagios web interface through adminAddr = "webmaster@example.org";
<literal>http://<replaceable>server</replaceable>/<replaceable>urlPath</replaceable></literal>. enableSSL = true;
"; sslServerCert = "/var/lib/acme/example.org/full.pem";
sslServerKey = "/var/lib/acme/example.org/key.pem";
}
'';
description = ''
Apache configuration can be done by adapting <option>services.httpd.virtualHosts</option>.
See <xref linkend="opt-services.httpd.virtualHosts"/> for further information.
'';
}; };
}; };
}; };
@ -182,6 +194,8 @@ in
''; '';
}; };
services.httpd.extraConfig = optionalString cfg.enableWebInterface extraHttpdConfig; services.httpd.virtualHosts = optionalAttrs cfg.enableWebInterface {
${cfg.virtualHost.hostName} = mkMerge [ cfg.virtualHost { extraConfig = extraHttpdConfig; } ];
};
}; };
} }

View File

@ -13,6 +13,17 @@ in
{ {
meta.maintainers = [ maintainers.vcunat /* upstream developer */ ]; meta.maintainers = [ maintainers.vcunat /* upstream developer */ ];
imports = [
(mkChangedOptionModule [ "services" "kresd" "interfaces" ] [ "services" "kresd" "listenPlain" ]
(config:
let value = getAttrFromPath [ "services" "kresd" "interfaces" ] config;
in map
(iface: if elem ":" (stringToCharacters iface) then "[${iface}]:53" else "${iface}:53") # Syntax depends on being IPv6 or IPv4.
value
)
)
];
###### interface ###### interface
options.services.kresd = { options.services.kresd = {
enable = mkOption { enable = mkOption {
@ -39,11 +50,12 @@ in
Directory for caches. They are intended to survive reboots. Directory for caches. They are intended to survive reboots.
''; '';
}; };
interfaces = mkOption { listenPlain = mkOption {
type = with types; listOf str; type = with types; listOf str;
default = [ "::1" "127.0.0.1" ]; default = [ "[::1]:53" "127.0.0.1:53" ];
description = '' description = ''
What addresses the server should listen on. (UDP+TCP 53) What addresses and ports the server should listen on.
For detailed syntax see ListenStream in man systemd.socket.
''; '';
}; };
listenTLS = mkOption { listenTLS = mkOption {
@ -51,7 +63,7 @@ in
default = []; default = [];
example = [ "198.51.100.1:853" "[2001:db8::1]:853" "853" ]; example = [ "198.51.100.1:853" "[2001:db8::1]:853" "853" ];
description = '' description = ''
Addresses on which kresd should provide DNS over TLS (see RFC 7858). Addresses and ports on which kresd should provide DNS over TLS (see RFC 7858).
For detailed syntax see ListenStream in man systemd.socket. For detailed syntax see ListenStream in man systemd.socket.
''; '';
}; };
@ -76,10 +88,7 @@ in
systemd.sockets.kresd = rec { systemd.sockets.kresd = rec {
wantedBy = [ "sockets.target" ]; wantedBy = [ "sockets.target" ];
before = wantedBy; before = wantedBy;
listenStreams = map listenStreams = cfg.listenPlain;
# Syntax depends on being IPv6 or IPv4.
(iface: if elem ":" (stringToCharacters iface) then "[${iface}]:53" else "${iface}:53")
cfg.interfaces;
socketConfig = { socketConfig = {
ListenDatagram = listenStreams; ListenDatagram = listenStreams;
FreeBind = true; FreeBind = true;

View File

@ -3,7 +3,7 @@
let let
inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption; inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption;
inherit (lib) mapAttrs optional optionalString types; inherit (lib) literalExample mapAttrs optional optionalString types;
cfg = config.services.limesurvey; cfg = config.services.limesurvey;
fpm = config.services.phpfpm.pools.limesurvey; fpm = config.services.phpfpm.pools.limesurvey;
@ -100,19 +100,15 @@ in
}; };
virtualHost = mkOption { virtualHost = mkOption {
type = types.submodule ({ type = types.submodule (import ../web-servers/apache-httpd/per-server-options.nix);
options = import ../web-servers/apache-httpd/per-server-options.nix { example = literalExample ''
inherit lib; {
forMainServer = false; hostName = "survey.example.org";
}; adminAddr = "webmaster@example.org";
}); forceSSL = true;
example = { enableACME = true;
hostName = "survey.example.org"; }
enableSSL = true; '';
adminAddr = "webmaster@example.org";
sslServerCert = "/var/lib/acme/survey.example.org/full.pem";
sslServerKey = "/var/lib/acme/survey.example.org/key.pem";
};
description = '' description = ''
Apache configuration can be done by adapting <literal>services.httpd.virtualHosts.&lt;name&gt;</literal>. Apache configuration can be done by adapting <literal>services.httpd.virtualHosts.&lt;name&gt;</literal>.
See <xref linkend="opt-services.httpd.virtualHosts"/> for further information. See <xref linkend="opt-services.httpd.virtualHosts"/> for further information.
@ -184,7 +180,7 @@ in
config = { config = {
tempdir = "${stateDir}/tmp"; tempdir = "${stateDir}/tmp";
uploaddir = "${stateDir}/upload"; uploaddir = "${stateDir}/upload";
force_ssl = mkIf cfg.virtualHost.enableSSL "on"; force_ssl = mkIf (cfg.virtualHost.addSSL || cfg.virtualHost.forceSSL || cfg.virtualHost.onlySSL) "on";
config.defaultlang = "en"; config.defaultlang = "en";
}; };
}; };
@ -215,38 +211,36 @@ in
enable = true; enable = true;
adminAddr = mkDefault cfg.virtualHost.adminAddr; adminAddr = mkDefault cfg.virtualHost.adminAddr;
extraModules = [ "proxy_fcgi" ]; extraModules = [ "proxy_fcgi" ];
virtualHosts = [ (mkMerge [ virtualHosts.${cfg.virtualHost.hostName} = mkMerge [ cfg.virtualHost {
cfg.virtualHost { documentRoot = mkForce "${pkg}/share/limesurvey";
documentRoot = mkForce "${pkg}/share/limesurvey"; extraConfig = ''
extraConfig = '' Alias "/tmp" "${stateDir}/tmp"
Alias "/tmp" "${stateDir}/tmp" <Directory "${stateDir}">
<Directory "${stateDir}"> AllowOverride all
AllowOverride all Require all granted
Require all granted Options -Indexes +FollowSymlinks
Options -Indexes +FollowSymlinks </Directory>
</Directory>
Alias "/upload" "${stateDir}/upload" Alias "/upload" "${stateDir}/upload"
<Directory "${stateDir}/upload"> <Directory "${stateDir}/upload">
AllowOverride all AllowOverride all
Require all granted Require all granted
Options -Indexes Options -Indexes
</Directory> </Directory>
<Directory "${pkg}/share/limesurvey"> <Directory "${pkg}/share/limesurvey">
<FilesMatch "\.php$"> <FilesMatch "\.php$">
<If "-f %{REQUEST_FILENAME}"> <If "-f %{REQUEST_FILENAME}">
SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/" SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/"
</If> </If>
</FilesMatch> </FilesMatch>
AllowOverride all AllowOverride all
Options -Indexes Options -Indexes
DirectoryIndex index.php DirectoryIndex index.php
</Directory> </Directory>
''; '';
} } ];
]) ];
}; };
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [

View File

@ -64,7 +64,7 @@ let
$wgScriptPath = ""; $wgScriptPath = "";
## The protocol and server name to use in fully-qualified URLs ## The protocol and server name to use in fully-qualified URLs
$wgServer = "${if cfg.virtualHost.enableSSL then "https" else "http"}://${cfg.virtualHost.hostName}"; $wgServer = "${if cfg.virtualHost.addSSL || cfg.virtualHost.forceSSL || cfg.virtualHost.onlySSL then "https" else "http"}://${cfg.virtualHost.hostName}";
## The URL path to static resources (images, scripts, etc.) ## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath; $wgResourceBasePath = $wgScriptPath;
@ -290,19 +290,13 @@ in
}; };
virtualHost = mkOption { virtualHost = mkOption {
type = types.submodule ({ type = types.submodule (import ../web-servers/apache-httpd/per-server-options.nix);
options = import ../web-servers/apache-httpd/per-server-options.nix {
inherit lib;
forMainServer = false;
};
});
example = literalExample '' example = literalExample ''
{ {
hostName = "mediawiki.example.org"; hostName = "mediawiki.example.org";
enableSSL = true;
adminAddr = "webmaster@example.org"; adminAddr = "webmaster@example.org";
sslServerCert = "/var/lib/acme/mediawiki.example.org/full.pem"; forceSSL = true;
sslServerKey = "/var/lib/acme/mediawiki.example.org/key.pem"; enableACME = true;
} }
''; '';
description = '' description = ''
@ -389,31 +383,28 @@ in
services.httpd = { services.httpd = {
enable = true; enable = true;
adminAddr = mkDefault cfg.virtualHost.adminAddr;
extraModules = [ "proxy_fcgi" ]; extraModules = [ "proxy_fcgi" ];
virtualHosts = [ (mkMerge [ virtualHosts.${cfg.virtualHost.hostName} = mkMerge [ cfg.virtualHost {
cfg.virtualHost { documentRoot = mkForce "${pkg}/share/mediawiki";
documentRoot = mkForce "${pkg}/share/mediawiki"; extraConfig = ''
extraConfig = '' <Directory "${pkg}/share/mediawiki">
<Directory "${pkg}/share/mediawiki"> <FilesMatch "\.php$">
<FilesMatch "\.php$"> <If "-f %{REQUEST_FILENAME}">
<If "-f %{REQUEST_FILENAME}"> SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/"
SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/" </If>
</If> </FilesMatch>
</FilesMatch>
Require all granted Require all granted
DirectoryIndex index.php DirectoryIndex index.php
AllowOverride All AllowOverride All
</Directory> </Directory>
'' + optionalString (cfg.uploadsDir != null) '' '' + optionalString (cfg.uploadsDir != null) ''
Alias "/images" "${cfg.uploadsDir}" Alias "/images" "${cfg.uploadsDir}"
<Directory "${cfg.uploadsDir}"> <Directory "${cfg.uploadsDir}">
Require all granted Require all granted
</Directory> </Directory>
''; '';
} } ];
]) ];
}; };
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [

View File

@ -32,7 +32,7 @@ let
'dbcollation' => 'utf8mb4_unicode_ci', 'dbcollation' => 'utf8mb4_unicode_ci',
); );
$CFG->wwwroot = '${if cfg.virtualHost.enableSSL then "https" else "http"}://${cfg.virtualHost.hostName}'; $CFG->wwwroot = '${if cfg.virtualHost.addSSL || cfg.virtualHost.forceSSL || cfg.virtualHost.onlySSL then "https" else "http"}://${cfg.virtualHost.hostName}';
$CFG->dataroot = '${stateDir}'; $CFG->dataroot = '${stateDir}';
$CFG->admin = 'admin'; $CFG->admin = 'admin';
@ -140,19 +140,15 @@ in
}; };
virtualHost = mkOption { virtualHost = mkOption {
type = types.submodule ({ type = types.submodule (import ../web-servers/apache-httpd/per-server-options.nix);
options = import ../web-servers/apache-httpd/per-server-options.nix { example = literalExample ''
inherit lib; {
forMainServer = false; hostName = "moodle.example.org";
}; adminAddr = "webmaster@example.org";
}); forceSSL = true;
example = { enableACME = true;
hostName = "moodle.example.org"; }
enableSSL = true; '';
adminAddr = "webmaster@example.org";
sslServerCert = "/var/lib/acme/moodle.example.org/full.pem";
sslServerKey = "/var/lib/acme/moodle.example.org/key.pem";
};
description = '' description = ''
Apache configuration can be done by adapting <option>services.httpd.virtualHosts</option>. Apache configuration can be done by adapting <option>services.httpd.virtualHosts</option>.
See <xref linkend="opt-services.httpd.virtualHosts"/> for further information. See <xref linkend="opt-services.httpd.virtualHosts"/> for further information.
@ -241,22 +237,20 @@ in
enable = true; enable = true;
adminAddr = mkDefault cfg.virtualHost.adminAddr; adminAddr = mkDefault cfg.virtualHost.adminAddr;
extraModules = [ "proxy_fcgi" ]; extraModules = [ "proxy_fcgi" ];
virtualHosts = [ (mkMerge [ virtualHosts.${cfg.virtualHost.hostName} = mkMerge [ cfg.virtualHost {
cfg.virtualHost { documentRoot = mkForce "${cfg.package}/share/moodle";
documentRoot = mkForce "${cfg.package}/share/moodle"; extraConfig = ''
extraConfig = '' <Directory "${cfg.package}/share/moodle">
<Directory "${cfg.package}/share/moodle"> <FilesMatch "\.php$">
<FilesMatch "\.php$"> <If "-f %{REQUEST_FILENAME}">
<If "-f %{REQUEST_FILENAME}"> SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/"
SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/" </If>
</If> </FilesMatch>
</FilesMatch> Options -Indexes
Options -Indexes DirectoryIndex index.php
DirectoryIndex index.php </Directory>
</Directory> '';
''; } ];
}
]) ];
}; };
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [

View File

@ -3,7 +3,7 @@
let let
inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types; inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types;
inherit (lib) any attrValues concatMapStringsSep flatten literalExample; inherit (lib) any attrValues concatMapStringsSep flatten literalExample;
inherit (lib) mapAttrs' mapAttrsToList nameValuePair optional optionalAttrs optionalString; inherit (lib) mapAttrs mapAttrs' mapAttrsToList nameValuePair optional optionalAttrs optionalString;
eachSite = config.services.wordpress; eachSite = config.services.wordpress;
user = "wordpress"; user = "wordpress";
@ -209,18 +209,12 @@ let
}; };
virtualHost = mkOption { virtualHost = mkOption {
type = types.submodule ({ type = types.submodule (import ../web-servers/apache-httpd/per-server-options.nix);
options = import ../web-servers/apache-httpd/per-server-options.nix {
inherit lib;
forMainServer = false;
};
});
example = literalExample '' example = literalExample ''
{ {
enableSSL = true;
adminAddr = "webmaster@example.org"; adminAddr = "webmaster@example.org";
sslServerCert = "/var/lib/acme/wordpress.example.org/full.pem"; forceSSL = true;
sslServerKey = "/var/lib/acme/wordpress.example.org/key.pem"; enableACME = true;
} }
''; '';
description = '' description = ''
@ -304,41 +298,37 @@ in
services.httpd = { services.httpd = {
enable = true; enable = true;
extraModules = [ "proxy_fcgi" ]; extraModules = [ "proxy_fcgi" ];
virtualHosts = mapAttrsToList (hostName: cfg: virtualHosts = mapAttrs (hostName: cfg: mkMerge [ cfg.virtualHost {
(mkMerge [ documentRoot = mkForce "${pkg hostName cfg}/share/wordpress";
cfg.virtualHost { extraConfig = ''
documentRoot = mkForce "${pkg hostName cfg}/share/wordpress"; <Directory "${pkg hostName cfg}/share/wordpress">
extraConfig = '' <FilesMatch "\.php$">
<Directory "${pkg hostName cfg}/share/wordpress"> <If "-f %{REQUEST_FILENAME}">
<FilesMatch "\.php$"> SetHandler "proxy:unix:${config.services.phpfpm.pools."wordpress-${hostName}".socket}|fcgi://localhost/"
<If "-f %{REQUEST_FILENAME}"> </If>
SetHandler "proxy:unix:${config.services.phpfpm.pools."wordpress-${hostName}".socket}|fcgi://localhost/" </FilesMatch>
</If>
</FilesMatch>
# standard wordpress .htaccess contents # standard wordpress .htaccess contents
<IfModule mod_rewrite.c> <IfModule mod_rewrite.c>
RewriteEngine On RewriteEngine On
RewriteBase / RewriteBase /
RewriteRule ^index\.php$ - [L] RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L] RewriteRule . /index.php [L]
</IfModule> </IfModule>
DirectoryIndex index.php DirectoryIndex index.php
Require all granted Require all granted
Options +FollowSymLinks Options +FollowSymLinks
</Directory> </Directory>
# https://wordpress.org/support/article/hardening-wordpress/#securing-wp-config-php # https://wordpress.org/support/article/hardening-wordpress/#securing-wp-config-php
<Files wp-config.php> <Files wp-config.php>
Require all denied Require all denied
</Files> </Files>
''; '';
} } ]) eachSite;
])
) eachSite;
}; };
systemd.tmpfiles.rules = flatten (mapAttrsToList (hostName: cfg: [ systemd.tmpfiles.rules = flatten (mapAttrsToList (hostName: cfg: [

View File

@ -113,19 +113,15 @@ in
}; };
virtualHost = mkOption { virtualHost = mkOption {
type = types.submodule ({ type = types.submodule (import ../web-servers/apache-httpd/per-server-options.nix);
options = import ../web-servers/apache-httpd/per-server-options.nix { example = literalExample ''
inherit lib; {
forMainServer = false; hostName = "zabbix.example.org";
}; adminAddr = "webmaster@example.org";
}); forceSSL = true;
example = { enableACME = true;
hostName = "zabbix.example.org"; }
enableSSL = true; '';
adminAddr = "webmaster@example.org";
sslServerCert = "/var/lib/acme/zabbix.example.org/full.pem";
sslServerKey = "/var/lib/acme/zabbix.example.org/key.pem";
};
description = '' description = ''
Apache configuration can be done by adapting <literal>services.httpd.virtualHosts.&lt;name&gt;</literal>. Apache configuration can be done by adapting <literal>services.httpd.virtualHosts.&lt;name&gt;</literal>.
See <xref linkend="opt-services.httpd.virtualHosts"/> for further information. See <xref linkend="opt-services.httpd.virtualHosts"/> for further information.
@ -190,23 +186,21 @@ in
enable = true; enable = true;
adminAddr = mkDefault cfg.virtualHost.adminAddr; adminAddr = mkDefault cfg.virtualHost.adminAddr;
extraModules = [ "proxy_fcgi" ]; extraModules = [ "proxy_fcgi" ];
virtualHosts = [ (mkMerge [ virtualHosts.${cfg.virtualHost.hostName} = mkMerge [ cfg.virtualHost {
cfg.virtualHost { documentRoot = mkForce "${cfg.package}/share/zabbix";
documentRoot = mkForce "${cfg.package}/share/zabbix"; extraConfig = ''
extraConfig = '' <Directory "${cfg.package}/share/zabbix">
<Directory "${cfg.package}/share/zabbix"> <FilesMatch "\.php$">
<FilesMatch "\.php$"> <If "-f %{REQUEST_FILENAME}">
<If "-f %{REQUEST_FILENAME}"> SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/"
SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/" </If>
</If> </FilesMatch>
</FilesMatch> AllowOverride all
AllowOverride all Options -Indexes
Options -Indexes DirectoryIndex index.php
DirectoryIndex index.php </Directory>
</Directory> '';
''; } ];
}
]) ];
}; };
users.users.${user} = mapAttrs (name: mkDefault) { users.users.${user} = mapAttrs (name: mkDefault) {

View File

@ -18,22 +18,20 @@ let
mod_perl = pkgs.apacheHttpdPackages.mod_perl.override { apacheHttpd = httpd; }; mod_perl = pkgs.apacheHttpdPackages.mod_perl.override { apacheHttpd = httpd; };
defaultListen = cfg: if cfg.enableSSL vhosts = attrValues mainCfg.virtualHosts;
then [{ip = "*"; port = 443;}]
else [{ip = "*"; port = 80;}];
getListen = cfg: mkListenInfo = hostOpts:
if cfg.listen == [] if hostOpts.listen != [] then hostOpts.listen
then defaultListen cfg else (
else cfg.listen; optional (hostOpts.onlySSL || hostOpts.addSSL || hostOpts.forceSSL) { ip = "*"; port = 443; ssl = true; } ++
optional (!hostOpts.onlySSL) { ip = "*"; port = 80; ssl = false; }
);
listenToString = l: "${l.ip}:${toString l.port}"; listenInfo = unique (concatMap mkListenInfo vhosts);
allHosts = [mainCfg] ++ mainCfg.virtualHosts; enableSSL = any (listen: listen.ssl) listenInfo;
enableSSL = any (vhost: vhost.enableSSL) allHosts; enableUserDir = any (vhost: vhost.enableUserDir) vhosts;
enableUserDir = any (vhost: vhost.enableUserDir) allHosts;
# NOTE: generally speaking order of modules is very important # NOTE: generally speaking order of modules is very important
modules = modules =
@ -115,122 +113,137 @@ let
</IfModule> </IfModule>
''; '';
mkVHostConf = hostOpts:
let
adminAddr = if hostOpts.adminAddr != null then hostOpts.adminAddr else mainCfg.adminAddr;
listen = filter (listen: !listen.ssl) (mkListenInfo hostOpts);
listenSSL = filter (listen: listen.ssl) (mkListenInfo hostOpts);
perServerConf = isMainServer: cfg: let useACME = hostOpts.enableACME || hostOpts.useACMEHost != null;
sslCertDir =
if hostOpts.enableACME then config.security.acme.certs.${hostOpts.hostName}.directory
else if hostOpts.useACMEHost != null then config.security.acme.certs.${hostOpts.useACMEHost}.directory
else abort "This case should never happen.";
# Canonical name must not include a trailing slash. sslServerCert = if useACME then "${sslCertDir}/full.pem" else hostOpts.sslServerCert;
canonicalNames = sslServerKey = if useACME then "${sslCertDir}/key.pem" else hostOpts.sslServerKey;
let defaultPort = (head (defaultListen cfg)).port; in sslServerChain = if useACME then "${sslCertDir}/fullchain.pem" else hostOpts.sslServerChain;
map (port:
(if cfg.enableSSL then "https" else "http") + "://" +
cfg.hostName +
(if port != defaultPort then ":${toString port}" else "")
) (map (x: x.port) (getListen cfg));
maybeDocumentRoot = fold (svc: acc: acmeChallenge = optionalString useACME ''
if acc == null then svc.documentRoot else assert svc.documentRoot == null; acc Alias /.well-known/acme-challenge/ "${hostOpts.acmeRoot}/.well-known/acme-challenge/"
) null ([ cfg ]); <Directory "${hostOpts.acmeRoot}">
AllowOverride None
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Require method GET POST OPTIONS
Require all granted
</Directory>
'';
in
optionalString (listen != []) ''
<VirtualHost ${concatMapStringsSep " " (listen: "${listen.ip}:${toString listen.port}") listen}>
ServerName ${hostOpts.hostName}
${concatMapStrings (alias: "ServerAlias ${alias}\n") hostOpts.serverAliases}
ServerAdmin ${adminAddr}
<IfModule mod_ssl.c>
SSLEngine off
</IfModule>
${acmeChallenge}
${if hostOpts.forceSSL then ''
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge [NC]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</IfModule>
'' else mkVHostCommonConf hostOpts}
</VirtualHost>
'' +
optionalString (listenSSL != []) ''
<VirtualHost ${concatMapStringsSep " " (listen: "${listen.ip}:${toString listen.port}") listenSSL}>
ServerName ${hostOpts.hostName}
${concatMapStrings (alias: "ServerAlias ${alias}\n") hostOpts.serverAliases}
ServerAdmin ${adminAddr}
SSLEngine on
SSLCertificateFile ${sslServerCert}
SSLCertificateKeyFile ${sslServerKey}
${optionalString (sslServerChain != null) "SSLCertificateChainFile ${sslServerChain}"}
${acmeChallenge}
${mkVHostCommonConf hostOpts}
</VirtualHost>
''
;
documentRoot = if maybeDocumentRoot != null then maybeDocumentRoot else mkVHostCommonConf = hostOpts:
pkgs.runCommand "empty" { preferLocalBuild = true; } "mkdir -p $out"; let
documentRoot = if hostOpts.documentRoot != null
then hostOpts.documentRoot
else pkgs.runCommand "empty" { preferLocalBuild = true; } "mkdir -p $out"
;
in
''
${optionalString mainCfg.logPerVirtualHost ''
ErrorLog ${mainCfg.logDir}/error-${hostOpts.hostName}.log
CustomLog ${mainCfg.logDir}/access-${hostOpts.hostName}.log ${hostOpts.logFormat}
''}
documentRootConf = '' ${optionalString (hostOpts.robotsEntries != "") ''
DocumentRoot "${documentRoot}" Alias /robots.txt ${pkgs.writeText "robots.txt" hostOpts.robotsEntries}
''}
<Directory "${documentRoot}"> DocumentRoot "${documentRoot}"
Options Indexes FollowSymLinks
AllowOverride None
${allGranted}
</Directory>
'';
# If this is a vhost, the include the entries for the main server as well. <Directory "${documentRoot}">
robotsTxt = concatStringsSep "\n" (filter (x: x != "") ([ cfg.robotsEntries ] ++ lib.optional (!isMainServer) mainCfg.robotsEntries)); Options Indexes FollowSymLinks
AllowOverride None
${allGranted}
</Directory>
in '' ${optionalString hostOpts.enableUserDir ''
${concatStringsSep "\n" (map (n: "ServerName ${n}") canonicalNames)} UserDir public_html
UserDir disabled root
<Directory "/home/*/public_html">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Require all granted
</Limit>
<LimitExcept GET POST OPTIONS>
Require all denied
</LimitExcept>
</Directory>
''}
${concatMapStrings (alias: "ServerAlias ${alias}\n") cfg.serverAliases} ${optionalString (hostOpts.globalRedirect != null && hostOpts.globalRedirect != "") ''
RedirectPermanent / ${hostOpts.globalRedirect}
''}
${if cfg.sslServerCert != null then '' ${
SSLCertificateFile ${cfg.sslServerCert} let makeFileConf = elem: ''
SSLCertificateKeyFile ${cfg.sslServerKey} Alias ${elem.urlPath} ${elem.file}
${if cfg.sslServerChain != null then '' '';
SSLCertificateChainFile ${cfg.sslServerChain} in concatMapStrings makeFileConf hostOpts.servedFiles
'' else ""} }
'' else ""} ${
let makeDirConf = elem: ''
Alias ${elem.urlPath} ${elem.dir}/
<Directory ${elem.dir}>
Options +Indexes
${allGranted}
AllowOverride All
</Directory>
'';
in concatMapStrings makeDirConf hostOpts.servedDirs
}
${if cfg.enableSSL then '' ${hostOpts.extraConfig}
SSLEngine on ''
'' else if enableSSL then /* i.e., SSL is enabled for some host, but not this one */ ;
''
SSLEngine off
'' else ""}
${if isMainServer || cfg.adminAddr != null then ''
ServerAdmin ${cfg.adminAddr}
'' else ""}
${if !isMainServer && mainCfg.logPerVirtualHost then ''
ErrorLog ${mainCfg.logDir}/error-${cfg.hostName}.log
CustomLog ${mainCfg.logDir}/access-${cfg.hostName}.log ${cfg.logFormat}
'' else ""}
${optionalString (robotsTxt != "") ''
Alias /robots.txt ${pkgs.writeText "robots.txt" robotsTxt}
''}
${if isMainServer || maybeDocumentRoot != null then documentRootConf else ""}
${if cfg.enableUserDir then ''
UserDir public_html
UserDir disabled root
<Directory "/home/*/public_html">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
${allGranted}
</Limit>
<LimitExcept GET POST OPTIONS>
${allDenied}
</LimitExcept>
</Directory>
'' else ""}
${if cfg.globalRedirect != null && cfg.globalRedirect != "" then ''
RedirectPermanent / ${cfg.globalRedirect}
'' else ""}
${
let makeFileConf = elem: ''
Alias ${elem.urlPath} ${elem.file}
'';
in concatMapStrings makeFileConf cfg.servedFiles
}
${
let makeDirConf = elem: ''
Alias ${elem.urlPath} ${elem.dir}/
<Directory ${elem.dir}>
Options +Indexes
${allGranted}
AllowOverride All
</Directory>
'';
in concatMapStrings makeDirConf cfg.servedDirs
}
${cfg.extraConfig}
'';
confFile = pkgs.writeText "httpd.conf" '' confFile = pkgs.writeText "httpd.conf" ''
ServerRoot ${httpd} ServerRoot ${httpd}
ServerName ${config.networking.hostName}
DefaultRuntimeDir ${runtimeDir}/runtime DefaultRuntimeDir ${runtimeDir}/runtime
PidFile ${runtimeDir}/httpd.pid PidFile ${runtimeDir}/httpd.pid
@ -246,10 +259,9 @@ let
</IfModule> </IfModule>
${let ${let
listen = concatMap getListen allHosts; toStr = listen: "Listen ${listen.ip}:${toString listen.port} ${if listen.ssl then "https" else "http"}";
toStr = listen: "Listen ${listenToString listen}\n"; uniqueListen = uniqList {inputList = map toStr listenInfo;};
uniqueListen = uniqList {inputList = map toStr listen;}; in concatStringsSep "\n" uniqueListen
in concatStrings uniqueListen
} }
User ${mainCfg.user} User ${mainCfg.user}
@ -297,17 +309,9 @@ let
${allGranted} ${allGranted}
</Directory> </Directory>
# Generate directives for the main server. ${mainCfg.extraConfig}
${perServerConf true mainCfg}
${let ${concatMapStringsSep "\n" mkVHostConf vhosts}
makeVirtualHost = vhost: ''
<VirtualHost ${concatStringsSep " " (map listenToString (getListen vhost))}>
${perServerConf false vhost}
</VirtualHost>
'';
in concatMapStrings makeVirtualHost mainCfg.virtualHosts
}
''; '';
# Generate the PHP configuration file. Should probably be factored # Generate the PHP configuration file. Should probably be factored
@ -329,6 +333,21 @@ in
imports = [ imports = [
(mkRemovedOptionModule [ "services" "httpd" "extraSubservices" ] "Most existing subservices have been ported to the NixOS module system. Please update your configuration accordingly.") (mkRemovedOptionModule [ "services" "httpd" "extraSubservices" ] "Most existing subservices have been ported to the NixOS module system. Please update your configuration accordingly.")
(mkRemovedOptionModule [ "services" "httpd" "stateDir" ] "The httpd module now uses /run/httpd as a runtime directory.") (mkRemovedOptionModule [ "services" "httpd" "stateDir" ] "The httpd module now uses /run/httpd as a runtime directory.")
# virtualHosts options
(mkRemovedOptionModule [ "services" "httpd" "documentRoot" ] "Please define a virtual host using `services.httpd.virtualHosts`.")
(mkRemovedOptionModule [ "services" "httpd" "enableSSL" ] "Please define a virtual host using `services.httpd.virtualHosts`.")
(mkRemovedOptionModule [ "services" "httpd" "enableUserDir" ] "Please define a virtual host using `services.httpd.virtualHosts`.")
(mkRemovedOptionModule [ "services" "httpd" "globalRedirect" ] "Please define a virtual host using `services.httpd.virtualHosts`.")
(mkRemovedOptionModule [ "services" "httpd" "hostName" ] "Please define a virtual host using `services.httpd.virtualHosts`.")
(mkRemovedOptionModule [ "services" "httpd" "listen" ] "Please define a virtual host using `services.httpd.virtualHosts`.")
(mkRemovedOptionModule [ "services" "httpd" "robotsEntries" ] "Please define a virtual host using `services.httpd.virtualHosts`.")
(mkRemovedOptionModule [ "services" "httpd" "servedDirs" ] "Please define a virtual host using `services.httpd.virtualHosts`.")
(mkRemovedOptionModule [ "services" "httpd" "servedFiles" ] "Please define a virtual host using `services.httpd.virtualHosts`.")
(mkRemovedOptionModule [ "services" "httpd" "serverAliases" ] "Please define a virtual host using `services.httpd.virtualHosts`.")
(mkRemovedOptionModule [ "services" "httpd" "sslServerCert" ] "Please define a virtual host using `services.httpd.virtualHosts`.")
(mkRemovedOptionModule [ "services" "httpd" "sslServerChain" ] "Please define a virtual host using `services.httpd.virtualHosts`.")
(mkRemovedOptionModule [ "services" "httpd" "sslServerKey" ] "Please define a virtual host using `services.httpd.virtualHosts`.")
]; ];
###### interface ###### interface
@ -391,9 +410,25 @@ in
''; '';
}; };
adminAddr = mkOption {
type = types.str;
example = "admin@example.org";
description = "E-mail address of the server administrator.";
};
logFormat = mkOption {
type = types.str;
default = "common";
example = "combined";
description = ''
Log format for log files. Possible values are: combined, common, referer, agent.
See <link xlink:href="https://httpd.apache.org/docs/2.4/logs.html"/> for more details.
'';
};
logPerVirtualHost = mkOption { logPerVirtualHost = mkOption {
type = types.bool; type = types.bool;
default = false; default = true;
description = '' description = ''
If enabled, each virtual host gets its own If enabled, each virtual host gets its own
<filename>access.log</filename> and <filename>access.log</filename> and
@ -429,26 +464,28 @@ in
}; };
virtualHosts = mkOption { virtualHosts = mkOption {
type = types.listOf (types.submodule ( type = with types; attrsOf (submodule (import ./per-server-options.nix));
{ options = import ./per-server-options.nix { default = {
inherit lib; localhost = {
forMainServer = false; documentRoot = "${httpd}/htdocs";
};
};
example = literalExample ''
{
"foo.example.com" = {
forceSSL = true;
documentRoot = "/var/www/foo.example.com"
};
"bar.example.com" = {
addSSL = true;
documentRoot = "/var/www/bar.example.com";
}; };
}));
default = [];
example = [
{ hostName = "foo";
documentRoot = "/data/webroot-foo";
} }
{ hostName = "bar"; '';
documentRoot = "/data/webroot-bar";
}
];
description = '' description = ''
Specification of the virtual hosts served by Apache. Each Specification of the virtual hosts served by Apache. Each
element should be an attribute set specifying the element should be an attribute set specifying the
configuration of the virtual host. The available options configuration of the virtual host.
are the non-global options permissible for the main host.
''; '';
}; };
@ -534,13 +571,7 @@ in
example = "All -SSLv2 -SSLv3"; example = "All -SSLv2 -SSLv3";
description = "Allowed SSL/TLS protocol versions."; description = "Allowed SSL/TLS protocol versions.";
}; };
} };
# Include the options shared between the main server and virtual hosts.
// (import ./per-server-options.nix {
inherit lib;
forMainServer = true;
});
}; };
@ -549,11 +580,31 @@ in
config = mkIf config.services.httpd.enable { config = mkIf config.services.httpd.enable {
assertions = [ { assertion = mainCfg.enableSSL == true assertions = [
-> mainCfg.sslServerCert != null {
&& mainCfg.sslServerKey != null; assertion = all (hostOpts: !hostOpts.enableSSL) vhosts;
message = "SSL is enabled for httpd, but sslServerCert and/or sslServerKey haven't been specified."; } message = ''
]; The option `services.httpd.virtualHosts.<name>.enableSSL` no longer has any effect; please remove it.
Select one of `services.httpd.virtualHosts.<name>.addSSL`, `services.httpd.virtualHosts.<name>.forceSSL`,
or `services.httpd.virtualHosts.<name>.onlySSL`.
'';
}
{
assertion = all (hostOpts: with hostOpts; !(addSSL && onlySSL) && !(forceSSL && onlySSL) && !(addSSL && forceSSL)) vhosts;
message = ''
Options `services.httpd.virtualHosts.<name>.addSSL`,
`services.httpd.virtualHosts.<name>.onlySSL` and `services.httpd.virtualHosts.<name>.forceSSL`
are mutually exclusive.
'';
}
{
assertion = all (hostOpts: !(hostOpts.enableACME && hostOpts.useACMEHost != null)) vhosts;
message = ''
Options `services.httpd.virtualHosts.<name>.enableACME` and
`services.httpd.virtualHosts.<name>.useACMEHost` are mutually exclusive.
'';
}
];
users.users = optionalAttrs (mainCfg.user == "wwwrun") (singleton users.users = optionalAttrs (mainCfg.user == "wwwrun") (singleton
{ name = "wwwrun"; { name = "wwwrun";
@ -567,6 +618,15 @@ in
gid = config.ids.gids.wwwrun; gid = config.ids.gids.wwwrun;
}); });
security.acme.certs = mapAttrs (name: hostOpts: {
user = mainCfg.user;
group = mkDefault mainCfg.group;
email = if hostOpts.adminAddr != null then hostOpts.adminAddr else mainCfg.adminAddr;
webroot = hostOpts.acmeRoot;
extraDomains = genAttrs hostOpts.serverAliases (alias: null);
postRun = "systemctl reload httpd.service";
}) (filterAttrs (name: hostOpts: hostOpts.enableACME) mainCfg.virtualHosts);
environment.systemPackages = [httpd]; environment.systemPackages = [httpd];
services.httpd.phpOptions = services.httpd.phpOptions =
@ -605,10 +665,14 @@ in
]; ];
systemd.services.httpd = systemd.services.httpd =
let
vhostsACME = filter (hostOpts: hostOpts.enableACME) vhosts;
in
{ description = "Apache HTTPD"; { description = "Apache HTTPD";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" "fs.target" ]; wants = concatLists (map (hostOpts: [ "acme-${hostOpts.hostName}.service" "acme-selfsigned-${hostOpts.hostName}.service" ]) vhostsACME);
after = [ "network.target" "fs.target" ] ++ map (hostOpts: "acme-selfsigned-${hostOpts.hostName}.service") vhostsACME;
path = path =
[ httpd pkgs.coreutils pkgs.gnugrep ] [ httpd pkgs.coreutils pkgs.gnugrep ]

View File

@ -1,174 +1,235 @@
# This file defines the options that can be used both for the Apache { config, lib, name, ... }:
# main server configuration, and for the virtual hosts. (The latter let
# has additional options that affect the web server as a whole, like inherit (lib) mkOption types;
# the user/group to run under.) in
{ forMainServer, lib }:
with lib;
{ {
options = {
hostName = mkOption {
type = types.str;
default = name;
description = "Canonical hostname for the server.";
};
serverAliases = mkOption {
type = types.listOf types.str;
default = [];
example = ["www.example.org" "www.example.org:8080" "example.org"];
description = ''
Additional names of virtual hosts served by this virtual host configuration.
'';
};
listen = mkOption {
type = with types; listOf (submodule ({
options = {
port = mkOption {
type = types.port;
description = "Port to listen on";
};
ip = mkOption {
type = types.str;
default = "*";
description = "IP to listen on. 0.0.0.0 for IPv4 only, * for all.";
};
ssl = mkOption {
type = types.bool;
default = false;
description = "Whether to enable SSL (https) support.";
};
};
}));
default = [];
example = [
{ ip = "195.154.1.1"; port = 443; ssl = true;}
{ ip = "192.154.1.1"; port = 80; }
{ ip = "*"; port = 8080; }
];
description = ''
Listen addresses and ports for this virtual host.
<note><para>
This option overrides <literal>addSSL</literal>, <literal>forceSSL</literal> and <literal>onlySSL</literal>.
</para></note>
'';
};
enableSSL = mkOption {
type = types.bool;
visible = false;
default = false;
};
addSSL = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable HTTPS in addition to plain HTTP. This will set defaults for
<literal>listen</literal> to listen on all interfaces on the respective default
ports (80, 443).
'';
};
onlySSL = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable HTTPS and reject plain HTTP connections. This will set
defaults for <literal>listen</literal> to listen on all interfaces on port 443.
'';
};
forceSSL = mkOption {
type = types.bool;
default = false;
description = ''
Whether to add a separate nginx server block that permanently redirects (301)
all plain HTTP traffic to HTTPS. This will set defaults for
<literal>listen</literal> to listen on all interfaces on the respective default
ports (80, 443), where the non-SSL listens are used for the redirect vhosts.
'';
};
enableACME = mkOption {
type = types.bool;
default = false;
description = ''
Whether to ask Let's Encrypt to sign a certificate for this vhost.
Alternately, you can use an existing certificate through <option>useACMEHost</option>.
'';
};
useACMEHost = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
A host of an existing Let's Encrypt certificate to use.
This is useful if you have many subdomains and want to avoid hitting the
<link xlink:href="https://letsencrypt.org/docs/rate-limits/">rate limit</link>.
Alternately, you can generate a certificate through <option>enableACME</option>.
<emphasis>Note that this option does not create any certificates, nor it does add subdomains to existing ones you will need to create them manually using <xref linkend="opt-security.acme.certs"/>.</emphasis>
'';
};
acmeRoot = mkOption {
type = types.str;
default = "/var/lib/acme/acme-challenges";
description = "Directory for the acme challenge which is PUBLIC, don't put certs or keys in here";
};
sslServerCert = mkOption {
type = types.path;
example = "/var/host.cert";
description = "Path to server SSL certificate.";
};
sslServerKey = mkOption {
type = types.path;
example = "/var/host.key";
description = "Path to server SSL certificate key.";
};
sslServerChain = mkOption {
type = types.nullOr types.path;
default = null;
example = "/var/ca.pem";
description = "Path to server SSL chain file.";
};
adminAddr = mkOption {
type = types.nullOr types.str;
default = null;
example = "admin@example.org";
description = "E-mail address of the server administrator.";
};
documentRoot = mkOption {
type = types.nullOr types.path;
default = null;
example = "/data/webserver/docs";
description = ''
The path of Apache's document root directory. If left undefined,
an empty directory in the Nix store will be used as root.
'';
};
servedDirs = mkOption {
type = types.listOf types.attrs;
default = [];
example = [
{ urlPath = "/nix";
dir = "/home/eelco/Dev/nix-homepage";
}
];
description = ''
This option provides a simple way to serve static directories.
'';
};
servedFiles = mkOption {
type = types.listOf types.attrs;
default = [];
example = [
{ urlPath = "/foo/bar.png";
file = "/home/eelco/some-file.png";
}
];
description = ''
This option provides a simple way to serve individual, static files.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
example = ''
<Directory /home>
Options FollowSymlinks
AllowOverride All
</Directory>
'';
description = ''
These lines go to httpd.conf verbatim. They will go after
directories and directory aliases defined by default.
'';
};
enableUserDir = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable serving <filename>~/public_html</filename> as
<literal>/~<replaceable>username</replaceable></literal>.
'';
};
globalRedirect = mkOption {
type = types.nullOr types.str;
default = null;
example = http://newserver.example.org/;
description = ''
If set, all requests for this host are redirected permanently to
the given URL.
'';
};
logFormat = mkOption {
type = types.str;
default = "common";
example = "combined";
description = ''
Log format for Apache's log files. Possible values are: combined, common, referer, agent.
'';
};
robotsEntries = mkOption {
type = types.lines;
default = "";
example = "Disallow: /foo/";
description = ''
Specification of pages to be ignored by web crawlers. See <link
xlink:href='http://www.robotstxt.org/'/> for details.
'';
};
hostName = mkOption {
type = types.str;
default = "localhost";
description = "Canonical hostname for the server.";
}; };
serverAliases = mkOption {
type = types.listOf types.str;
default = [];
example = ["www.example.org" "www.example.org:8080" "example.org"];
description = ''
Additional names of virtual hosts served by this virtual host configuration.
'';
};
listen = mkOption {
type = types.listOf (types.submodule (
{
options = {
port = mkOption {
type = types.int;
description = "port to listen on";
};
ip = mkOption {
type = types.str;
default = "*";
description = "Ip to listen on. 0.0.0.0 for ipv4 only, * for all.";
};
};
} ));
description = ''
List of { /* ip: "*"; */ port = 80;} to listen on
'';
default = [];
};
enableSSL = mkOption {
type = types.bool;
default = false;
description = "Whether to enable SSL (https) support.";
};
# Note: sslServerCert and sslServerKey can be left empty, but this
# only makes sense for virtual hosts (they will inherit from the
# main server).
sslServerCert = mkOption {
type = types.nullOr types.path;
default = null;
example = "/var/host.cert";
description = "Path to server SSL certificate.";
};
sslServerKey = mkOption {
type = types.path;
example = "/var/host.key";
description = "Path to server SSL certificate key.";
};
sslServerChain = mkOption {
type = types.nullOr types.path;
default = null;
example = "/var/ca.pem";
description = "Path to server SSL chain file.";
};
adminAddr = mkOption ({
type = types.nullOr types.str;
example = "admin@example.org";
description = "E-mail address of the server administrator.";
} // (if forMainServer then {} else {default = null;}));
documentRoot = mkOption {
type = types.nullOr types.path;
default = null;
example = "/data/webserver/docs";
description = ''
The path of Apache's document root directory. If left undefined,
an empty directory in the Nix store will be used as root.
'';
};
servedDirs = mkOption {
type = types.listOf types.attrs;
default = [];
example = [
{ urlPath = "/nix";
dir = "/home/eelco/Dev/nix-homepage";
}
];
description = ''
This option provides a simple way to serve static directories.
'';
};
servedFiles = mkOption {
type = types.listOf types.attrs;
default = [];
example = [
{ urlPath = "/foo/bar.png";
file = "/home/eelco/some-file.png";
}
];
description = ''
This option provides a simple way to serve individual, static files.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
example = ''
<Directory /home>
Options FollowSymlinks
AllowOverride All
</Directory>
'';
description = ''
These lines go to httpd.conf verbatim. They will go after
directories and directory aliases defined by default.
'';
};
enableUserDir = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable serving <filename>~/public_html</filename> as
<literal>/~<replaceable>username</replaceable></literal>.
'';
};
globalRedirect = mkOption {
type = types.nullOr types.str;
default = null;
example = http://newserver.example.org/;
description = ''
If set, all requests for this host are redirected permanently to
the given URL.
'';
};
logFormat = mkOption {
type = types.str;
default = "common";
example = "combined";
description = ''
Log format for Apache's log files. Possible values are: combined, common, referer, agent.
'';
};
robotsEntries = mkOption {
type = types.lines;
default = "";
example = "Disallow: /foo/";
description = ''
Specification of pages to be ignored by web crawlers. See <link
xlink:href='http://www.robotstxt.org/'/> for details.
'';
};
} }

View File

@ -671,6 +671,7 @@ in
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d '${cfg.stateDir}' 0750 ${cfg.user} ${cfg.group} - -" "d '${cfg.stateDir}' 0750 ${cfg.user} ${cfg.group} - -"
"d '${cfg.stateDir}/logs' 0750 ${cfg.user} ${cfg.group} - -" "d '${cfg.stateDir}/logs' 0750 ${cfg.user} ${cfg.group} - -"
"Z '${cfg.stateDir}' - ${cfg.user} ${cfg.group} - -"
]; ];
systemd.services.nginx = { systemd.services.nginx = {

View File

@ -380,7 +380,7 @@ in
wms = filter (s: s.manage == "window") cfg.displayManager.session; wms = filter (s: s.manage == "window") cfg.displayManager.session;
# Script responsible for starting the window manager and the desktop manager. # Script responsible for starting the window manager and the desktop manager.
xsession = wm: dm: pkgs.writeScript "xsession" '' xsession = dm: wm: pkgs.writeScript "xsession" ''
#! ${pkgs.bash}/bin/bash #! ${pkgs.bash}/bin/bash
# Legacy session script used to construct .desktop files from # Legacy session script used to construct .desktop files from

View File

@ -132,6 +132,7 @@ in
jellyfin = handleTest ./jellyfin.nix {}; jellyfin = handleTest ./jellyfin.nix {};
jenkins = handleTest ./jenkins.nix {}; jenkins = handleTest ./jenkins.nix {};
kafka = handleTest ./kafka.nix {}; kafka = handleTest ./kafka.nix {};
keepalived = handleTest ./keepalived.nix {};
kerberos = handleTest ./kerberos/default.nix {}; kerberos = handleTest ./kerberos/default.nix {};
kernel-latest = handleTest ./kernel-latest.nix {}; kernel-latest = handleTest ./kernel-latest.nix {};
kernel-lts = handleTest ./kernel-lts.nix {}; kernel-lts = handleTest ./kernel-lts.nix {};

View File

@ -113,7 +113,7 @@ in {
services.httpd = { services.httpd = {
enable = true; enable = true;
adminAddr = "test@example.org"; adminAddr = "test@example.org";
documentRoot = "${pkgs.valgrind.doc}/share/doc/valgrind/html"; virtualHosts.localhost.documentRoot = "${pkgs.valgrind.doc}/share/doc/valgrind/html";
}; };
networking.firewall.allowedTCPPorts = [ 80 ]; networking.firewall.allowedTCPPorts = [ 80 ];
} }

View File

@ -23,12 +23,14 @@ import ./make-test-python.nix ({ pkgs, ...}: {
}; };
services.httpd = { services.httpd = {
enable = true; enable = true;
documentRoot = pkgs.writeTextDir "index.txt" "We are all good!"; virtualHosts.localhost = {
adminAddr = "notme@yourhost.local"; documentRoot = pkgs.writeTextDir "index.txt" "We are all good!";
listen = [{ adminAddr = "notme@yourhost.local";
ip = "::1"; listen = [{
port = 8000; ip = "::1";
}]; port = 8000;
}];
};
}; };
}; };
}; };

View File

@ -16,7 +16,7 @@ import ../make-test-python.nix ({ pkgs, ... }:
services.httpd = { services.httpd = {
enable = true; enable = true;
documentRoot = ./example; virtualHosts.localhost.documentRoot = ./example;
adminAddr = "noone@testing.nowhere"; adminAddr = "noone@testing.nowhere";
}; };
}; };

View File

@ -0,0 +1,42 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "keepalived";
nodes = {
node1 = { pkgs, ... }: {
networking.firewall.extraCommands = "iptables -A INPUT -p vrrp -j ACCEPT";
services.keepalived.enable = true;
services.keepalived.vrrpInstances.test = {
interface = "eth1";
state = "MASTER";
priority = 50;
virtualIps = [{ addr = "192.168.1.200"; }];
virtualRouterId = 1;
};
environment.systemPackages = [ pkgs.tcpdump ];
};
node2 = { pkgs, ... }: {
networking.firewall.extraCommands = "iptables -A INPUT -p vrrp -j ACCEPT";
services.keepalived.enable = true;
services.keepalived.vrrpInstances.test = {
interface = "eth1";
state = "MASTER";
priority = 100;
virtualIps = [{ addr = "192.168.1.200"; }];
virtualRouterId = 1;
};
environment.systemPackages = [ pkgs.tcpdump ];
};
};
testScript = ''
# wait for boot time delay to pass
for node in [node1, node2]:
node.wait_until_succeeds(
"systemctl show -p LastTriggerUSecMonotonic keepalived-boot-delay.timer | grep -vq 'LastTriggerUSecMonotonic=0'"
)
node.wait_for_unit("keepalived")
node2.wait_until_succeeds("ip addr show dev eth1 | grep -q 192.168.1.200")
node1.fail("ip addr show dev eth1 | grep -q 192.168.1.200")
node1.succeed("ping -c1 192.168.1.200")
'';
})

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...} : import ./make-test-python.nix ({ pkgs, ...} :
let let
client = { pkgs, ... }: { client = { pkgs, ... }: {
@ -24,50 +24,50 @@ in
}; };
testScript = '' testScript = ''
startAll; start_all()
$server->waitForUnit("murmur.service"); server.wait_for_unit("murmur.service")
$client1->waitForX; client1.wait_for_x()
$client2->waitForX; client2.wait_for_x()
$client1->execute("mumble mumble://client1\@server/test &"); client1.execute("mumble mumble://client1\@server/test &")
$client2->execute("mumble mumble://client2\@server/test &"); client2.execute("mumble mumble://client2\@server/test &")
# cancel client audio configuration # cancel client audio configuration
$client1->waitForWindow(qr/Audio Tuning Wizard/); client1.wait_for_window(r"Audio Tuning Wizard")
$client2->waitForWindow(qr/Audio Tuning Wizard/); client2.wait_for_window(r"Audio Tuning Wizard")
$server->sleep(5); # wait because mumble is slow to register event handlers server.sleep(5) # wait because mumble is slow to register event handlers
$client1->sendKeys("esc"); client1.send_key("esc")
$client2->sendKeys("esc"); client2.send_key("esc")
# cancel client cert configuration # cancel client cert configuration
$client1->waitForWindow(qr/Certificate Management/); client1.wait_for_window(r"Certificate Management")
$client2->waitForWindow(qr/Certificate Management/); client2.wait_for_window(r"Certificate Management")
$server->sleep(5); # wait because mumble is slow to register event handlers server.sleep(5) # wait because mumble is slow to register event handlers
$client1->sendKeys("esc"); client1.send_key("esc")
$client2->sendKeys("esc"); client2.send_key("esc")
# accept server certificate # accept server certificate
$client1->waitForWindow(qr/^Mumble$/); client1.wait_for_window(r"^Mumble$")
$client2->waitForWindow(qr/^Mumble$/); client2.wait_for_window(r"^Mumble$")
$server->sleep(5); # wait because mumble is slow to register event handlers server.sleep(5) # wait because mumble is slow to register event handlers
$client1->sendChars("y"); client1.send_chars("y")
$client2->sendChars("y"); client2.send_chars("y")
$server->sleep(5); # wait because mumble is slow to register event handlers server.sleep(5) # wait because mumble is slow to register event handlers
# sometimes the wrong of the 2 windows is focused, we switch focus and try pressing "y" again # sometimes the wrong of the 2 windows is focused, we switch focus and try pressing "y" again
$client1->sendKeys("alt-tab"); client1.send_key("alt-tab")
$client2->sendKeys("alt-tab"); client2.send_key("alt-tab")
$server->sleep(5); # wait because mumble is slow to register event handlers server.sleep(5) # wait because mumble is slow to register event handlers
$client1->sendChars("y"); client1.send_chars("y")
$client2->sendChars("y"); client2.send_chars("y")
# Find clients in logs # Find clients in logs
$server->waitUntilSucceeds("journalctl -eu murmur -o cat | grep -q client1"); server.wait_until_succeeds("journalctl -eu murmur -o cat | grep -q client1")
$server->waitUntilSucceeds("journalctl -eu murmur -o cat | grep -q client2"); server.wait_until_succeeds("journalctl -eu murmur -o cat | grep -q client2")
$server->sleep(5); # wait to get screenshot server.sleep(5) # wait to get screenshot
$client1->screenshot("screen1"); client1.screenshot("screen1")
$client2->screenshot("screen2"); client2.screenshot("screen2")
''; '';
}) })

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ... }: { import ./make-test-python.nix ({ pkgs, ... }: {
name = "nginx-sso"; name = "nginx-sso";
meta = { meta = {
maintainers = with pkgs.stdenv.lib.maintainers; [ delroth ]; maintainers = with pkgs.stdenv.lib.maintainers; [ delroth ];
@ -27,18 +27,22 @@ import ./make-test.nix ({ pkgs, ... }: {
}; };
testScript = '' testScript = ''
startAll; start_all()
$machine->waitForUnit("nginx-sso.service"); machine.wait_for_unit("nginx-sso.service")
$machine->waitForOpenPort(8080); machine.wait_for_open_port(8080)
# No valid user -> 401. with subtest("No valid user -> 401"):
$machine->fail("curl -sSf http://localhost:8080/auth"); machine.fail("curl -sSf http://localhost:8080/auth")
# Valid user but no matching ACL -> 403. with subtest("Valid user but no matching ACL -> 403"):
$machine->fail("curl -sSf -H 'Authorization: Token MyToken' http://localhost:8080/auth"); machine.fail(
"curl -sSf -H 'Authorization: Token MyToken' http://localhost:8080/auth"
)
# Valid user and matching ACL -> 200. with subtest("Valid user and matching ACL -> 200"):
$machine->succeed("curl -sSf -H 'Authorization: Token MyToken' -H 'X-Application: MyApp' http://localhost:8080/auth"); machine.succeed(
"curl -sSf -H 'Authorization: Token MyToken' -H 'X-Application: MyApp' http://localhost:8080/auth"
)
''; '';
}) })

View File

@ -4,7 +4,7 @@
# 2. whether the ETag header is properly generated whenever we're serving # 2. whether the ETag header is properly generated whenever we're serving
# files in Nix store paths # files in Nix store paths
# 3. nginx doesn't restart on configuration changes (only reloads) # 3. nginx doesn't restart on configuration changes (only reloads)
import ./make-test.nix ({ pkgs, ... }: { import ./make-test-python.nix ({ pkgs, ... }: {
name = "nginx"; name = "nginx";
meta = with pkgs.stdenv.lib.maintainers; { meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ mbbx6spp ]; maintainers = [ mbbx6spp ];
@ -69,43 +69,46 @@ import ./make-test.nix ({ pkgs, ... }: {
justReloadSystem = "${nodes.webserver.config.system.build.toplevel}/fine-tune/child-2"; justReloadSystem = "${nodes.webserver.config.system.build.toplevel}/fine-tune/child-2";
reloadRestartSystem = "${nodes.webserver.config.system.build.toplevel}/fine-tune/child-3"; reloadRestartSystem = "${nodes.webserver.config.system.build.toplevel}/fine-tune/child-3";
in '' in ''
my $url = 'http://localhost/index.html'; url = "http://localhost/index.html"
sub checkEtag {
my $etag = $webserver->succeed(
'curl -v '.$url.' 2>&1 | sed -n -e "s/^< [Ee][Tt][Aa][Gg]: *//p"'
);
$etag =~ s/\r?\n$//;
my $httpCode = $webserver->succeed(
'curl -w "%{http_code}" -X HEAD -H \'If-None-Match: '.$etag.'\' '.$url
);
chomp $httpCode;
die "HTTP code is not 304" unless $httpCode == 304;
return $etag;
}
$webserver->waitForUnit("nginx"); def check_etag():
$webserver->waitForOpenPort("80"); etag = webserver.succeed(
f'curl -v {url} 2>&1 | sed -n -e "s/^< etag: *//ip"'
).rstrip()
http_code = webserver.succeed(
f"curl -w '%{{http_code}}' --head --fail -H 'If-None-Match: {etag}' {url}"
)
assert http_code.split("\n")[-1] == "304"
subtest "check ETag if serving Nix store paths", sub { return etag
my $oldEtag = checkEtag;
$webserver->succeed("${etagSystem}/bin/switch-to-configuration test >&2");
$webserver->sleep(1); # race condition
my $newEtag = checkEtag;
die "Old ETag $oldEtag is the same as $newEtag" if $oldEtag eq $newEtag;
};
subtest "config is reloaded on nixos-rebuild switch", sub {
$webserver->succeed("${justReloadSystem}/bin/switch-to-configuration test >&2");
$webserver->waitForOpenPort("8080");
$webserver->fail("journalctl -u nginx | grep -q -i stopped");
$webserver->succeed("journalctl -u nginx | grep -q -i reloaded");
};
subtest "restart when nginx package changes", sub { webserver.wait_for_unit("nginx")
$webserver->succeed("${reloadRestartSystem}/bin/switch-to-configuration test >&2"); webserver.wait_for_open_port(80)
$webserver->waitForUnit("nginx");
$webserver->succeed("journalctl -u nginx | grep -q -i stopped"); with subtest("check ETag if serving Nix store paths"):
}; old_etag = check_etag()
webserver.succeed(
"${etagSystem}/bin/switch-to-configuration test >&2"
)
webserver.sleep(1)
new_etag = check_etag()
assert old_etag != new_etag
with subtest("config is reloaded on nixos-rebuild switch"):
webserver.succeed(
"${justReloadSystem}/bin/switch-to-configuration test >&2"
)
webserver.wait_for_open_port(8080)
webserver.fail("journalctl -u nginx | grep -q -i stopped")
webserver.succeed("journalctl -u nginx | grep -q -i reloaded")
with subtest("restart when nginx package changes"):
webserver.succeed(
"${reloadRestartSystem}/bin/switch-to-configuration test >&2"
)
webserver.wait_for_unit("nginx")
webserver.succeed("journalctl -u nginx | grep -q -i stopped")
''; '';
}) })

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...} : import ./make-test.nix ({ pkgs, ...} :
let let
@ -7,7 +7,7 @@ let
{ services.httpd.enable = true; { services.httpd.enable = true;
services.httpd.adminAddr = "foo@example.org"; services.httpd.adminAddr = "foo@example.org";
services.httpd.documentRoot = "${pkgs.valgrind.doc}/share/doc/valgrind/html"; services.httpd.virtualHosts.localhost.documentRoot = "${pkgs.valgrind.doc}/share/doc/valgrind/html";
networking.firewall.allowedTCPPorts = [ 80 ]; networking.firewall.allowedTCPPorts = [ 80 ];
}; };
@ -26,11 +26,11 @@ in
{ services.httpd.enable = true; { services.httpd.enable = true;
services.httpd.adminAddr = "bar@example.org"; services.httpd.adminAddr = "bar@example.org";
services.httpd.extraModules = [ "proxy_balancer" "lbmethod_byrequests" ]; services.httpd.extraModules = [ "proxy_balancer" "lbmethod_byrequests" ];
services.httpd.extraConfig = ''
services.httpd.extraConfig = ExtendedStatus on
'' '';
ExtendedStatus on services.httpd.virtualHosts.localhost = {
extraConfig = ''
<Location /server-status> <Location /server-status>
Require all granted Require all granted
SetHandler server-status SetHandler server-status
@ -50,6 +50,7 @@ in
# For testing; don't want to wait forever for dead backend servers. # For testing; don't want to wait forever for dead backend servers.
ProxyTimeout 5 ProxyTimeout 5
''; '';
};
networking.firewall.allowedTCPPorts = [ 80 ]; networking.firewall.allowedTCPPorts = [ 80 ];
}; };

View File

@ -56,9 +56,11 @@ in
networking.firewall.enable = false; networking.firewall.enable = false;
services.httpd.enable = true; services.httpd.enable = true;
services.httpd.listen = [{ ip = "*"; port = 9000; }]; services.httpd.virtualHosts.localhost = {
services.httpd.adminAddr = "foo@example.org"; listen = [{ ip = "*"; port = 9000; }];
services.httpd.documentRoot = "/tmp"; adminAddr = "foo@example.org";
documentRoot = "/tmp";
};
}; };
client2 = client2 =

View File

@ -29,6 +29,6 @@ stdenv.mkDerivation rec {
homepage = https://flacon.github.io/; homepage = https://flacon.github.io/;
license = licenses.lgpl21; license = licenses.lgpl21;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ ndowens nico202 ]; maintainers = with maintainers; [ nico202 ];
}; };
} }

View File

@ -14,7 +14,7 @@ in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "renoise"; pname = "renoise";
version = "3.2.0"; version = "3.2.1";
src = src =
if stdenv.hostPlatform.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
"https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_Linux.tar.gz" "https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_Linux.tar.gz"
"https://web.archive.org/web/https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_Linux.tar.gz" "https://web.archive.org/web/https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_Linux.tar.gz"
]; ];
sha256 = "0cfczzpk1ddz61nk4d72fydbm5nbgxqp95v81by2n87s1wffjjhi"; sha256 = "0dhcidgnjzd4abw0xw1waj9mazp03nbvjcr2xx09l8gnfrkvny46";
} }
else else
releasePath releasePath

View File

@ -159,7 +159,7 @@ stdenv.mkDerivation {
homepage = https://www.spotify.com/; homepage = https://www.spotify.com/;
description = "Play music from the Spotify music service"; description = "Play music from the Spotify music service";
license = licenses.unfree; license = licenses.unfree;
maintainers = with maintainers; [ eelco ftrvxmtrx sheenobu mudri timokau ]; maintainers = with maintainers; [ eelco ftrvxmtrx sheenobu mudri timokau ma27 ];
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];
}; };
} }

View File

@ -3,12 +3,12 @@
, libGLU, lv2, gtk2, cairo, pango, fftwFloat, zita-convolver }: , libGLU, lv2, gtk2, cairo, pango, fftwFloat, zita-convolver }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "20191013"; version = "20191215";
pname = "x42-plugins"; pname = "x42-plugins";
src = fetchurl { src = fetchurl {
url = "https://gareus.org/misc/x42-plugins/${pname}-${version}.tar.xz"; url = "https://gareus.org/misc/x42-plugins/${pname}-${version}.tar.xz";
sha256 = "18kn1bmc0s6dp834kc51ibifzzn3bxwya4p8s8yq9f4mpmkghi24"; sha256 = "1mwfvhsvc0qgjyiwd8pmmam1mav43lmv39fljhmj9yri558v5g1c";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];

View File

@ -113,6 +113,8 @@
perl-completion = perl-completion =
callPackage ./perl-completion { }; callPackage ./perl-completion { };
pod-mode = callPackage ./pod-mode { };
railgun = callPackage ./railgun { }; railgun = callPackage ./railgun { };
structured-haskell-mode = self.shm; structured-haskell-mode = self.shm;

View File

@ -0,0 +1,18 @@
{ trivialBuild, lib, fetchurl }:
trivialBuild rec {
pname = "pod-mode";
version = "1.04";
src = fetchurl {
url = "mirror://cpan/authors/id/F/FL/FLORA/pod-mode-${version}.tar.gz";
sha256 = "1wr0khymkaa65blrc5nya607c1a3sjsww49bbf8f0a6176as71sv";
};
meta = with lib; {
description = "Major mode for editing .pod-files";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ qyliss ];
platform = platforms.all;
};
}

View File

@ -0,0 +1,21 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "glow";
version = "0.1.3";
src = fetchFromGitHub {
owner = "charmbracelet";
repo = "glow";
rev = "v${version}";
sha256 = "16zadrp42y01hi83hg47cw6c9zpw8z4xfssb5pxkmd2ynihaxfv5";
};
modSha256 = "1q67j9wg0kgb41zjgdbcrywxbwh597n8shwnwgl2xa6f7fvzpr4f";
meta = src.meta // {
description = "Render markdown on the CLI";
maintainers = with lib.maintainers; [ ehmry filalex77 ];
license = lib.licenses.mit;
};
}

View File

@ -150,7 +150,7 @@ let
with on-the-fly code analysis, error prevention and with on-the-fly code analysis, error prevention and
automated refactorings for PHP and JavaScript code. automated refactorings for PHP and JavaScript code.
''; '';
maintainers = with maintainers; [ schristo ]; maintainers = with maintainers; [ schristo ma27 ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
}); });

View File

@ -20,11 +20,11 @@ let
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "nano"; pname = "nano";
version = "4.6"; version = "4.7";
src = fetchurl { src = fetchurl {
url = "mirror://gnu/nano/${pname}-${version}.tar.xz"; url = "mirror://gnu/nano/${pname}-${version}.tar.xz";
sha256 = "1s98jsvkfar6qmd5n5l1n1k59623dnc93ciyvlhxjkvpad0kmb4v"; sha256 = "1x9nqy2kgaz6087p63i71gdjsqbdc9jjpx1ymlyclfakvsby3h2q";
}; };
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext; nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;
@ -38,15 +38,6 @@ in stdenv.mkDerivation rec {
(stdenv.lib.enableFeature enableTiny "tiny") (stdenv.lib.enableFeature enableTiny "tiny")
]; ];
patches = [
(fetchurl {
# fix compilation on macOS, where 'st_mtim' is unknown
# upstream patch not in 4.6
url = "https://git.savannah.gnu.org/cgit/nano.git/patch/?id=f516cddce749c3bf938271ef3182b9169ac8cbcc";
sha256 = "0gqymvr5vxxypr7y3sm252rsi4gjqp597l01x0lkxyvxsn45a4sx";
})
];
postInstall = '' postInstall = ''
cp ${nixSyntaxHighlight}/nix.nanorc $out/share/nano/ cp ${nixSyntaxHighlight}/nix.nanorc $out/share/nano/
''; '';

View File

@ -2,7 +2,6 @@
, libuv, lua, ncurses, pkgconfig , libuv, lua, ncurses, pkgconfig
, unibilium, xsel, gperf , unibilium, xsel, gperf
, libvterm-neovim , libvterm-neovim
, withJemalloc ? true, jemalloc
, glibcLocales ? null, procps ? null , glibcLocales ? null, procps ? null
# now defaults to false because some tests can be flaky (clipboard etc) # now defaults to false because some tests can be flaky (clipboard etc)
@ -50,8 +49,7 @@ in
ncurses ncurses
neovimLuaEnv neovimLuaEnv
unibilium unibilium
] ++ optional withJemalloc jemalloc ] ++ optional stdenv.isDarwin libiconv
++ optional stdenv.isDarwin libiconv
++ optionals doCheck [ glibcLocales procps ] ++ optionals doCheck [ glibcLocales procps ]
; ;
@ -92,16 +90,11 @@ in
hardeningDisable = [ "fortify" ]; hardeningDisable = [ "fortify" ];
preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
export DYLD_LIBRARY_PATH=${jemalloc}/lib
substituteInPlace src/nvim/CMakeLists.txt --replace " util" "" substituteInPlace src/nvim/CMakeLists.txt --replace " util" ""
''; '';
postInstall = stdenv.lib.optionalString stdenv.isLinux '' postInstall = stdenv.lib.optionalString stdenv.isLinux ''
sed -i -e "s|'xsel|'${xsel}/bin/xsel|g" $out/share/nvim/runtime/autoload/provider/clipboard.vim sed -i -e "s|'xsel|'${xsel}/bin/xsel|g" $out/share/nvim/runtime/autoload/provider/clipboard.vim
'' + stdenv.lib.optionalString (withJemalloc && stdenv.isDarwin) ''
install_name_tool -change libjemalloc.1.dylib \
${jemalloc}/lib/libjemalloc.1.dylib \
$out/bin/nvim
''; '';
# export PATH=$PWD/build/bin:${PATH} # export PATH=$PWD/build/bin:${PATH}
@ -126,7 +119,7 @@ in
# those contributions were copied from Vim (identified in the commit logs # those contributions were copied from Vim (identified in the commit logs
# by the vim-patch token). See LICENSE for details." # by the vim-patch token). See LICENSE for details."
license = with licenses; [ asl20 vim ]; license = with licenses; [ asl20 vim ];
maintainers = with maintainers; [ manveru rvolosatovs ]; maintainers = with maintainers; [ manveru rvolosatovs ma27 ];
platforms = platforms.unix; platforms = platforms.unix;
}; };
} }

View File

@ -5,13 +5,13 @@
buildPythonApplication rec { buildPythonApplication rec {
pname = "rednotebook"; pname = "rednotebook";
version = "2.14"; version = "2.15";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "jendrikseipp"; owner = "jendrikseipp";
repo = "rednotebook"; repo = "rednotebook";
rev = "v${version}"; rev = "v${version}";
sha256 = "1xs2wvm9g8vypz25li7rm8m0j4dsdpqpajcvrc756x5m149dxc08"; sha256 = "1p43xncqb898rgfx4vv1nxy6dj57pvxpc0b5j3kgs58ir70rg1js";
}; };
# We have not packaged tests. # We have not packaged tests.

View File

@ -3,16 +3,16 @@
, ilmbase, gtk3, intltool, lcms2, lensfun, libX11, libexif, libgphoto2, libjpeg , ilmbase, gtk3, intltool, lcms2, lensfun, libX11, libexif, libgphoto2, libjpeg
, libpng, librsvg, libtiff, openexr, osm-gps-map, pkgconfig, sqlite, libxslt , libpng, librsvg, libtiff, openexr, osm-gps-map, pkgconfig, sqlite, libxslt
, openjpeg, lua, pugixml, colord, colord-gtk, libwebp, libsecret, gnome3 , openjpeg, lua, pugixml, colord, colord-gtk, libwebp, libsecret, gnome3
, ocl-icd, pcre, gtk-mac-integration, isocodes , ocl-icd, pcre, gtk-mac-integration, isocodes, llvmPackages
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2.6.3"; version = "3.0.0";
pname = "darktable"; pname = "darktable";
src = fetchurl { src = fetchurl {
url = "https://github.com/darktable-org/darktable/releases/download/release-${version}/darktable-${version}.tar.xz"; url = "https://github.com/darktable-org/darktable/releases/download/release-${version}/darktable-${version}.tar.xz";
sha256 = "a518999c8458472edfc04577026ce5047d74553052af0f52d10ba8ce601b78f0"; sha256 = "7195a5ff7ee95ab7c5a57e4e84f8c90cc4728b2c917359203c21293ab754c0db";
}; };
nativeBuildInputs = [ cmake ninja llvm pkgconfig intltool perl desktop-file-utils wrapGAppsHook ]; nativeBuildInputs = [ cmake ninja llvm pkgconfig intltool perl desktop-file-utils wrapGAppsHook ];
@ -24,7 +24,8 @@ stdenv.mkDerivation rec {
libwebp libsecret gnome3.adwaita-icon-theme osm-gps-map pcre isocodes libwebp libsecret gnome3.adwaita-icon-theme osm-gps-map pcre isocodes
] ++ stdenv.lib.optionals stdenv.isLinux [ ] ++ stdenv.lib.optionals stdenv.isLinux [
colord colord-gtk libX11 ocl-icd colord colord-gtk libX11 ocl-icd
] ++ stdenv.lib.optional stdenv.isDarwin gtk-mac-integration; ] ++ stdenv.lib.optional stdenv.isDarwin gtk-mac-integration
++ stdenv.lib.optional stdenv.cc.isClang llvmPackages.openmp;
cmakeFlags = [ cmakeFlags = [
"-DBUILD_USERMANUAL=False" "-DBUILD_USERMANUAL=False"

View File

@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
description = "A light-weight image viewer"; description = "A light-weight image viewer";
homepage = "https://feh.finalrewind.org/"; homepage = "https://feh.finalrewind.org/";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ viric willibutz globin ]; maintainers = with maintainers; [ viric willibutz globin ma27 ];
platforms = platforms.unix; platforms = platforms.unix;
}; };
} }

View File

@ -1,5 +1,6 @@
{ stdenv { stdenv
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, boost , boost
, cmake , cmake
, ilmbase , ilmbase
@ -14,15 +15,22 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "openimageio"; pname = "openimageio";
version = "2.0.12"; version = "2.1.9.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "OpenImageIO"; owner = "OpenImageIO";
repo = "oiio"; repo = "oiio";
rev = "Release-${version}"; rev = "Release-${version}";
sha256 = "0v3k33jb0glb30jdhq3c732a9dxvnidaclz6b2wpqwik8l3658mj"; sha256 = "1bbxx3bcc5jlb90ffxbk29gb8227097rdr8vg97vj9axw2mjd5si";
}; };
patches = [
(fetchpatch {
url = "https://github.com/OpenImageIO/oiio/pull/2441/commits/e9bdd69596103edf41b659ad8ab0ca4ce002f6f5.patch";
sha256 = "0x1wmjf1jrm19d1izhs1cs3y1if9al1zx48lahkfswyjag3r5dn0";
})
];
outputs = [ "bin" "out" "dev" "doc" ]; outputs = [ "bin" "out" "dev" "doc" ];
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation (rec {
description = "Powerful image viewer with minimal UI"; description = "Powerful image viewer with minimal UI";
homepage = http://www.pberndt.com/Programme/Linux/pqiv; homepage = http://www.pberndt.com/Programme/Linux/pqiv;
license = licenses.gpl3; license = licenses.gpl3;
maintainers = [ maintainers.ndowens ]; maintainers = [];
platforms = platforms.linux; platforms = platforms.linux;
}; };
}) })

View File

@ -1,5 +1,5 @@
{ stdenv { stdenv
, avahi, libjpeg, libusb1, libv4l, net_snmp, libpng , avahi, libjpeg, libusb1, libv4l, net-snmp, libpng
, gettext, pkgconfig , gettext, pkgconfig
# List of { src name backend } attibute sets - see installFirmware below: # List of { src name backend } attibute sets - see installFirmware below:
@ -24,7 +24,7 @@ stdenv.mkDerivation {
++ stdenv.lib.optional (libusb1 != null) "--enable-libusb_1_0" ++ stdenv.lib.optional (libusb1 != null) "--enable-libusb_1_0"
; ;
buildInputs = [ avahi libusb1 libv4l net_snmp libpng ]; buildInputs = [ avahi libusb1 libv4l net-snmp libpng ];
nativeBuildInputs = [ gettext pkgconfig ]; nativeBuildInputs = [ gettext pkgconfig ];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -2,7 +2,7 @@
mkDerivation, lib, kdepimTeam, mkDerivation, lib, kdepimTeam,
extra-cmake-modules, kdoctools, extra-cmake-modules, kdoctools,
qtwebengine, qtwebengine,
kcmutils, kcrash, kdbusaddons, kwindowsystem, kcmutils, kcrash, kdbusaddons, kparts, kwindowsystem,
akonadi, grantleetheme, kdepim-apps-libs, kontactinterface, kpimtextedit, akonadi, grantleetheme, kdepim-apps-libs, kontactinterface, kpimtextedit,
mailcommon, libkdepim mailcommon, libkdepim
}: }:
@ -16,7 +16,7 @@ mkDerivation {
nativeBuildInputs = [ extra-cmake-modules kdoctools ]; nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [ buildInputs = [
qtwebengine qtwebengine
kcmutils kcrash kdbusaddons kwindowsystem kcmutils kcrash kdbusaddons kparts kwindowsystem
akonadi grantleetheme kdepim-apps-libs kontactinterface kpimtextedit akonadi grantleetheme kdepim-apps-libs kontactinterface kpimtextedit
mailcommon libkdepim mailcommon libkdepim
]; ];

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, mkDerivation { stdenv, fetchFromGitHub, mkDerivation
, qtbase, qtsvg, qtserialport, qtwebkit, qtmultimedia, qttools , qtbase, qtsvg, qtserialport, qtwebengine, qtmultimedia, qttools
, qtconnectivity, qtcharts , qtconnectivity, qtcharts, libusb
, yacc, flex, zlib, qmake, makeDesktopItem, makeWrapper , yacc, flex, zlib, qmake, makeDesktopItem, makeWrapper
}: }:
@ -16,18 +16,18 @@ let
}; };
in mkDerivation rec { in mkDerivation rec {
pname = "golden-cheetah"; pname = "golden-cheetah";
version = "3.5-DEV1903"; version = "3.5-RC2X";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "GoldenCheetah"; owner = "GoldenCheetah";
repo = "GoldenCheetah"; repo = "GoldenCheetah";
rev = "v${version}"; rev = "V${version}";
sha256 = "130b0hm04i0hf97rs1xrdfhbal5vjsknj3x4cdxjh7rgbg2p1sm3"; sha256 = "1d85700gjbcw2badwz225rjdr954ai89900vp8sal04sk79wbr6g";
}; };
buildInputs = [ buildInputs = [
qtbase qtsvg qtserialport qtwebkit qtmultimedia qttools zlib qtbase qtsvg qtserialport qtwebengine qtmultimedia qttools zlib
qtconnectivity qtcharts qtconnectivity qtcharts libusb
]; ];
nativeBuildInputs = [ flex makeWrapper qmake yacc ]; nativeBuildInputs = [ flex makeWrapper qmake yacc ];
@ -39,7 +39,14 @@ in mkDerivation rec {
cp src/gcconfig.pri.in src/gcconfig.pri cp src/gcconfig.pri.in src/gcconfig.pri
cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri
echo 'QMAKE_LRELEASE = ${qttools.dev}/bin/lrelease' >> src/gcconfig.pri echo 'QMAKE_LRELEASE = ${qttools.dev}/bin/lrelease' >> src/gcconfig.pri
echo 'LIBUSB_INSTALL = ${libusb}' >> src/gcconfig.pri
echo 'LIBUSB_INCLUDE = ${libusb.dev}/include' >> src/gcconfig.pri
echo 'LIBUSB_LIBS = -L${libusb}/lib -lusb' >> src/gcconfig.pri
sed -i -e '21,23d' qwt/qwtconfig.pri # Removed forced installation to /usr/local sed -i -e '21,23d' qwt/qwtconfig.pri # Removed forced installation to /usr/local
# Use qtwebengine instead of qtwebkit
substituteInPlace src/gcconfig.pri \
--replace "#DEFINES += NOWEBKIT" "DEFINES += NOWEBKIT"
''; '';
installPhase = '' installPhase = ''
@ -53,9 +60,6 @@ in mkDerivation rec {
runHook postInstall runHook postInstall
''; '';
# RCC: Error in 'Resources/application.qrc': Cannot find file 'translations/gc_fr.qm'
enableParallelBuilding = false;
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Performance software for cyclists, runners and triathletes"; description = "Performance software for cyclists, runners and triathletes";
platforms = platforms.linux; platforms = platforms.linux;

View File

@ -2,7 +2,7 @@
buildGoModule rec { buildGoModule rec {
pname = "hugo"; pname = "hugo";
version = "0.61.0"; version = "0.62.0";
goPackagePath = "github.com/gohugoio/hugo"; goPackagePath = "github.com/gohugoio/hugo";
@ -10,10 +10,10 @@ buildGoModule rec {
owner = "gohugoio"; owner = "gohugoio";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "1ad70g4gb44dk48pbgk48jzs44b6l7ksxb739ahp7vs1nyvvgffr"; sha256 = "0z14qhsjgwqgm7kj25y0zh4b42bwd7zhcmwjxzkk6chzw7fwq375";
}; };
modSha256 = "1jb1iqlp1005aj8smcgznmwnqaysi5g5wcsj8nvvm70hhc9j8wns"; modSha256 = "0dwv5qnglv00jj7vlps76zlfpkzsplf93401j2l03xfvmvadifrs";
buildFlags = "-tags extended"; buildFlags = "-tags extended";

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "josm"; pname = "josm";
version = "15492"; version = "15553";
src = fetchurl { src = fetchurl {
url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar"; url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
sha256 = "0x7ndcrlvrvk2fd4pyn10npr3778khcwg6xzzh19vdw4glh5zfcl"; sha256 = "07kkc19r9xkb5jim26nnmajp0jzvg3absgx55z5qnna6r189ba2j";
}; };
buildInputs = [ jdk11 makeWrapper ]; buildInputs = [ jdk11 makeWrapper ];

View File

@ -97,7 +97,7 @@ in buildFHSUserEnv {
libcap libtiff libva libgphoto2 libxslt libtxc_dxtn libsndfile giflib zlib glib libcap libtiff libva libgphoto2 libxslt libtxc_dxtn libsndfile giflib zlib glib
alsaLib zziplib bash dbus keyutils zip cabextract freetype unzip coreutils alsaLib zziplib bash dbus keyutils zip cabextract freetype unzip coreutils
readline gcc SDL SDL2 curl graphite2 gtk2 gtk3 udev ncurses wayland libglvnd readline gcc SDL SDL2 curl graphite2 gtk2 gtk3 udev ncurses wayland libglvnd
vulkan-loader xdg_utils sqlite vulkan-loader xdg_utils sqlite gnutls
# PCSX2 // TODO: "libgobject-2.0.so.0: wrong ELF class: ELFCLASS64" # PCSX2 // TODO: "libgobject-2.0.so.0: wrong ELF class: ELFCLASS64"

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, makeWrapper { stdenv, lib, fetchurl
, autoreconfHook, pkgconfig, libxkbcommon, pango, which, git , autoreconfHook, pkgconfig, libxkbcommon, pango, which, git
, cairo, libxcb, xcbutil, xcbutilwm, xcbutilxrm, libstartup_notification , cairo, libxcb, xcbutil, xcbutilwm, xcbutilxrm, libstartup_notification
, bison, flex, librsvg, check , bison, flex, librsvg, check
@ -19,23 +19,18 @@ stdenv.mkDerivation rec {
sed -i 's/~root/~nobody/g' test/helper-expand.c sed -i 's/~root/~nobody/g' test/helper-expand.c
''; '';
nativeBuildInputs = [ autoreconfHook pkgconfig makeWrapper ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ libxkbcommon pango cairo git bison flex librsvg check buildInputs = [ libxkbcommon pango cairo git bison flex librsvg check
libstartup_notification libxcb xcbutil xcbutilwm xcbutilxrm which libstartup_notification libxcb xcbutil xcbutilwm xcbutilxrm which
]; ];
postInstall = ''
wrapProgram $out/bin/rofi-theme-selector \
--prefix XDG_DATA_DIRS : $out/share
'';
doCheck = false; doCheck = false;
meta = with lib; { meta = with lib; {
description = "Window switcher, run dialog and dmenu replacement"; description = "Window switcher, run dialog and dmenu replacement";
homepage = "https://github.com/davatorium/rofi"; homepage = "https://github.com/davatorium/rofi";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ mbakke ma27 ]; maintainers = with maintainers; [ mbakke ];
platforms = with platforms; linux; platforms = with platforms; linux;
}; };
} }

View File

@ -1,6 +1,5 @@
{ stdenv, rofi-unwrapped, makeWrapper, theme ? null }: { stdenv, rofi-unwrapped, makeWrapper, hicolor-icon-theme, theme ? null }:
if theme == null then rofi-unwrapped else
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "rofi"; pname = "rofi";
version = rofi-unwrapped.version; version = rofi-unwrapped.version;
@ -14,8 +13,15 @@ stdenv.mkDerivation {
rm $out/bin rm $out/bin
mkdir $out/bin mkdir $out/bin
ln -s ${rofi-unwrapped}/bin/* $out/bin ln -s ${rofi-unwrapped}/bin/* $out/bin
rm $out/bin/rofi rm $out/bin/rofi
makeWrapper ${rofi-unwrapped}/bin/rofi $out/bin/rofi --add-flags "-theme ${theme}" makeWrapper ${rofi-unwrapped}/bin/rofi $out/bin/rofi \
--prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share \
${if theme != null then ''--add-flags "-theme ${theme}"'' else ""}
rm $out/bin/rofi-theme-selector
makeWrapper ${rofi-unwrapped}/bin/rofi-theme-selector $out/bin/rofi-theme-selector \
--prefix XDG_DATA_DIRS : $out/share
''; '';
meta = rofi-unwrapped.meta // { meta = rofi-unwrapped.meta // {

View File

@ -16,10 +16,10 @@ let
pname = "simplenote"; pname = "simplenote";
version = "1.11.0"; version = "1.12.0";
sha256 = { sha256 = {
x86_64-linux = "1ljam1yfiy1lh6lrknrq7cdqpj1q7f655mxjiiwv3izp98qr1f8s"; x86_64-linux = "0y9b4haaj7qxr92wnwacziljqrkf4vlyqq3rvis8ribq6zr5b24w";
}.${system} or throwSystem; }.${system} or throwSystem;
meta = with stdenv.lib; { meta = with stdenv.lib; {
@ -87,6 +87,7 @@ let
postFixup = '' postFixup = ''
makeWrapper $out/opt/Simplenote/simplenote $out/bin/simplenote \ makeWrapper $out/opt/Simplenote/simplenote $out/bin/simplenote \
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ] }" \
"''${gappsWrapperArgs[@]}" "''${gappsWrapperArgs[@]}"
''; '';
}; };

View File

@ -20,14 +20,14 @@
}: }:
mkDerivation rec { mkDerivation rec {
version = "0.10.3"; version = "0.10.4";
pname = "syncthingtray"; pname = "syncthingtray";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Martchus"; owner = "Martchus";
repo = "syncthingtray"; repo = "syncthingtray";
rev = "v${version}"; rev = "v${version}";
sha256 = "12s1v65h4z051k4gi1b5f3z4hpbgqnhkjnz2xv5bdwhs24zxrrif"; sha256 = "068v63bb1bq6vz7byhnd28l6dmr4jmivailxmjv86wakbsqvlhbi";
}; };
buildInputs = [ qtbase cpp-utilities qtutilities ] buildInputs = [ qtbase cpp-utilities qtutilities ]

View File

@ -1,4 +1,4 @@
{ rustPlatform, lib, fetchFromGitHub, ncurses, openssl, pkgconfig }: { rustPlatform, lib, fetchFromGitHub, ncurses, openssl, pkgconfig, Security, stdenv }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "taizen"; pname = "taizen";
@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
sha256 = "09izgx7icvizskdy9kplk0am61p7550fsd0v42zcihq2vap2j92z"; sha256 = "09izgx7icvizskdy9kplk0am61p7550fsd0v42zcihq2vap2j92z";
}; };
buildInputs = [ ncurses openssl ]; buildInputs = [ ncurses openssl ] ++ lib.optional stdenv.isDarwin Security;
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
cargoSha256 = "0h8ybhb17pqhhfjcmq1l70kp8g1yyq38228lcf86byk3r2ar2rkg"; cargoSha256 = "0h8ybhb17pqhhfjcmq1l70kp8g1yyq38228lcf86byk3r2ar2rkg";

View File

@ -15,6 +15,6 @@ stdenv.mkDerivation rec {
description = "A two-pane file manager with advanced file manipulation features"; description = "A two-pane file manager with advanced file manipulation features";
homepage = http://www.boomerangsworld.de/cms/worker/index.html; homepage = http://www.boomerangsworld.de/cms/worker/index.html;
license = licenses.gpl2; license = licenses.gpl2;
maintainers = [ maintainers.ndowens ]; maintainers = [];
}; };
} }

View File

@ -4,13 +4,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "xmrig"; pname = "xmrig";
version = "5.1.0"; version = "5.4.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "xmrig"; owner = "xmrig";
repo = "xmrig"; repo = "xmrig";
rev = "v${version}"; rev = "v${version}";
sha256 = "1lkw7xrj20ppfmv7abki9i60yjks9i7nr8ni9p6n7rilfbp4603k"; sha256 = "1rwnlhzhasfa2iklrp897c0z7nvav2bz2z6nk41fvwwd3bsay2sf";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];

View File

@ -1,14 +1,14 @@
{ stdenv, buildGoPackage, fetchurl, fetchFromGitHub, go-bindata }: { stdenv, buildGoPackage, fetchurl, fetchFromGitHub, go-bindata }:
let let
version = "1.5.2"; version = "1.6.4";
# TODO: must build the extension instead of downloading it. But since it's # TODO: must build the extension instead of downloading it. But since it's
# literally an asset that is indifferent regardless of the platform, this # literally an asset that is indifferent regardless of the platform, this
# might be just enough. # might be just enough.
webext = fetchurl { webext = fetchurl {
url = "https://github.com/browsh-org/browsh/releases/download/v${version}/browsh-${version}-an.fx.xpi"; url = "https://github.com/browsh-org/browsh/releases/download/v${version}/browsh-${version}-an.fx.xpi";
sha256 = "0b9aycyif0hfhfkivlnvinr13r9h4qyxx768286966p67napbd63"; sha256 = "1shf1s9s525wns5vrsc4ns21zjxm1si43lx6v0q8ma6vd5x5445l";
}; };
in buildGoPackage rec { in buildGoPackage rec {
@ -23,7 +23,7 @@ in buildGoPackage rec {
owner = "browsh-org"; owner = "browsh-org";
repo = "browsh"; repo = "browsh";
rev = "v${version}"; rev = "v${version}";
sha256 = "1z78kgxrbi2jy20rbq6kx5mjk4gpg58w4rb3flp42l9p7bhdbr2h"; sha256 = "0gvf5k1gm81xxg7ha309kgfkgl5357dli0fbc4z01rmfgbl0rfa0";
}; };
buildInputs = [ go-bindata ]; buildInputs = [ go-bindata ];

View File

@ -1,3 +1,4 @@
# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix)
[ [
{ {
goPackagePath = "github.com/NYTimes/gziphandler"; goPackagePath = "github.com/NYTimes/gziphandler";
@ -49,8 +50,8 @@
fetch = { fetch = {
type = "git"; type = "git";
url = "https://github.com/gorilla/websocket"; url = "https://github.com/gorilla/websocket";
rev = "5ed622c449da6d44c3c8329331ff47a9e5844f71"; rev = "66b9c49e59c6c48f0ffce28c2d8b8a5678502c6d";
sha256 = "1yhcwraijdk6lx7f6m9p6i1b3zfh2hq80l1nfpnckfn10gh72aw7"; sha256 = "00i4vb31nsfkzzk7swvx3i75r2d960js3dri1875vypk3v2s0pzk";
}; };
} }
{ {
@ -103,8 +104,8 @@
fetch = { fetch = {
type = "git"; type = "git";
url = "https://github.com/mitchellh/mapstructure"; url = "https://github.com/mitchellh/mapstructure";
rev = "f15292f7a699fcc1a38a80977f80a046874ba8ac"; rev = "3536a929edddb9a5b34bd6861dc4a9647cb459fe";
sha256 = "0zm3nhdvmj3f8q0vg2sjfw1sm3pwsw0ggz501awz95w99664a8al"; sha256 = "03bpv28jz9zhn4947saqwi328ydj7f6g6pf1m2d4m5zdh5jlfkrr";
}; };
} }
{ {
@ -166,8 +167,8 @@
fetch = { fetch = {
type = "git"; type = "git";
url = "https://github.com/spf13/cast"; url = "https://github.com/spf13/cast";
rev = "8965335b8c7107321228e3e3702cab9832751bac"; rev = "8c9545af88b134710ab1cd196795e7f2388358d7";
sha256 = "177bk7lq40jbgv9p9r80aydpaccfk8ja3a7jjhfwiwk9r1pa4rr2"; sha256 = "0xq1ffqj8y8h7dcnm0m9lfrh0ga7pssnn2c1dnr09chqbpn4bdc5";
}; };
} }
{ {
@ -184,8 +185,8 @@
fetch = { fetch = {
type = "git"; type = "git";
url = "https://github.com/spf13/pflag"; url = "https://github.com/spf13/pflag";
rev = "3ebe029320b2676d667ae88da602a5f854788a8a"; rev = "298182f68c66c05229eb03ac171abe6e309ee79a";
sha256 = "11yxs0wqy70wj106fkz8r923yg4ncnc2mbw33v48zmlg4a1rasgp"; sha256 = "1cj3cjm7d3zk0mf1xdybh0jywkbbw7a6yr3y22x9sis31scprswd";
}; };
} }
{ {
@ -260,4 +261,4 @@
sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa"; sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa";
}; };
} }
] ]

View File

@ -16,7 +16,7 @@
, libXScrnSaver, libXcursor, libXtst, libGLU, libGL , libXScrnSaver, libXcursor, libXtst, libGLU, libGL
, protobuf, speechd, libXdamage, cups , protobuf, speechd, libXdamage, cups
, ffmpeg, libxslt, libxml2, at-spi2-core , ffmpeg, libxslt, libxml2, at-spi2-core
, jdk , jre
# optional dependencies # optional dependencies
, libgcrypt ? null # gnomeSupport || cupsSupport , libgcrypt ? null # gnomeSupport || cupsSupport
@ -124,7 +124,7 @@ let
glib gtk3 dbus-glib glib gtk3 dbus-glib
libXScrnSaver libXcursor libXtst libGLU libGL libXScrnSaver libXcursor libXtst libGLU libGL
pciutils protobuf speechd libXdamage at-spi2-core pciutils protobuf speechd libXdamage at-spi2-core
jdk.jre jre
] ++ optional gnomeKeyringSupport libgnome-keyring3 ] ++ optional gnomeKeyringSupport libgnome-keyring3
++ optionals gnomeSupport [ gnome.GConf libgcrypt ] ++ optionals gnomeSupport [ gnome.GConf libgcrypt ]
++ optionals cupsSupport [ libgcrypt cups ] ++ optionals cupsSupport [ libgcrypt cups ]

View File

@ -45,11 +45,11 @@ let
flash = stdenv.mkDerivation rec { flash = stdenv.mkDerivation rec {
pname = "flashplayer-ppapi"; pname = "flashplayer-ppapi";
version = "32.0.0.293"; version = "32.0.0.303";
src = fetchzip { src = fetchzip {
url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz"; url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz";
sha256 = "0rgriqdbyrzpm1bcph35bhzd5dz21yim56z93hkmbpdqg7767dwm"; sha256 = "0b2cw8y9rif2p0lyy2ir1v5lchxlsh543b9c743a2p85c9p7q62b";
stripRoot = false; stripRoot = false;
}; };

View File

@ -74,7 +74,7 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "flashplayer"; pname = "flashplayer";
version = "32.0.0.293"; version = "32.0.0.303";
src = fetchurl { src = fetchurl {
url = url =
@ -85,14 +85,14 @@ stdenv.mkDerivation rec {
sha256 = sha256 =
if debug then if debug then
if arch == "x86_64" then if arch == "x86_64" then
"0lz1na68gdi9n23hfj5c731dbskm9684cwar7ji8yjfhfryfg5yn" "05hfc5ywmcvp6zf8aqmzjp3qy3byp0zdl0ssrv9gvzcskdqkhsj2"
else else
"10gm2ynndlyk66fndfbh7ah5ssqpyw8415i10n3lpw940x201dk0" "12hl8lvxz648ha70gi3v85mwf0nnayjiaslr669vjan3ww94jymv"
else else
if arch == "x86_64" then if arch == "x86_64" then
"0hmlv0v9lbgxrmz0n7czfnrbrwjwxhy99gsr5g1m0aqgw0y61clc" "0x0mabgswly2v8z13832pkbjsv404aq61pback6sgmp2lyycdg6w"
else else
"0qdw4f48xhnkzdly3jz63v14nmzd0gg49az5wxb08ghs8laaqlik"; "16kbpf1i3aqlrfbfh5ncg1n46ncl9hp6qdp36s5j3ivbc68pj81z";
}; };
nativeBuildInputs = [ unzip ]; nativeBuildInputs = [ unzip ];

View File

@ -50,7 +50,7 @@
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "flashplayer-standalone"; pname = "flashplayer-standalone";
version = "32.0.0.293"; version = "32.0.0.303";
src = fetchurl { src = fetchurl {
url = url =
@ -60,9 +60,9 @@ stdenv.mkDerivation {
"https://fpdownload.macromedia.com/pub/flashplayer/updaters/32/flash_player_sa_linux.x86_64.tar.gz"; "https://fpdownload.macromedia.com/pub/flashplayer/updaters/32/flash_player_sa_linux.x86_64.tar.gz";
sha256 = sha256 =
if debug then if debug then
"13mrknvl3yd8vrcs7mp6szz6f9ssfs72apzvc60f9qfwkhiwlg87" "0xkzlv90lpyy54j6pllknrp1l9vjyh6dsl63l4c8cgh4i830gi14"
else else
"0isvmzyi4isxvxxc5ksplcqc5cafpvbrln3dddpms8zps2dxpyzi"; "0mi3ggv6zhzmdd1h68cgl87n6izhp0pbkhnidd2gl2cp95f23c2d";
}; };
nativeBuildInputs = [ unzip ]; nativeBuildInputs = [ unzip ];

View File

@ -1,16 +1,18 @@
{ stdenv, rustPlatform, fetchurl, stfl, sqlite, curl, gettext, pkgconfig, libxml2, json_c, ncurses { stdenv, rustPlatform, fetchFromGitHub, stfl, sqlite, curl, gettext, pkgconfig, libxml2, json_c, ncurses
, asciidoc, docbook_xml_dtd_45, libxslt, docbook_xsl, libiconv, Security, makeWrapper }: , asciidoc, docbook_xml_dtd_45, libxslt, docbook_xsl, libiconv, Security, makeWrapper }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "newsboat"; pname = "newsboat";
version = "2.17.1"; version = "2.18";
src = fetchurl { src = fetchFromGitHub {
url = "https://newsboat.org/releases/${version}/${pname}-${version}.tar.xz"; owner = "newsboat";
sha256 = "15qr2y35yvl0hzsf34d863n8v042v78ks6ksh5p1awvi055x5sy1"; repo = "newsboat";
rev = "r${version}";
sha256 = "1bg2qjkzdawn4fnn0w7jhw1dk6191w8axnqra43z21pinfyim6da";
}; };
cargoSha256 = "0db4j6y43gacazrvcmq823fzl5pdfdlg8mkjpysrw6h9fxisq83f"; cargoSha256 = "0q0iqd8y9rph8pwild5i2kv00h217a166c88hxpmbrigq9w960lp";
postPatch = '' postPatch = ''
substituteInPlace Makefile --replace "|| true" "" substituteInPlace Makefile --replace "|| true" ""

View File

@ -66,6 +66,6 @@ stdenv.mkDerivation rec {
description = "Open Source Video Calls and Chat"; description = "Open Source Video Calls and Chat";
license = licenses.lgpl21Plus; license = licenses.lgpl21Plus;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ ndowens ]; maintainers = with maintainers; [];
}; };
} }

View File

@ -7,34 +7,30 @@ def source(url)
source 'https://rubygems.org' source 'https://rubygems.org'
ruby '>= 2.3.0' ruby '>= 2.5.0'
group :default do group :default do
gem 'oauth', '>= 0.5.1' gem 'addressable','>= 2.7.0', '< 2.8'
gem 'json_pure', '~> 1.8' gem 'delayer','>= 1.0.1', '< 1.1'
gem 'addressable', '>= 2.5.2', '< 2.6' gem 'delayer-deferred','>= 2.1.1', '< 2.2'
gem 'diva', '>= 0.3.2', '< 2.0' gem 'diva','>= 1.0.1', '< 1.1'
gem 'memoist', '>= 0.16', '< 0.17' gem 'memoist','>= 0.16.2', '< 0.17'
gem 'ruby-hmac', '~> 0.4' gem 'oauth','>= 0.5.4'
gem 'typed-array', '~> 0.1' gem 'pluggaloid','>= 1.2.0', '< 1.3'
gem 'delayer', '~> 0.0' gem 'typed-array','>= 0.1.2', '< 0.2'
gem 'pluggaloid', '>= 1.1.1', '< 2.0'
gem 'delayer-deferred', '>= 2.0', '< 3.0'
gem 'twitter-text', '>= 2.1.0'
end end
group :test do group :test do
gem 'test-unit', '~> 3.0' gem 'test-unit','>= 3.3.4', '< 4.0'
gem 'rake', '~> 10.1' gem 'rake','>= 13.0.1'
gem 'watch', '~> 0.1' gem 'mocha','>= 1.11.1'
gem 'mocha', '~> 0.14' gem 'webmock','>= 3.7.6'
gem 'webmock', '~> 1.17' gem 'ruby-prof','>= 1.1.0'
gem 'ruby-prof'
end end
group :plugin do group :plugin do
Dir.glob(File.expand_path(File.join(__dir__, 'core/plugin/*/Gemfile'))){ |path| Dir.glob(File.expand_path(File.join(__dir__, 'plugin/*/Gemfile'))){ |path|
eval File.open(path).read eval File.open(path).read
} }
Dir.glob(File.join(File.expand_path(ENV['MIKUTTER_CONFROOT'] || '~/.mikutter'), 'plugin/*/Gemfile')){ |path| Dir.glob(File.join(File.expand_path(ENV['MIKUTTER_CONFROOT'] || '~/.mikutter'), 'plugin/*/Gemfile')){ |path|

View File

@ -1,117 +1,103 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
addressable (2.5.2) addressable (2.7.0)
public_suffix (>= 2.0.2, < 4.0) public_suffix (>= 2.0.2, < 5.0)
atk (3.3.2) atk (3.4.1)
glib2 (= 3.3.2) glib2 (= 3.4.1)
cairo (1.16.4) cairo (1.16.4)
native-package-installer (>= 1.0.3) native-package-installer (>= 1.0.3)
pkg-config (>= 1.2.2) pkg-config (>= 1.2.2)
cairo-gobject (3.3.2) cairo-gobject (3.4.1)
cairo (>= 1.16.2) cairo (>= 1.16.2)
glib2 (= 3.3.2) glib2 (= 3.4.1)
crack (0.4.3) crack (0.4.3)
safe_yaml (~> 1.0.0) safe_yaml (~> 1.0.0)
delayer (0.0.2) delayer (1.0.1)
delayer-deferred (2.0.0) delayer-deferred (2.1.1)
delayer (>= 0.0.2, < 0.1) delayer (>= 1.0, < 2.0)
diva (0.3.2) diva (1.0.1)
addressable (>= 2.5, < 2.6) addressable (>= 2.5.2, < 2.8)
gdk_pixbuf2 (3.3.2) gdk_pixbuf2 (3.4.1)
gio2 (= 3.3.2) gio2 (= 3.4.1)
gettext (3.2.9) gettext (3.2.9)
locale (>= 2.0.5) locale (>= 2.0.5)
text (>= 1.3.0) text (>= 1.3.0)
gio2 (3.3.2) gio2 (3.4.1)
gobject-introspection (= 3.3.2) gobject-introspection (= 3.4.1)
glib2 (3.3.2) glib2 (3.4.1)
native-package-installer (>= 1.0.3) native-package-installer (>= 1.0.3)
pkg-config (>= 1.2.2) pkg-config (>= 1.3.5)
gobject-introspection (3.3.2) gobject-introspection (3.4.1)
glib2 (= 3.3.2) glib2 (= 3.4.1)
gtk2 (3.3.2) gtk2 (3.4.1)
atk (= 3.3.2) atk (= 3.4.1)
gdk_pixbuf2 (= 3.3.2) gdk_pixbuf2 (= 3.4.1)
pango (= 3.3.2) pango (= 3.4.1)
hashdiff (0.3.9) hashdiff (1.0.0)
httpclient (2.8.3) httpclient (2.8.3)
idn-ruby (0.1.0)
instance_storage (1.0.0) instance_storage (1.0.0)
irb (1.0.0) io-console (0.5.3)
json_pure (1.8.6) irb (1.2.1)
reline (>= 0.0.1)
locale (2.1.2) locale (2.1.2)
memoist (0.16.0) memoist (0.16.2)
metaclass (0.0.4)
mini_portile2 (2.4.0) mini_portile2 (2.4.0)
mocha (0.14.0) mocha (1.11.1)
metaclass (~> 0.0.1) moneta (1.2.1)
moneta (1.1.1) native-package-installer (1.0.9)
native-package-installer (1.0.7) nokogiri (1.10.7)
nokogiri (1.10.3)
mini_portile2 (~> 2.4.0) mini_portile2 (~> 2.4.0)
oauth (0.5.4) oauth (0.5.4)
pango (3.3.2) pango (3.4.1)
cairo-gobject (= 3.3.2) cairo-gobject (= 3.4.1)
gobject-introspection (= 3.3.2) gobject-introspection (= 3.4.1)
pkg-config (1.3.7) pkg-config (1.4.0)
pluggaloid (1.1.2) pluggaloid (1.2.0)
delayer delayer (>= 1.0.0, < 2.0)
instance_storage (>= 1.0.0, < 2.0.0) instance_storage (>= 1.0.0, < 2.0.0)
power_assert (1.1.4) power_assert (1.1.5)
public_suffix (3.0.3) public_suffix (4.0.1)
rake (10.5.0) rake (13.0.1)
ruby-hmac (0.4.0) reline (0.1.2)
ruby-prof (0.17.0) io-console (~> 0.5)
ruby-prof (1.1.0)
safe_yaml (1.0.5) safe_yaml (1.0.5)
test-unit (3.3.2) test-unit (3.3.4)
power_assert power_assert
text (1.3.1) text (1.3.1)
totoridipjp (0.1.0)
twitter-text (3.0.0)
idn-ruby
unf (~> 0.1.0)
typed-array (0.1.2) typed-array (0.1.2)
unf (0.1.4) webmock (3.7.6)
unf_ext
unf_ext (0.0.7.6)
watch (0.1.0)
webmock (1.24.6)
addressable (>= 2.3.6) addressable (>= 2.3.6)
crack (>= 0.3.2) crack (>= 0.3.2)
hashdiff hashdiff (>= 0.4.0, < 2.0.0)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
addressable (>= 2.5.2, < 2.6) addressable (>= 2.7.0, < 2.8)
delayer (~> 0.0) delayer (>= 1.0.1, < 1.1)
delayer-deferred (>= 2.0, < 3.0) delayer-deferred (>= 2.1.1, < 2.2)
diva (>= 0.3.2, < 2.0) diva (>= 1.0.1, < 1.1)
gettext (>= 3.2.9, < 3.3) gettext (>= 3.2.9, < 3.3)
gtk2 (= 3.3.2) gtk2 (= 3.4.1)
httpclient httpclient
irb (>= 1.0.0, < 1.1) irb (>= 1.2.0, < 1.3)
json_pure (~> 1.8) memoist (>= 0.16.2, < 0.17)
memoist (>= 0.16, < 0.17) mocha (>= 1.11.1)
mocha (~> 0.14)
moneta moneta
nokogiri nokogiri
oauth (>= 0.5.1) oauth (>= 0.5.4)
pluggaloid (>= 1.1.1, < 2.0) pluggaloid (>= 1.2.0, < 1.3)
rake (~> 10.1) rake (>= 13.0.1)
ruby-hmac (~> 0.4) ruby-prof (>= 1.1.0)
ruby-prof test-unit (>= 3.3.4, < 4.0)
test-unit (~> 3.0) typed-array (>= 0.1.2, < 0.2)
totoridipjp webmock (>= 3.7.6)
twitter-text (>= 2.1.0)
typed-array (~> 0.1)
watch (~> 0.1)
webmock (~> 1.17)
RUBY VERSION RUBY VERSION
ruby 2.5.5p157 ruby 2.7.0p0
BUNDLED WITH BUNDLED WITH
1.17.2 2.1.2

View File

@ -7,23 +7,24 @@
# find latest version at: http://mikutter.hachune.net/download#download # find latest version at: http://mikutter.hachune.net/download#download
# run these commands: # run these commands:
# #
# wget http://mikutter.hachune.net/bin/mikutter.3.8.7.tar.gz # wget http://mikutter.hachune.net/bin/mikutter.4.0.0.tar.gz
# tar xvf mikutter.3.8.7.tar.gz # mkdir mikutter
# cd mikutter # cd mikutter
# tar xvf ../mikutter.4.0.0.tar.gz
# find . -not -name Gemfile -exec rm {} \; # find . -not -name Gemfile -exec rm {} \;
# find . -type d -exec rmdir -p --ignore-fail-on-non-empty {} \; # find . -type d -exec rmdir -p --ignore-fail-on-non-empty {} \;
# cd .. # cd ..
# mv mikutter/* . # mv mikutter/* .
# rm mikutter.3.8.7.tar.gz # rm mikutter.4.0.0.tar.gz
# rm gemset.nix Gemfile.lock; nix-shell -p bundler bundix --run 'bundle lock && bundix' # rm gemset.nix Gemfile.lock; nix-shell -p bundler bundix --run 'bundle lock && bundix'
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "mikutter"; pname = "mikutter";
version = "3.8.7"; version = "4.0.0";
src = fetchurl { src = fetchurl {
url = "https://mikutter.hachune.net/bin/mikutter.${version}.tar.gz"; url = "https://mikutter.hachune.net/bin/mikutter.${version}.tar.gz";
sha256 = "1griypcd1xgyfd9wc3ls32grpw4ig0xxdiygpdinzr3bigfmd7iv"; sha256 = "0nx14vlp7p69m2vw0s6kbiyymsfq0r2jd4nm0v5c4xb9avkpgc8g";
}; };
env = bundlerEnv { env = bundlerEnv {
@ -36,8 +37,11 @@ stdenv.mkDerivation rec {
buildInputs = [ alsaUtils libnotify which gtk2 ruby atk gobject-introspection ]; buildInputs = [ alsaUtils libnotify which gtk2 ruby atk gobject-introspection ];
nativeBuildInputs = [ wrapGAppsHook ]; nativeBuildInputs = [ wrapGAppsHook ];
postUnpack = '' unpackPhase = ''
rm -rf $sourceRoot/vendor mkdir source
cd source
unpackFile $src
rm -rf vendor
''; '';
installPhase = '' installPhase = ''
@ -73,5 +77,6 @@ stdenv.mkDerivation rec {
homepage = https://mikutter.hachune.net; homepage = https://mikutter.hachune.net;
platforms = ruby.meta.platforms; platforms = ruby.meta.platforms;
license = licenses.mit; license = licenses.mit;
broken = true;
}; };
} }

View File

@ -5,10 +5,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0viqszpkggqi8hq87pqp0xykhvz60g99nwmkwsb0v45kc2liwxvk"; sha256 = "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy";
type = "gem"; type = "gem";
}; };
version = "2.5.2"; version = "2.7.0";
}; };
atk = { atk = {
dependencies = ["glib2"]; dependencies = ["glib2"];
@ -16,10 +16,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "17c5ixwyg16lbbjix2prk7fa6lm0vkxvc1z6m6inc6jgkb1x0700"; sha256 = "0a8q9a1f6x4gy55p8cf52a22bnpjgn18ad9n959x0f4gybbhs948";
type = "gem"; type = "gem";
}; };
version = "3.3.2"; version = "3.4.1";
}; };
cairo = { cairo = {
dependencies = ["native-package-installer" "pkg-config"]; dependencies = ["native-package-installer" "pkg-config"];
@ -38,10 +38,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "12q441a5vnfvbcnli4fpq2svb75vq1wvs2rlgsp6fv38fh6fgsfz"; sha256 = "0gkxdfslcvrwrs48giilji3bgxd5bwijwq33p9h00r10jzfg2028";
type = "gem"; type = "gem";
}; };
version = "3.3.2"; version = "3.4.1";
}; };
crack = { crack = {
dependencies = ["safe_yaml"]; dependencies = ["safe_yaml"];
@ -59,10 +59,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "156vy4x1d2jgafkjaafzfz7g8ghl4p5zgbl859b8slp4wdxy3v1r"; sha256 = "09p4rkh3dpdm1mhq721m4d6zvxqqp44kg7069s8l7kmaf7nv2nb3";
type = "gem"; type = "gem";
}; };
version = "0.0.2"; version = "1.0.1";
}; };
delayer-deferred = { delayer-deferred = {
dependencies = ["delayer"]; dependencies = ["delayer"];
@ -70,10 +70,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0zvqphyzngj5wghgbb2nd1qj2qvj2plsz9vx8hz24c7bfq55n4xz"; sha256 = "1mbdxn1hskjqf3zlj4waxl71ccvbj6lk81c99769paxw4fajwrgx";
type = "gem"; type = "gem";
}; };
version = "2.0.0"; version = "2.1.1";
}; };
diva = { diva = {
dependencies = ["addressable"]; dependencies = ["addressable"];
@ -81,10 +81,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0rp125gdlq7jqq7x8la52pdpimhx5wr66frcgf6z4jm927rjw84d"; sha256 = "182gws1zihhpl7r3m8jsf29maqg9xdhj46s9lidbldar8clpl23h";
type = "gem"; type = "gem";
}; };
version = "0.3.2"; version = "1.0.1";
}; };
gdk_pixbuf2 = { gdk_pixbuf2 = {
dependencies = ["gio2"]; dependencies = ["gio2"];
@ -92,10 +92,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "071z8a8khs5qb43ri5hbvaijwbx43mick7cjfmhn6javifkzijk7"; sha256 = "0194gzn0kialfh0j7crllvp808r64sg6dh297x69b0av21ar5pam";
type = "gem"; type = "gem";
}; };
version = "3.3.2"; version = "3.4.1";
}; };
gettext = { gettext = {
dependencies = ["locale" "text"]; dependencies = ["locale" "text"];
@ -114,10 +114,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1f131yd9zzfsjn8i4k8xkl7xm3c5f9sm7irvwxnqqh635qccfz8n"; sha256 = "1l3jpgbdvb55xhcmpkcqgwx5068dfyi8kijfvzhbqh96ng0p1m7g";
type = "gem"; type = "gem";
}; };
version = "3.3.2"; version = "3.4.1";
}; };
glib2 = { glib2 = {
dependencies = ["native-package-installer" "pkg-config"]; dependencies = ["native-package-installer" "pkg-config"];
@ -125,10 +125,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "13r1i8gkgxj0fjz7bdnqqrsvszl7dffbf85ghx2f8p7zrcbzlk3p"; sha256 = "18clyn0fp0h5alnkf9i2bqd6wvl78h468pdbzs1csqnba8vw4q1c";
type = "gem"; type = "gem";
}; };
version = "3.3.2"; version = "3.4.1";
}; };
gobject-introspection = { gobject-introspection = {
dependencies = ["glib2"]; dependencies = ["glib2"];
@ -136,10 +136,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "15njcm0yg4qpwkhyx6gf2nxvjl6fxm9jffan8zrl2xyh68yr4jf7"; sha256 = "1a3x8qiisbax3x0izj8l5w66r53ba5ma53ax2jhdbhbvaxx3d02n";
type = "gem"; type = "gem";
}; };
version = "3.3.2"; version = "3.4.1";
}; };
gtk2 = { gtk2 = {
dependencies = ["atk" "gdk_pixbuf2" "pango"]; dependencies = ["atk" "gdk_pixbuf2" "pango"];
@ -147,20 +147,20 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1a4lj6anmvr82cwrg8swzglz90jss995zr7bvsiwr876qqdwv7qs"; sha256 = "17az8g0n1yzz90kdbjg2hpabi04qccda7v6lin76bs637ivfg2md";
type = "gem"; type = "gem";
}; };
version = "3.3.2"; version = "3.4.1";
}; };
hashdiff = { hashdiff = {
groups = ["default" "test"]; groups = ["default" "test"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1qji49afni3c90zws617x514xi7ik70g2iwngj9skq68mjcq6y4x"; sha256 = "18jqpbvidrlnq3xf0hkdbs00607jgz35lry6gjw4bcxgh52am2mk";
type = "gem"; type = "gem";
}; };
version = "0.3.9"; version = "1.0.0";
}; };
httpclient = { httpclient = {
groups = ["plugin"]; groups = ["plugin"];
@ -172,16 +172,6 @@
}; };
version = "2.8.3"; version = "2.8.3";
}; };
idn-ruby = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr";
type = "gem";
};
version = "0.1.0";
};
instance_storage = { instance_storage = {
groups = ["default"]; groups = ["default"];
platforms = []; platforms = [];
@ -192,25 +182,26 @@
}; };
version = "1.0.0"; version = "1.0.0";
}; };
irb = { io-console = {
groups = ["default" "plugin"]; groups = ["default" "plugin"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "181d88hns00fpw8szg8hbchflwq69wp3y5zvd3dyqjzbq91v1dcr"; sha256 = "0srn91ly4cc5qvyj3r87sc7v8dnm52qj1hczzxmysib6ffparngd";
type = "gem"; type = "gem";
}; };
version = "1.0.0"; version = "0.5.3";
}; };
json_pure = { irb = {
groups = ["default"]; dependencies = ["reline"];
groups = ["default" "plugin"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1vllrpm2hpsy5w1r7000mna2mhd7yfrmd8hi713lk0n9mv27bmam"; sha256 = "1r1y8i46qd5izdszzzn5jxvwvq00m89rk0hm8cs8f21p7nlwmh5w";
type = "gem"; type = "gem";
}; };
version = "1.8.6"; version = "1.2.1";
}; };
locale = { locale = {
groups = ["default" "plugin"]; groups = ["default" "plugin"];
@ -227,20 +218,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0pq8fhqh8w25qcw9v3vzfb0i6jp0k3949ahxc3wrwz2791dpbgbh"; sha256 = "0i9wpzix3sjhf6d9zw60dm4371iq8kyz7ckh2qapan2vyaim6b55";
type = "gem"; type = "gem";
}; };
version = "0.16.0"; version = "0.16.2";
};
metaclass = {
groups = ["default" "test"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5";
type = "gem";
};
version = "0.0.4";
}; };
mini_portile2 = { mini_portile2 = {
groups = ["default" "plugin"]; groups = ["default" "plugin"];
@ -253,35 +234,34 @@
version = "2.4.0"; version = "2.4.0";
}; };
mocha = { mocha = {
dependencies = ["metaclass"];
groups = ["test"]; groups = ["test"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0id1x7g46fzy8f4jna20ys329ydaj3sad75qs9db2a6nd7f0zc2b"; sha256 = "06i2q5qjr9mvjgjc8w41pdf3qalw340y33wjvzc0rp4a1cbbb7pp";
type = "gem"; type = "gem";
}; };
version = "0.14.0"; version = "1.11.1";
}; };
moneta = { moneta = {
groups = ["plugin"]; groups = ["plugin"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1mbs9w3c13phza8008mwlx8s991fzigml7pncq94i1c2flz9vw95"; sha256 = "0q7fskfdc0h5dhl8aamg3ypybd6cyl4x0prh4803gj7hxr17jfm1";
type = "gem"; type = "gem";
}; };
version = "1.1.1"; version = "1.2.1";
}; };
native-package-installer = { native-package-installer = {
groups = ["default" "plugin"]; groups = ["default" "plugin"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "03qrzhk807f98bdwy6c37acksyb5fnairdz4jpl7y3fifh7k7yfn"; sha256 = "0piclgf6pw7hr10x57x0hn675djyna4sb3xc97yb9vh66wkx1fl0";
type = "gem"; type = "gem";
}; };
version = "1.0.7"; version = "1.0.9";
}; };
nokogiri = { nokogiri = {
dependencies = ["mini_portile2"]; dependencies = ["mini_portile2"];
@ -289,10 +269,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "02bjydih0j515szfv9mls195cvpyidh6ixm7dwbl3s2sbaxxk5s4"; sha256 = "0r0qpgf80h764k176yr63gqbs2z0xbsp8vlvs2a79d5r9vs83kln";
type = "gem"; type = "gem";
}; };
version = "1.10.3"; version = "1.10.7";
}; };
oauth = { oauth = {
groups = ["default"]; groups = ["default"];
@ -310,20 +290,20 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0lbhjsd6y42iw572xcynd6gcapczjki41h932s90rkh6022pbm9p"; sha256 = "1d0cn50qgpifrcv8qx72wi6l9xalw3ryngbfmm9xpg9vx5rl1qbp";
type = "gem"; type = "gem";
}; };
version = "3.3.2"; version = "3.4.1";
}; };
pkg-config = { pkg-config = {
groups = ["default" "plugin"]; groups = ["default" "plugin"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1s56ym0chq3fycl29vqabcalqdcf7y2f25pmihjwqgbmrmzdyvr1"; sha256 = "1cxdpr2wlz9b587avlq04a1da5fz1vdw8jvr6lx23mcq7mqh2xcx";
type = "gem"; type = "gem";
}; };
version = "1.3.7"; version = "1.4.0";
}; };
pluggaloid = { pluggaloid = {
dependencies = ["delayer" "instance_storage"]; dependencies = ["delayer" "instance_storage"];
@ -331,60 +311,61 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0fkm6y7aq132icmmv4k8mqw08fxqil8k52l8li642jyi79hvzrqh"; sha256 = "1gv0rjjdic8c41gfr3kyyphvf0fmv5rzcf6qd57zjdfcn6fvi3hh";
type = "gem"; type = "gem";
}; };
version = "1.1.2"; version = "1.2.0";
}; };
power_assert = { power_assert = {
groups = ["default" "test"]; groups = ["default" "test"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "072y5ixw59ad47hkfj6nl2i4zcyad8snfxfsyyrgjkiqnvqwvbvq"; sha256 = "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s";
type = "gem"; type = "gem";
}; };
version = "1.1.4"; version = "1.1.5";
}; };
public_suffix = { public_suffix = {
groups = ["default" "test"]; groups = ["default" "test"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "08q64b5br692dd3v0a9wq9q5dvycc6kmiqmjbdxkxbfizggsvx6l"; sha256 = "0xnfv2j2bqgdpg2yq9i2rxby0w2sc9h5iyjkpaas2xknwrgmhdb0";
type = "gem"; type = "gem";
}; };
version = "3.0.3"; version = "4.0.1";
}; };
rake = { rake = {
groups = ["test"]; groups = ["test"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0jcabbgnjc788chx31sihc5pgbqnlc1c75wakmqlbjdm8jns2m9b"; sha256 = "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9";
type = "gem"; type = "gem";
}; };
version = "10.5.0"; version = "13.0.1";
}; };
ruby-hmac = { reline = {
groups = ["default"]; dependencies = ["io-console"];
groups = ["default" "plugin"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "01zym41f8fqbmxfz8zv19627swi62ka3gp33bfbkc87v5k7mw954"; sha256 = "0908ijrngc3wkn5iny7d0kxkp74w6ixk2nwzzngplplfla1vkp8x";
type = "gem"; type = "gem";
}; };
version = "0.4.0"; version = "0.1.2";
}; };
ruby-prof = { ruby-prof = {
groups = ["test"]; groups = ["test"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "02z4lh1iv1d8751a1l6r4hfc9mp61gf80g4qc4l6gbync3j3hf2c"; sha256 = "18ga5f4h1fnwn0xh910kpnw4cg3lq3jqljd3h16bdw9pgc5ff7dn";
type = "gem"; type = "gem";
}; };
version = "0.17.0"; version = "1.1.0";
}; };
safe_yaml = { safe_yaml = {
groups = ["default" "test"]; groups = ["default" "test"];
@ -402,10 +383,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0hf47w70ajvwdchx0psq3dir26hh902x9sz0iwbxqj8z9w1kc6sd"; sha256 = "0mrkpb6wz0cs1740kaca240k4ymmkbvb2v5xaxsy6vynqw8n0g6z";
type = "gem"; type = "gem";
}; };
version = "3.3.2"; version = "3.3.4";
}; };
text = { text = {
groups = ["default" "plugin"]; groups = ["default" "plugin"];
@ -417,27 +398,6 @@
}; };
version = "1.3.1"; version = "1.3.1";
}; };
totoridipjp = {
groups = ["plugin"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "03ci9hbwc6xf4x0lkm6px4jgbmi37n8plsjhbf2ir5vka9f29lck";
type = "gem";
};
version = "0.1.0";
};
twitter-text = {
dependencies = ["idn-ruby" "unf"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1ibk4bl9hrq0phlg7zplkilsqgniji6yvid1a7k09rs0ai422jax";
type = "gem";
};
version = "3.0.0";
};
typed-array = { typed-array = {
groups = ["default"]; groups = ["default"];
platforms = []; platforms = [];
@ -448,46 +408,15 @@
}; };
version = "0.1.2"; version = "0.1.2";
}; };
unf = {
dependencies = ["unf_ext"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9";
type = "gem";
};
version = "0.1.4";
};
unf_ext = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1ll6w64ibh81qwvjx19h8nj7mngxgffg7aigjx11klvf5k2g4nxf";
type = "gem";
};
version = "0.0.7.6";
};
watch = {
groups = ["test"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "02g4g6ynnldyjjzrh19r584gj4z6ksff7h0ajz5jdwhpp5y7cghx";
type = "gem";
};
version = "0.1.0";
};
webmock = { webmock = {
dependencies = ["addressable" "crack" "hashdiff"]; dependencies = ["addressable" "crack" "hashdiff"];
groups = ["test"]; groups = ["test"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "03vlr6axajz6c7xmlk0w1kvkxc92f8y2zp27wq1z6yk916ry25n5"; sha256 = "19xvs7gdf8r75bmyb17w9g367qxzqnlrmbdda1y36cn1vrlnf2l8";
type = "gem"; type = "gem";
}; };
version = "1.24.6"; version = "3.7.6";
}; };
} }

View File

@ -1,3 +1,4 @@
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'gtk2', '3.3.2' gem 'gtk2', '3.4.1'

View File

@ -2,4 +2,3 @@ source 'https://rubygems.org'
gem 'nokogiri' gem 'nokogiri'
gem 'httpclient' gem 'httpclient'
gem 'totoridipjp'

View File

@ -2,5 +2,5 @@ source 'https://rubygems.org'
group :default do group :default do
gem 'gettext', '>= 3.2.9', '< 3.3' gem 'gettext', '>= 3.2.9', '< 3.3'
gem 'irb', '>= 1.0.0', '< 1.1' gem 'irb', '>= 1.2.0', '< 1.3'
end end

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
inherit src; inherit src;
nodejs = nodejs-10_x; nodejs = nodejs-10_x;
sha256 = "0qsgr8cq81yismal5sqr02skakqpynwwzk5s98dr5bg91y361fgy"; sha256 = "0slzw4791nl7v6sca9xlhzx16p91m92ln2agbkbdx4zpgasg4gnq";
}; };
patches = [ ./isDev.patch ]; patches = [ ./isDev.patch ];

View File

@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
homepage = http://epicsol.org; homepage = http://epicsol.org;
description = "A IRC client that offers a great ircII interface"; description = "A IRC client that offers a great ircII interface";
license = licenses.bsd3; license = licenses.bsd3;
maintainers = [ maintainers.ndowens ]; maintainers = [];
}; };
} }

View File

@ -5,11 +5,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "gnunet"; pname = "gnunet";
version = "0.11.8"; version = "0.12.0";
src = fetchurl { src = fetchurl {
url = "mirror://gnu/gnunet/${pname}-${version}.tar.gz"; url = "mirror://gnu/gnunet/${pname}-${version}.tar.gz";
sha256 = "1zkmcq75sfr3iyg8rgxp9dbl7fwsvc1a71rc0vgisghcbrx1n7yj"; sha256 = "1bz0sbhbsivi1bcabk3vpxqnh4vgp86vrmiwkyb5fiqfjviar111";
}; };
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -10,7 +10,7 @@ assert withQt -> qt5 != null;
with stdenv.lib; with stdenv.lib;
let let
version = "3.0.5"; version = "3.2.0";
variant = if withQt then "qt" else "cli"; variant = if withQt then "qt" else "cli";
in stdenv.mkDerivation { in stdenv.mkDerivation {
@ -20,7 +20,7 @@ in stdenv.mkDerivation {
src = fetchurl { src = fetchurl {
url = "https://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.xz"; url = "https://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.xz";
sha256 = "087qv7nd7zlbckvcs37fkkg7v0mw0hjd5yfbghqym764fpjgqlf5"; sha256 = "0v5nn7i2nbqr59jsw8cs2052hr7xd96x1sa3480g8ks5kahk7zac";
}; };
cmakeFlags = [ cmakeFlags = [

View File

@ -10,7 +10,7 @@
# Needed for running tests: # Needed for running tests:
, qtbase, xvfb_run , qtbase, xvfb_run
, python3Packages , python2, python3Packages
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -28,8 +28,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
nativeBuildInputs = [ nativeBuildInputs = [
doxygen extra-cmake-modules graphviz kdoctools python3Packages.wrapPython doxygen extra-cmake-modules graphviz kdoctools python2
wrapQtAppsHook python3Packages.wrapPython wrapQtAppsHook
]; ];
buildInputs = [ buildInputs = [

View File

@ -12,11 +12,11 @@
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "pympress"; pname = "pympress";
version = "1.4.0"; version = "1.5.1";
src = python3Packages.fetchPypi { src = python3Packages.fetchPypi {
inherit pname version; inherit pname version;
sha256 = "101wj6m931bj0ah6niw79i8ywb5zlb2783g7n7dmkhw6ay3jj4vq"; sha256 = "173d9scf2z29qg279jf33zcl7sgc3wp662fgpm943bn9667q18wf";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -20,13 +20,13 @@ with stdenv.lib;
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "tryton"; pname = "tryton";
version = "5.4.0"; version = "5.4.1";
disabled = !python3Packages.isPy3k; disabled = !python3Packages.isPy3k;
src = python3Packages.fetchPypi { src = python3Packages.fetchPypi {
inherit pname version; inherit pname version;
sha256 = "0wbq8y8z0n6c5b3h5ynlawn3z79a3hkb1fkmblz4pwnj0jfnbswd"; sha256 = "0lk47qv944yc2b1ifhinp07af839r408w83rj8zzy8b43cwkpsxd";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -40,7 +40,7 @@ stdenv.mkDerivation {
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "SAT/PseudoBoolean/MaxSat/ASP solver using glucose"; description = "SAT/PseudoBoolean/MaxSat/ASP solver using glucose";
maintainers = with maintainers; [ gebner ma27 ]; maintainers = with maintainers; [ gebner ];
platforms = platforms.unix; platforms = platforms.unix;
license = licenses.asl20; license = licenses.asl20;
homepage = https://alviano.net/software/maxino/; homepage = https://alviano.net/software/maxino/;

View File

@ -118,6 +118,13 @@ stdenv.mkDerivation rec {
url = "https://git.sagemath.org/sage.git/patch?id=fcc11d6effa39f375bc5f4ea5831fb7a2f2767da"; url = "https://git.sagemath.org/sage.git/patch?id=fcc11d6effa39f375bc5f4ea5831fb7a2f2767da";
sha256 = "0hnmc8ld3bblks0hcjvjjaydkgwdr1cs3dbl2ys4gfq964pjgqwc"; sha256 = "0hnmc8ld3bblks0hcjvjjaydkgwdr1cs3dbl2ys4gfq964pjgqwc";
}) })
# https://trac.sagemath.org/ticket/28911
(fetchpatch {
name = "sympy-1.5.patch";
url = "https://git.sagemath.org/sage.git/patch/?h=c6d0308db15efd611211d26cfcbefbd180fc0831";
sha256 = "0nwai2jr22h49km4hx3kwafs3mzsc5kwsv7mqwjf6ibwfx2bbgyq";
})
]; ];
patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches; patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;

View File

@ -1,5 +1,6 @@
{ stdenv, fetchurl, cmake, gl2ps, gsl, libX11, libXpm, libXft, libXext { stdenv, fetchurl, makeWrapper, cmake, gl2ps, gsl, libX11, libXpm, libXft
, libGLU, libGL, libxml2, lz4, lzma, pcre, pkgconfig, python, xxHash, zlib , libXext, libGLU, libGL, libxml2, lz4, lzma, pcre, pkgconfig, python, xxHash
, zlib
, Cocoa, OpenGL, noSplash ? false }: , Cocoa, OpenGL, noSplash ? false }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -11,7 +12,7 @@ stdenv.mkDerivation rec {
sha256 = "196ghma6g5a7sqz52wyjkgvmh4hj4vqwppm0zwdypy33hgy8anii"; sha256 = "196ghma6g5a7sqz52wyjkgvmh4hj4vqwppm0zwdypy33hgy8anii";
}; };
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ makeWrapper cmake pkgconfig ];
buildInputs = [ gl2ps pcre python zlib libxml2 lz4 lzma gsl xxHash ] buildInputs = [ gl2ps pcre python zlib libxml2 lz4 lzma gsl xxHash ]
++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ]
++ stdenv.lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ] ++ stdenv.lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ]
@ -73,6 +74,13 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
postInstall = ''
for prog in rootbrowse rootcp rooteventselector rootls rootmkdir rootmv rootprint rootrm rootslimtree; do
wrapProgram "$out/bin/$prog" \
--prefix PYTHONPATH : "$out/lib"
done
'';
setupHook = ./setup-hook.sh; setupHook = ./setup-hook.sh;
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -3,11 +3,11 @@
buildPythonApplication rec { buildPythonApplication rec {
pname = "MAVProxy"; pname = "MAVProxy";
version = "1.8.17"; version = "1.8.18";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "193hjilsmbljbgj7v6icy3b4hzm14l0z6v05v7ycx6larij5xj2r"; sha256 = "1fi4m3591wws5cq43q8aljf91mzs6i9yhn9rimhpfrskbyf9knvm";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [

View File

@ -18,6 +18,6 @@ rustPlatform.buildRustPackage rec {
description = "A syntax-highlighting pager for git"; description = "A syntax-highlighting pager for git";
changelog = "https://github.com/dandavison/delta/releases/tag/${version}"; changelog = "https://github.com/dandavison/delta/releases/tag/${version}";
license = licenses.mit; license = licenses.mit;
maintainers = [ maintainers.marsam ]; maintainers = with maintainers; [ marsam ma27 ];
}; };
} }

View File

@ -1,21 +1,19 @@
{ stdenv, fetchurl, python2Packages, makeWrapper, unzip { stdenv, fetchurl, python3Packages, makeWrapper, unzip
, guiSupport ? false, tk ? null , guiSupport ? false, tk ? null
, ApplicationServices , ApplicationServices
, mercurialSrc ? fetchurl rec {
meta.name = "mercurial-${meta.version}";
meta.version = "4.9.1";
url = "https://mercurial-scm.org/release/${meta.name}.tar.gz";
sha256 = "0iybbkd9add066729zg01kwz5hhc1s6lhp9rrnsmzq6ihyxj3p8v";
}
}: }:
let let
inherit (python2Packages) docutils hg-git dulwich python; inherit (python3Packages) docutils dulwich python;
in python2Packages.buildPythonApplication { in python3Packages.buildPythonApplication rec {
pname = "mercurial";
version = "5.2.1";
inherit (mercurialSrc.meta) name version; src = fetchurl {
src = mercurialSrc; url = "https://mercurial-scm.org/release/mercurial-${version}.tar.gz";
sha256 = "1pxkd37b0a1mi2zakk1hi122lgz1ffy2fxdnbs8acwlqpw55bc8q";
};
format = "other"; format = "other";
@ -24,41 +22,39 @@ in python2Packages.buildPythonApplication {
buildInputs = [ makeWrapper docutils unzip ] buildInputs = [ makeWrapper docutils unzip ]
++ stdenv.lib.optionals stdenv.isDarwin [ ApplicationServices ]; ++ stdenv.lib.optionals stdenv.isDarwin [ ApplicationServices ];
propagatedBuildInputs = [ hg-git dulwich ]; propagatedBuildInputs = [ dulwich ];
makeFlags = [ "PREFIX=$(out)" ]; makeFlags = [ "PREFIX=$(out)" ];
postInstall = (stdenv.lib.optionalString guiSupport postInstall = (stdenv.lib.optionalString guiSupport ''
'' mkdir -p $out/etc/mercurial
mkdir -p $out/etc/mercurial cp contrib/hgk $out/bin
cp contrib/hgk $out/bin cat >> $out/etc/mercurial/hgrc << EOF
cat >> $out/etc/mercurial/hgrc << EOF [extensions]
[extensions] hgk=$out/lib/${python.libPrefix}/site-packages/hgext/hgk.py
hgk=$out/lib/${python.libPrefix}/site-packages/hgext/hgk.py EOF
EOF # setting HG so that hgk can be run itself as well (not only hg view)
# setting HG so that hgk can be run itself as well (not only hg view) WRAP_TK=" --set TK_LIBRARY ${tk}/lib/${tk.libPrefix}
WRAP_TK=" --set TK_LIBRARY ${tk}/lib/${tk.libPrefix} --set HG $out/bin/hg
--set HG $out/bin/hg --prefix PATH : ${tk}/bin "
--prefix PATH : ${tk}/bin " '') + ''
'') + for i in $(cd $out/bin && ls); do
'' wrapProgram $out/bin/$i \
for i in $(cd $out/bin && ls); do $WRAP_TK
wrapProgram $out/bin/$i \ done
$WRAP_TK
done
# copy hgweb.cgi to allow use in apache # copy hgweb.cgi to allow use in apache
mkdir -p $out/share/cgi-bin mkdir -p $out/share/cgi-bin
cp -v hgweb.cgi contrib/hgweb.wsgi $out/share/cgi-bin cp -v hgweb.cgi contrib/hgweb.wsgi $out/share/cgi-bin
chmod u+x $out/share/cgi-bin/hgweb.cgi chmod u+x $out/share/cgi-bin/hgweb.cgi
# install bash/zsh completions # install bash/zsh completions
install -v -m644 -D contrib/bash_completion $out/share/bash-completion/completions/_hg install -v -m644 -D contrib/bash_completion $out/share/bash-completion/completions/_hg
install -v -m644 -D contrib/zsh_completion $out/share/zsh/site-functions/_hg install -v -m644 -D contrib/zsh_completion $out/share/zsh/site-functions/_hg
''; '';
meta = { meta = {
inherit (mercurialSrc.meta) version; inherit version;
description = "A fast, lightweight SCM system for very large distributed projects"; description = "A fast, lightweight SCM system for very large distributed projects";
homepage = https://www.mercurial-scm.org; homepage = https://www.mercurial-scm.org;
downloadPage = https://www.mercurial-scm.org/release/; downloadPage = https://www.mercurial-scm.org/release/;

View File

@ -1,43 +1,38 @@
{ lib, fetchurl, python2Packages { lib, fetchurl, python3Packages
, mercurial , mercurial, qt5
}@args: }@args:
let let
tortoisehgSrc = fetchurl rec { tortoisehgSrc = fetchurl rec {
meta.name = "tortoisehg-${meta.version}"; meta.name = "tortoisehg-${meta.version}";
meta.version = "5.0.2"; meta.version = "5.2.1";
url = "https://bitbucket.org/tortoisehg/targz/downloads/${meta.name}.tar.gz"; url = "https://bitbucket.org/tortoisehg/thg/get/14221e991a5b623e0072d3bd340b759dbe9072ca.tar.gz";
sha256 = "1fkawx4ymaacah2wpv2w7rxmv1mx08mg4x4r4fxh41jz1njjb8sz"; sha256 = "01rpzf5z99izcdda1ps9bhqvhw6qghagd8c1y7x19rv223zi05dv";
}; };
mercurial = tortoiseMercurial = mercurial.overridePythonAttrs (old: rec {
if args.mercurial.meta.version == tortoisehgSrc.meta.version inherit (tortoisehgSrc.meta) version;
then args.mercurial src = fetchurl {
else args.mercurial.override { url = "https://mercurial-scm.org/release/mercurial-${version}.tar.gz";
mercurialSrc = fetchurl rec { sha256 = "1pxkd37b0a1mi2zakk1hi122lgz1ffy2fxdnbs8acwlqpw55bc8q";
meta.name = "mercurial-${meta.version}"; };
meta.version = tortoisehgSrc.meta.version; });
url = "https://mercurial-scm.org/release/${meta.name}.tar.gz";
sha256 = "1y60hfc8gh4ha9sw650qs7hndqmvbn0qxpmqwpn4q18z5xwm1f19";
};
};
in python2Packages.buildPythonApplication {
in python3Packages.buildPythonApplication {
inherit (tortoisehgSrc.meta) name version; inherit (tortoisehgSrc.meta) name version;
src = tortoisehgSrc; src = tortoisehgSrc;
pythonPath = with python2Packages; [ pyqt4 mercurial qscintilla iniparse ]; propagatedBuildInputs = with python3Packages; [
tortoiseMercurial qscintilla-qt5 iniparse
propagatedBuildInputs = with python2Packages; [ qscintilla iniparse ]; ];
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
doCheck = false; # tests fail with "thg: cannot connect to X server" doCheck = false; # tests fail with "thg: cannot connect to X server"
dontStrip = true; postInstall = ''
buildPhase = "";
installPhase = ''
${python2Packages.python.executable} setup.py install --prefix=$out
mkdir -p $out/share/doc/tortoisehg mkdir -p $out/share/doc/tortoisehg
cp COPYING.txt $out/share/doc/tortoisehg/Copying.txt.gz cp COPYING.txt $out/share/doc/tortoisehg/Copying.txt
ln -s $out/bin/thg $out/bin/tortoisehg #convenient alias # convenient alias
ln -s $out/bin/thg $out/bin/tortoisehg
wrapQtApp $out/bin/thg
''; '';
checkPhase = '' checkPhase = ''
@ -45,7 +40,7 @@ in python2Packages.buildPythonApplication {
$out/bin/thg version $out/bin/thg version
''; '';
passthru.mercurial = mercurial; passthru.mercurial = tortoiseMercurial;
meta = { meta = {
description = "Qt based graphical tool for working with Mercurial"; description = "Qt based graphical tool for working with Mercurial";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, git, gnupg }: { stdenv, fetchFromGitHub, git, gnupg }:
let version = "2.0.1"; in let version = "2.3.0"; in
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "yadm"; pname = "yadm";
inherit version; inherit version;
@ -11,7 +11,7 @@ stdenv.mkDerivation {
owner = "TheLocehiliosan"; owner = "TheLocehiliosan";
repo = "yadm"; repo = "yadm";
rev = version; rev = version;
sha256 = "0knz2p0xyid65z6gdmjqfcqljqilxhqi02v4n6n4akl2i12kk193"; sha256 = "1by21dh48qbi33wlyyvdwz7ac1lxrblzcr5v7hlnc4cbcgvgs1a0";
}; };
dontConfigure = true; dontConfigure = true;

View File

@ -34,6 +34,6 @@ stdenv.mkDerivation rec {
homepage = https://flavio.tordini.org/minitube; homepage = https://flavio.tordini.org/minitube;
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ ma27 ]; maintainers = with maintainers; [ ];
}; };
} }

View File

@ -52,7 +52,7 @@
, zimgSupport ? true, zimg ? null , zimgSupport ? true, zimg ? null
, archiveSupport ? false, libarchive ? null , archiveSupport ? false, libarchive ? null
, jackaudioSupport ? false, libjack2 ? null , jackaudioSupport ? false, libjack2 ? null
, openalSupport ? true, openalSoft ? null , openalSupport ? true, openalSoft ? null
, vapoursynthSupport ? false, vapoursynth ? null , vapoursynthSupport ? false, vapoursynth ? null
}: }:
@ -105,13 +105,13 @@ let
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "mpv"; pname = "mpv";
version = "0.30.0"; version = "0.31.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mpv-player"; owner = "mpv-player";
repo = "mpv"; repo = "mpv";
rev = "v${version}"; rev = "v${version}";
sha256 = "17mxjgcfljlv6h0ik3332xsqbs0ybvk6dkwflyl0cjh15vl1iv6f"; sha256 = "138m09l4wi6ifbi15z76j578plmxkclhlzfryasfcdp8hswhs59r";
}; };
postPatch = '' postPatch = ''
@ -197,7 +197,6 @@ in stdenv.mkDerivation rec {
# Ensure youtube-dl is available in $PATH for mpv # Ensure youtube-dl is available in $PATH for mpv
wrapperFlags = wrapperFlags =
''--prefix PATH : "${luaEnv}/bin" \'' ''--prefix PATH : "${luaEnv}/bin" \''
+ optionalString youtubeSupport '' + optionalString youtubeSupport ''
--prefix PATH : "${youtube-dl}/bin" \ --prefix PATH : "${youtube-dl}/bin" \
@ -235,7 +234,7 @@ in stdenv.mkDerivation rec {
description = "A media player that supports many video formats (MPlayer and mplayer2 fork)"; description = "A media player that supports many video formats (MPlayer and mplayer2 fork)";
homepage = https://mpv.io; homepage = https://mpv.io;
license = licenses.gpl2Plus; license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres fpletz globin ivan ]; maintainers = with maintainers; [ AndersonTorres fpletz globin ivan ma27 tadeokondrak ];
platforms = platforms.darwin ++ platforms.linux; platforms = platforms.darwin ++ platforms.linux;
longDescription = '' longDescription = ''

View File

@ -2,11 +2,11 @@
, lirc, shared-mime-info, libjpeg }: , lirc, shared-mime-info, libjpeg }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "xine-ui-0.99.10"; name = "xine-ui-0.99.12";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/xine/${name}.tar.xz"; url = "mirror://sourceforge/xine/${name}.tar.xz";
sha256 = "0i3jzhiipfs5p1jbxviwh42zcfzag6iqc6yycaan0vrqm90an86a"; sha256 = "10zmmss3hm8gjjyra20qhdc0lb1m6sym2nb2w62bmfk8isfw9gsl";
}; };
nativeBuildInputs = [ pkgconfig shared-mime-info ]; nativeBuildInputs = [ pkgconfig shared-mime-info ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, pkgconfig { stdenv, fetchFromGitHub, pkgconfig, installShellFiles
, buildGoPackage, gpgme, lvm2, btrfs-progs, libseccomp, systemd , buildGoPackage, gpgme, lvm2, btrfs-progs, libseccomp, systemd
, go-md2man , go-md2man
}: }:
@ -18,7 +18,7 @@ buildGoPackage rec {
outputs = [ "bin" "out" "man" ]; outputs = [ "bin" "out" "man" ];
nativeBuildInputs = [ pkgconfig go-md2man ]; nativeBuildInputs = [ pkgconfig go-md2man installShellFiles ];
buildInputs = [ btrfs-progs libseccomp gpgme lvm2 systemd ]; buildInputs = [ btrfs-progs libseccomp gpgme lvm2 systemd ];
@ -30,6 +30,8 @@ buildGoPackage rec {
installPhase = '' installPhase = ''
install -Dm555 bin/podman $bin/bin/podman install -Dm555 bin/podman $bin/bin/podman
installShellCompletion --bash completions/bash/podman
installShellCompletion --zsh completions/zsh/_podman
MANDIR=$man/share/man make install.man MANDIR=$man/share/man make install.man
''; '';

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "remotebox"; pname = "remotebox";
version = "2.6"; version = "2.7";
src = fetchurl { src = fetchurl {
url = "http://remotebox.knobgoblin.org.uk/downloads/RemoteBox-${version}.tar.bz2"; url = "http://remotebox.knobgoblin.org.uk/downloads/RemoteBox-${version}.tar.bz2";
sha256 = "1bbdnf13vp35ddfmk4pn167vfxgmdw0fd8bqg51wd8dd4cj8y3wp"; sha256 = "0csf6gd7pqq4abia4z0zpzlq865ri1z0821kjy7p3iawqlfn75pb";
}; };
buildInputs = with perlPackages; [ perl Glib Gtk2 Pango SOAPLite ]; buildInputs = with perlPackages; [ perl Glib Gtk2 Pango SOAPLite ];

View File

@ -1,12 +1,12 @@
{ stdenv, fetchFromGitHub, makeWrapper, nx-libs, xorg, getopt, gnugrep, gawk, ps, mount, iproute }: { stdenv, fetchFromGitHub, makeWrapper, nx-libs, xorg, getopt, gnugrep, gawk, ps, mount, iproute }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "x11docker"; pname = "x11docker";
version = "6.4.0"; version = "6.5.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mviereck"; owner = "mviereck";
repo = "x11docker"; repo = "x11docker";
rev = "v${version}"; rev = "v${version}";
sha256 = "0s8gk2kqxkfwx1x44g19ckm7rqgrcax59y8brgmigajqizik7sql"; sha256 = "1lh45cxzpdwvhahlcayzqwq1q5hra25mszs13j0dswklcjvjqw8b";
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];

View File

@ -86,7 +86,7 @@ stdenv.mkDerivation rec {
description = "Highly configurable, dynamic window manager for X"; description = "Highly configurable, dynamic window manager for X";
homepage = https://awesomewm.org/; homepage = https://awesomewm.org/;
license = licenses.gpl2Plus; license = licenses.gpl2Plus;
maintainers = with maintainers; [ lovek323 rasendubi ndowens ]; maintainers = with maintainers; [ lovek323 rasendubi ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

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