mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
Merge master into staging-next
This commit is contained in:
commit
18fcc337af
9
COPYING
9
COPYING
@ -18,12 +18,3 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
======================================================================
|
||||
|
||||
Note: the license above does not apply to the packages built by the
|
||||
Nix Packages collection, merely to the package descriptions (i.e., Nix
|
||||
expressions, build scripts, etc.). It also might not apply to patches
|
||||
included in Nixpkgs, which may be derivative works of the packages to
|
||||
which they apply. The aforementioned artifacts are all covered by the
|
||||
licenses of the respective packages.
|
||||
|
@ -39,3 +39,9 @@ Communication:
|
||||
|
||||
* [Discourse Forum](https://discourse.nixos.org/)
|
||||
* [IRC - #nixos on freenode.net](irc://irc.freenode.net/#nixos)
|
||||
|
||||
Note: MIT license does not apply to the packages built by Nixpkgs, merely to
|
||||
the package descriptions (Nix expressions, build scripts, and so on). It also
|
||||
might not apply to patches included in Nixpkgs, which may be derivative works
|
||||
of the packages to which they apply. The aforementioned artifacts are all
|
||||
covered by the licenses of the respective packages.
|
||||
|
@ -413,7 +413,8 @@ packageOverrides = pkgs: {
|
||||
in your <filename>/etc/nixos/configuration.nix</filename>. You'll also need
|
||||
<programlisting>hardware.pulseaudio.support32Bit = true;</programlisting>
|
||||
if you are using PulseAudio - this will enable 32bit ALSA apps integration.
|
||||
To use the Steam controller or other Steam supported controllers such as the DualShock 4 or Nintendo Switch Pro, you need to add
|
||||
To use the Steam controller or other Steam supported controllers such as
|
||||
the DualShock 4 or Nintendo Switch Pro, you need to add
|
||||
<programlisting>hardware.steam-hardware.enable = true;</programlisting>
|
||||
to your configuration.
|
||||
</para>
|
||||
|
@ -143,6 +143,7 @@ rec {
|
||||
}@args: v: with builtins;
|
||||
let isPath = v: typeOf v == "path";
|
||||
in if isInt v then toString v
|
||||
else if isFloat v then "~${toString v}"
|
||||
else if isString v then ''"${libStr.escape [''"''] v}"''
|
||||
else if true == v then "true"
|
||||
else if false == v then "false"
|
||||
|
@ -387,6 +387,14 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
||||
fullName = "ISC License";
|
||||
};
|
||||
|
||||
# Proprietary binaries; free to redistribute without modification.
|
||||
issl = {
|
||||
fullName = "Intel Simplified Software License";
|
||||
url = https://software.intel.com/en-us/license/intel-simplified-software-license;
|
||||
free = false;
|
||||
};
|
||||
|
||||
|
||||
lgpl2 = spdx {
|
||||
spdxId = "LGPL-2.0";
|
||||
fullName = "GNU Library General Public License v2 only";
|
||||
@ -500,6 +508,12 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
||||
fullName = "Non-Profit Open Software License 3.0";
|
||||
};
|
||||
|
||||
ocamlpro_nc = {
|
||||
fullName = "OCamlPro Non Commercial license version 1";
|
||||
url = "https://alt-ergo.ocamlpro.com/http/alt-ergo-2.2.0/OCamlPro-Non-Commercial-License.pdf";
|
||||
free = false;
|
||||
};
|
||||
|
||||
ofl = spdx {
|
||||
spdxId = "OFL-1.1";
|
||||
fullName = "SIL Open Font License 1.1";
|
||||
|
@ -369,6 +369,7 @@ runTests {
|
||||
testToPretty = {
|
||||
expr = mapAttrs (const (generators.toPretty {})) rec {
|
||||
int = 42;
|
||||
float = 0.1337;
|
||||
bool = true;
|
||||
string = ''fno"rd'';
|
||||
path = /. + "/foo";
|
||||
@ -381,6 +382,7 @@ runTests {
|
||||
};
|
||||
expected = rec {
|
||||
int = "42";
|
||||
float = "~0.133700";
|
||||
bool = "true";
|
||||
string = ''"fno\"rd"'';
|
||||
path = "/foo";
|
||||
|
@ -986,6 +986,11 @@
|
||||
github = "deepfire";
|
||||
name = "Kosyrev Serge";
|
||||
};
|
||||
delroth = {
|
||||
email = "delroth@gmail.com";
|
||||
github = "delroth";
|
||||
name = "Pierre Bourdon";
|
||||
};
|
||||
deltaevo = {
|
||||
email = "deltaduartedavid@gmail.com";
|
||||
github = "DeltaEvo";
|
||||
@ -1372,6 +1377,11 @@
|
||||
github = "expipiplus1";
|
||||
name = "Joe Hermaszewski";
|
||||
};
|
||||
f--t = {
|
||||
email = "git@f-t.me";
|
||||
github = "f--t";
|
||||
name = "f--t";
|
||||
};
|
||||
f-breidenstein = {
|
||||
email = "mail@felixbreidenstein.de";
|
||||
github = "f-breidenstein";
|
||||
@ -1882,6 +1892,11 @@
|
||||
github = "jdagilliland";
|
||||
name = "Jason Gilliland";
|
||||
};
|
||||
jdehaas = {
|
||||
email = "qqlq@nullptr.club";
|
||||
github = "jeroendehaas";
|
||||
name = "Jeroen de Haas";
|
||||
};
|
||||
jefdaj = {
|
||||
email = "jefdaj@gmail.com";
|
||||
github = "jefdaj";
|
||||
@ -4649,7 +4664,7 @@
|
||||
name = "Dmitry V.";
|
||||
};
|
||||
yegortimoshenko = {
|
||||
email = "yegortimoshenko@gmail.com";
|
||||
email = "yegortimoshenko@riseup.net";
|
||||
github = "yegortimoshenko";
|
||||
name = "Yegor Timoshenko";
|
||||
};
|
||||
|
@ -52,6 +52,7 @@ $ ping -c1 10.233.4.2
|
||||
networking.networkmanager.unmanaged = [ "interface-name:ve-*" ];
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You may need to restart your system for the changes to take effect.
|
||||
</para>
|
||||
|
@ -475,6 +475,48 @@ $ nix-instantiate -E '(import <nixpkgsunstable> {}).gitFull'
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Some licenses that were incorrectly not marked as unfree now are. This is
|
||||
the case for:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
cc-by-nc-sa-20: Creative Commons Attribution Non Commercial Share Alike
|
||||
2.0
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
cc-by-nc-sa-25: Creative Commons Attribution Non Commercial Share Alike
|
||||
2.5
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
cc-by-nc-sa-30: Creative Commons Attribution Non Commercial Share Alike
|
||||
3.0
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
cc-by-nc-sa-40: Creative Commons Attribution Non Commercial Share Alike
|
||||
4.0
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
cc-by-nd-30: Creative Commons Attribution-No Derivative Works v3.00
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
msrla: Microsoft Research License Agreement
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The deprecated <varname>services.cassandra</varname> module has seen a
|
||||
|
@ -106,12 +106,12 @@
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <literal>light</literal> module no longer uses setuid binaries, but
|
||||
udev rules. As a consequence users of that module have to belong to the
|
||||
<literal>video</literal> group in order to use the executable
|
||||
(i.e. <literal>users.users.yourusername.extraGroups = ["video"];</literal>).
|
||||
</para>
|
||||
<para>
|
||||
The <literal>light</literal> module no longer uses setuid binaries, but
|
||||
udev rules. As a consequence users of that module have to belong to the
|
||||
<literal>video</literal> group in order to use the executable (i.e.
|
||||
<literal>users.users.yourusername.extraGroups = ["video"];</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
@ -122,6 +122,14 @@
|
||||
the Python 2 or 3 version of the package.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Options
|
||||
<literal>services.znc.confOptions.networks.<replaceable>name</replaceable>.userName</literal> and
|
||||
<literal>services.znc.confOptions.networks.<replaceable>name</replaceable>.modulePackages</literal>
|
||||
were removed. They were never used for anything and can therefore safely be removed.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
@ -134,7 +142,11 @@
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para />
|
||||
<para>
|
||||
The <option>services.matomo</option> module gained the option
|
||||
<option>services.matomo.package</option> which determines the used
|
||||
Matomo version.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
@ -108,14 +108,14 @@ in
|
||||
};
|
||||
|
||||
environment.shellAliases = mkOption {
|
||||
default = {};
|
||||
example = { ll = "ls -l"; };
|
||||
example = { l = null; ll = "ls -l"; };
|
||||
description = ''
|
||||
An attribute set that maps aliases (the top level attribute names in
|
||||
this option) to command strings or directly to build outputs. The
|
||||
aliases are added to all users' shells.
|
||||
Aliases mapped to <code>null</code> are ignored.
|
||||
'';
|
||||
type = types.attrs; # types.attrsOf types.stringOrPath;
|
||||
type = with types; attrsOf (nullOr (either str path));
|
||||
};
|
||||
|
||||
environment.binsh = mkOption {
|
||||
@ -157,6 +157,12 @@ in
|
||||
# terminal instead of logging out of X11).
|
||||
environment.variables = config.environment.sessionVariables;
|
||||
|
||||
environment.shellAliases = mapAttrs (name: mkDefault) {
|
||||
ls = "ls --color=tty";
|
||||
ll = "ls -l";
|
||||
l = "ls -alh";
|
||||
};
|
||||
|
||||
environment.etc."shells".text =
|
||||
''
|
||||
${concatStringsSep "\n" (map utils.toShellPath cfg.shells)}
|
||||
|
@ -13,6 +13,7 @@ extraBuildFlags=()
|
||||
|
||||
mountPoint=/mnt
|
||||
channelPath=
|
||||
system=
|
||||
|
||||
while [ "$#" -gt 0 ]; do
|
||||
i="$1"; shift 1
|
||||
|
@ -149,6 +149,7 @@
|
||||
./security/duosec.nix
|
||||
./security/hidepid.nix
|
||||
./security/lock-kernel-modules.nix
|
||||
./security/misc.nix
|
||||
./security/oath.nix
|
||||
./security/pam.nix
|
||||
./security/pam_usb.nix
|
||||
@ -634,7 +635,7 @@
|
||||
./services/networking/zerobin.nix
|
||||
./services/networking/zeronet.nix
|
||||
./services/networking/zerotierone.nix
|
||||
./services/networking/znc.nix
|
||||
./services/networking/znc/default.nix
|
||||
./services/printing/cupsd.nix
|
||||
./services/scheduling/atd.nix
|
||||
./services/scheduling/chronos.nix
|
||||
|
@ -6,12 +6,18 @@
|
||||
with lib;
|
||||
|
||||
{
|
||||
meta = {
|
||||
maintainers = [ maintainers.joachifm ];
|
||||
};
|
||||
|
||||
boot.kernelPackages = mkDefault pkgs.linuxPackages_hardened;
|
||||
|
||||
security.hideProcessInformation = mkDefault true;
|
||||
|
||||
security.lockKernelModules = mkDefault true;
|
||||
|
||||
security.allowUserNamespaces = mkDefault false;
|
||||
|
||||
security.apparmor.enable = mkDefault true;
|
||||
|
||||
boot.kernelParams = [
|
||||
@ -55,18 +61,6 @@ with lib;
|
||||
# ... or at least apply some hardening to it
|
||||
boot.kernel.sysctl."net.core.bpf_jit_harden" = mkDefault true;
|
||||
|
||||
# A recurring problem with user namespaces is that there are
|
||||
# still code paths where the kernel's permission checking logic
|
||||
# fails to account for namespacing, instead permitting a
|
||||
# namespaced process to act outside the namespace with the
|
||||
# same privileges as it would have inside it. This is particularly
|
||||
# bad in the common case of running as root within the namespace.
|
||||
#
|
||||
# Setting the number of allowed user namespaces to 0 effectively disables
|
||||
# the feature at runtime. Attempting to create a user namespace
|
||||
# with unshare will then fail with "no space left on device".
|
||||
boot.kernel.sysctl."user.max_user_namespaces" = mkDefault 0;
|
||||
|
||||
# Raise ASLR entropy for 64bit & 32bit, respectively.
|
||||
#
|
||||
# Note: mmap_rnd_compat_bits may not exist on 64bit.
|
||||
|
@ -33,7 +33,8 @@ let
|
||||
'';
|
||||
|
||||
bashAliases = concatStringsSep "\n" (
|
||||
mapAttrsFlatten (k: v: "alias ${k}=${escapeShellArg v}") cfg.shellAliases
|
||||
mapAttrsFlatten (k: v: "alias ${k}=${escapeShellArg v}")
|
||||
(filterAttrs (k: v: !isNull v) cfg.shellAliases)
|
||||
);
|
||||
|
||||
in
|
||||
@ -59,12 +60,12 @@ in
|
||||
*/
|
||||
|
||||
shellAliases = mkOption {
|
||||
default = config.environment.shellAliases;
|
||||
default = {};
|
||||
description = ''
|
||||
Set of aliases for bash shell. See <option>environment.shellAliases</option>
|
||||
for an option format description.
|
||||
Set of aliases for bash shell, which overrides <option>environment.shellAliases</option>.
|
||||
See <option>environment.shellAliases</option> for an option format description.
|
||||
'';
|
||||
type = types.attrs; # types.attrsOf types.stringOrPath;
|
||||
type = with types; attrsOf (nullOr (either str path));
|
||||
};
|
||||
|
||||
shellInit = mkOption {
|
||||
@ -125,6 +126,8 @@ in
|
||||
|
||||
programs.bash = {
|
||||
|
||||
shellAliases = mapAttrs (name: mkDefault) cfge.shellAliases;
|
||||
|
||||
shellInit = ''
|
||||
if [ -z "$__NIXOS_SET_ENVIRONMENT_DONE" ]; then
|
||||
. ${config.system.build.setEnvironment}
|
||||
|
@ -9,7 +9,8 @@ let
|
||||
cfg = config.programs.fish;
|
||||
|
||||
fishAliases = concatStringsSep "\n" (
|
||||
mapAttrsFlatten (k: v: "alias ${k} ${escapeShellArg v}") cfg.shellAliases
|
||||
mapAttrsFlatten (k: v: "alias ${k} ${escapeShellArg v}")
|
||||
(filterAttrs (k: v: !isNull v) cfg.shellAliases)
|
||||
);
|
||||
|
||||
in
|
||||
@ -53,12 +54,12 @@ in
|
||||
};
|
||||
|
||||
shellAliases = mkOption {
|
||||
default = config.environment.shellAliases;
|
||||
default = {};
|
||||
description = ''
|
||||
Set of aliases for fish shell. See <option>environment.shellAliases</option>
|
||||
for an option format description.
|
||||
Set of aliases for fish shell, which overrides <option>environment.shellAliases</option>.
|
||||
See <option>environment.shellAliases</option> for an option format description.
|
||||
'';
|
||||
type = types.attrs;
|
||||
type = with types; attrsOf (nullOr (either str path));
|
||||
};
|
||||
|
||||
shellInit = mkOption {
|
||||
@ -99,6 +100,8 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
programs.fish.shellAliases = mapAttrs (name: mkDefault) cfge.shellAliases;
|
||||
|
||||
environment.etc."fish/foreign-env/shellInit".text = cfge.shellInit;
|
||||
environment.etc."fish/foreign-env/loginShellInit".text = cfge.loginShellInit;
|
||||
environment.etc."fish/foreign-env/interactiveShellInit".text = cfge.interactiveShellInit;
|
||||
|
@ -8,12 +8,6 @@ with lib;
|
||||
|
||||
config = {
|
||||
|
||||
environment.shellAliases =
|
||||
{ ls = "ls --color=tty";
|
||||
ll = "ls -l";
|
||||
l = "ls -alh";
|
||||
};
|
||||
|
||||
environment.shellInit =
|
||||
''
|
||||
# Set up the per-user profile.
|
||||
|
@ -29,8 +29,8 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ thefuck ];
|
||||
environment.shellInit = initScript;
|
||||
|
||||
programs.bash.interactiveShellInit = initScript;
|
||||
programs.zsh.interactiveShellInit = mkIf prg.zsh.enable initScript;
|
||||
programs.fish.interactiveShellInit = mkIf prg.fish.enable ''
|
||||
${pkgs.thefuck}/bin/thefuck --alias | source
|
||||
|
@ -11,7 +11,8 @@ let
|
||||
cfg = config.programs.zsh;
|
||||
|
||||
zshAliases = concatStringsSep "\n" (
|
||||
mapAttrsFlatten (k: v: "alias ${k}=${escapeShellArg v}") cfg.shellAliases
|
||||
mapAttrsFlatten (k: v: "alias ${k}=${escapeShellArg v}")
|
||||
(filterAttrs (k: v: !isNull v) cfg.shellAliases)
|
||||
);
|
||||
|
||||
in
|
||||
@ -34,13 +35,12 @@ in
|
||||
};
|
||||
|
||||
shellAliases = mkOption {
|
||||
default = config.environment.shellAliases;
|
||||
default = {};
|
||||
description = ''
|
||||
Set of aliases for zsh shell. Overrides the default value taken from
|
||||
<option>environment.shellAliases</option>.
|
||||
Set of aliases for zsh shell, which overrides <option>environment.shellAliases</option>.
|
||||
See <option>environment.shellAliases</option> for an option format description.
|
||||
'';
|
||||
type = types.attrs; # types.attrsOf types.stringOrPath;
|
||||
type = with types; attrsOf (nullOr (either str path));
|
||||
};
|
||||
|
||||
shellInit = mkOption {
|
||||
@ -106,6 +106,8 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
programs.zsh.shellAliases = mapAttrs (name: mkDefault) cfge.shellAliases;
|
||||
|
||||
environment.etc."zshenv".text =
|
||||
''
|
||||
# /etc/zshenv: DO NOT EDIT -- this file has been generated automatically.
|
||||
|
@ -3,6 +3,10 @@
|
||||
with lib;
|
||||
|
||||
{
|
||||
meta = {
|
||||
maintainers = [ maintainers.joachifm ];
|
||||
};
|
||||
|
||||
options = {
|
||||
security.lockKernelModules = mkOption {
|
||||
type = types.bool;
|
||||
|
39
nixos/modules/security/misc.nix
Normal file
39
nixos/modules/security/misc.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
meta = {
|
||||
maintainers = [ maintainers.joachifm ];
|
||||
};
|
||||
|
||||
options = {
|
||||
security.allowUserNamespaces = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to allow creation of user namespaces. A recurring problem
|
||||
with user namespaces is the presence of code paths where the kernel's
|
||||
permission checking logic fails to account for namespacing, instead
|
||||
permitting a namespaced process to act outside the namespace with the
|
||||
same privileges as it would have inside it. This is particularly
|
||||
damaging in the common case of running as root within the namespace.
|
||||
When user namespace creation is disallowed, attempting to create
|
||||
a user namespace fails with "no space left on device" (ENOSPC).
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (!config.security.allowUserNamespaces) {
|
||||
# Setting the number of allowed user namespaces to 0 effectively disables
|
||||
# the feature at runtime. Note that root may raise the limit again
|
||||
# at any time.
|
||||
boot.kernel.sysctl."user.max_user_namespaces" = 0;
|
||||
|
||||
assertions = [
|
||||
{ assertion = config.nix.useSandbox -> config.security.allowUserNamespaces;
|
||||
message = "`nix.useSandbox = true` conflicts with `!security.allowUserNamespaces`.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
@ -36,7 +36,7 @@ in {
|
||||
description = "Profile Sync daemon";
|
||||
wants = [ "psd-resync.service" "local-fs.target" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
path = with pkgs; [ rsync kmod gawk nettools profile-sync-daemon ];
|
||||
path = with pkgs; [ rsync kmod gawk nettools utillinux profile-sync-daemon ];
|
||||
unitConfig = {
|
||||
RequiresMountsFor = [ "/home/" ];
|
||||
};
|
||||
@ -55,7 +55,7 @@ in {
|
||||
wants = [ "psd-resync.timer" ];
|
||||
partOf = [ "psd.service" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
path = with pkgs; [ rsync kmod gawk nettools profile-sync-daemon ];
|
||||
path = with pkgs; [ rsync kmod gawk nettools utillinux profile-sync-daemon ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.profile-sync-daemon}/bin/profile-sync-daemon resync";
|
||||
|
@ -53,6 +53,7 @@ let
|
||||
repos_path: "${cfg.statePath}/repositories"
|
||||
secret_file: "${cfg.statePath}/config/gitlab_shell_secret"
|
||||
log_file: "${cfg.statePath}/log/gitlab-shell.log"
|
||||
custom_hooks_dir: "${cfg.statePath}/custom_hooks"
|
||||
redis:
|
||||
bin: ${pkgs.redis}/bin/redis-cli
|
||||
host: 127.0.0.1
|
||||
@ -562,6 +563,9 @@ in {
|
||||
mkdir -p ${cfg.statePath}/shell
|
||||
mkdir -p ${cfg.statePath}/db
|
||||
mkdir -p ${cfg.statePath}/uploads
|
||||
mkdir -p ${cfg.statePath}/custom_hooks/pre-receive.d
|
||||
mkdir -p ${cfg.statePath}/custom_hooks/post-receive.d
|
||||
mkdir -p ${cfg.statePath}/custom_hooks/update.d
|
||||
|
||||
rm -rf ${cfg.statePath}/config ${cfg.statePath}/shell/hooks
|
||||
mkdir -p ${cfg.statePath}/config
|
||||
|
@ -30,6 +30,7 @@ let
|
||||
postfix = import ./exporters/postfix.nix { inherit config lib pkgs; };
|
||||
snmp = import ./exporters/snmp.nix { inherit config lib pkgs; };
|
||||
surfboard = import ./exporters/surfboard.nix { inherit config lib pkgs; };
|
||||
tor = import ./exporters/tor.nix { inherit config lib pkgs; };
|
||||
unifi = import ./exporters/unifi.nix { inherit config lib pkgs; };
|
||||
varnish = import ./exporters/varnish.nix { inherit config lib pkgs; };
|
||||
};
|
||||
|
@ -0,0 +1,40 @@
|
||||
{ config, lib, pkgs }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.prometheus.exporters.tor;
|
||||
in
|
||||
{
|
||||
port = 9130;
|
||||
extraOpts = {
|
||||
torControlAddress = mkOption {
|
||||
type = types.str;
|
||||
default = "127.0.0.1";
|
||||
description = ''
|
||||
Tor control IP address or hostname.
|
||||
'';
|
||||
};
|
||||
|
||||
torControlPort = mkOption {
|
||||
type = types.int;
|
||||
default = 9051;
|
||||
description = ''
|
||||
Tor control port.
|
||||
'';
|
||||
};
|
||||
};
|
||||
serviceOpts = {
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
ExecStart = ''
|
||||
${pkgs.prometheus-tor-exporter}/bin/prometheus-tor-exporter \
|
||||
-b ${cfg.listenAddress} \
|
||||
-p ${toString cfg.port} \
|
||||
-a ${cfg.torControlAddress} \
|
||||
-c ${toString cfg.torControlPort} \
|
||||
${concatStringsSep " \\\n " cfg.extraFlags}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
@ -16,6 +16,14 @@ in {
|
||||
available on http://127.0.0.1:8384/.
|
||||
'';
|
||||
|
||||
guiAddress = mkOption {
|
||||
type = types.str;
|
||||
default = "127.0.0.1:8384";
|
||||
description = ''
|
||||
Address to serve the GUI.
|
||||
'';
|
||||
};
|
||||
|
||||
systemService = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
@ -23,7 +31,7 @@ in {
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = defaultUser;
|
||||
description = ''
|
||||
Syncthing will be run under this user (user will be created if it doesn't exist.
|
||||
@ -32,7 +40,7 @@ in {
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "nogroup";
|
||||
description = ''
|
||||
Syncthing will be run under this group (group will not be created if it doesn't exist.
|
||||
@ -41,7 +49,7 @@ in {
|
||||
};
|
||||
|
||||
all_proxy = mkOption {
|
||||
type = types.nullOr types.string;
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
example = "socks5://address.com:1234";
|
||||
description = ''
|
||||
@ -132,7 +140,12 @@ in {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
PermissionsStartOnly = true;
|
||||
ExecStart = "${cfg.package}/bin/syncthing -no-browser -home=${cfg.dataDir}";
|
||||
ExecStart = ''
|
||||
${cfg.package}/bin/syncthing \
|
||||
-no-browser \
|
||||
-gui-address=${cfg.guiAddress} \
|
||||
-home=${cfg.dataDir}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1,431 +0,0 @@
|
||||
{ config, lib, pkgs, ...}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.znc;
|
||||
|
||||
defaultUser = "znc"; # Default user to own process.
|
||||
|
||||
# Default user and pass:
|
||||
# un=znc
|
||||
# pw=nixospass
|
||||
|
||||
defaultUserName = "znc";
|
||||
defaultPassBlock = "
|
||||
<Pass password>
|
||||
Method = sha256
|
||||
Hash = e2ce303c7ea75c571d80d8540a8699b46535be6a085be3414947d638e48d9e93
|
||||
Salt = l5Xryew4g*!oa(ECfX2o
|
||||
</Pass>
|
||||
";
|
||||
|
||||
modules = pkgs.buildEnv {
|
||||
name = "znc-modules";
|
||||
paths = cfg.modulePackages;
|
||||
};
|
||||
|
||||
# Keep znc.conf in nix store, then symlink or copy into `dataDir`, depending on `mutable`.
|
||||
mkZncConf = confOpts: ''
|
||||
Version = 1.6.3
|
||||
${concatMapStrings (n: "LoadModule = ${n}\n") confOpts.modules}
|
||||
|
||||
<Listener l>
|
||||
Port = ${toString confOpts.port}
|
||||
IPv4 = true
|
||||
IPv6 = true
|
||||
SSL = ${boolToString confOpts.useSSL}
|
||||
${lib.optionalString (confOpts.uriPrefix != null) "URIPrefix = ${confOpts.uriPrefix}"}
|
||||
</Listener>
|
||||
|
||||
<User ${confOpts.userName}>
|
||||
${confOpts.passBlock}
|
||||
Admin = true
|
||||
Nick = ${confOpts.nick}
|
||||
AltNick = ${confOpts.nick}_
|
||||
Ident = ${confOpts.nick}
|
||||
RealName = ${confOpts.nick}
|
||||
${concatMapStrings (n: "LoadModule = ${n}\n") confOpts.userModules}
|
||||
|
||||
${ lib.concatStringsSep "\n" (lib.mapAttrsToList (name: net: ''
|
||||
<Network ${name}>
|
||||
${concatMapStrings (m: "LoadModule = ${m}\n") net.modules}
|
||||
Server = ${net.server} ${lib.optionalString net.useSSL "+"}${toString net.port} ${net.password}
|
||||
${concatMapStrings (c: "<Chan #${c}>\n</Chan>\n") net.channels}
|
||||
${lib.optionalString net.hasBitlbeeControlChannel ''
|
||||
<Chan &bitlbee>
|
||||
</Chan>
|
||||
''}
|
||||
${net.extraConf}
|
||||
</Network>
|
||||
'') confOpts.networks) }
|
||||
</User>
|
||||
${confOpts.extraZncConf}
|
||||
'';
|
||||
|
||||
zncConfFile = pkgs.writeTextFile {
|
||||
name = "znc.conf";
|
||||
text = if cfg.zncConf != ""
|
||||
then cfg.zncConf
|
||||
else mkZncConf cfg.confOptions;
|
||||
};
|
||||
|
||||
networkOpts = { ... }: {
|
||||
options = {
|
||||
server = mkOption {
|
||||
type = types.str;
|
||||
example = "chat.freenode.net";
|
||||
description = ''
|
||||
IRC server address.
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
default = 6697;
|
||||
example = 6697;
|
||||
description = ''
|
||||
IRC server port.
|
||||
'';
|
||||
};
|
||||
|
||||
userName = mkOption {
|
||||
default = "";
|
||||
example = "johntron";
|
||||
type = types.string;
|
||||
description = ''
|
||||
A nick identity specific to the IRC server.
|
||||
'';
|
||||
};
|
||||
|
||||
password = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = ''
|
||||
IRC server password, such as for a Slack gateway.
|
||||
'';
|
||||
};
|
||||
|
||||
useSSL = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to use SSL to connect to the IRC server.
|
||||
'';
|
||||
};
|
||||
|
||||
modulePackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [];
|
||||
example = [ "pkgs.zncModules.push" "pkgs.zncModules.fish" ];
|
||||
description = ''
|
||||
External ZNC modules to build.
|
||||
'';
|
||||
};
|
||||
|
||||
modules = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "simple_away" ];
|
||||
example = literalExample "[ simple_away sasl ]";
|
||||
description = ''
|
||||
ZNC modules to load.
|
||||
'';
|
||||
};
|
||||
|
||||
channels = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
example = [ "nixos" ];
|
||||
description = ''
|
||||
IRC channels to join.
|
||||
'';
|
||||
};
|
||||
|
||||
hasBitlbeeControlChannel = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to add the special Bitlbee operations channel.
|
||||
'';
|
||||
};
|
||||
|
||||
extraConf = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
example = ''
|
||||
Encoding = ^UTF-8
|
||||
FloodBurst = 4
|
||||
FloodRate = 1.00
|
||||
IRCConnectEnabled = true
|
||||
Ident = johntron
|
||||
JoinDelay = 0
|
||||
Nick = johntron
|
||||
'';
|
||||
description = ''
|
||||
Extra config for the network.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### Interface
|
||||
|
||||
options = {
|
||||
services.znc = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Enable a ZNC service for a user.
|
||||
'';
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
default = "znc";
|
||||
example = "john";
|
||||
type = types.string;
|
||||
description = ''
|
||||
The name of an existing user account to use to own the ZNC server process.
|
||||
If not specified, a default user will be created to own the process.
|
||||
'';
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
default = "";
|
||||
example = "users";
|
||||
type = types.string;
|
||||
description = ''
|
||||
Group to own the ZNCserver process.
|
||||
'';
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
default = "/var/lib/znc/";
|
||||
example = "/home/john/.znc/";
|
||||
type = types.path;
|
||||
description = ''
|
||||
The data directory. Used for configuration files and modules.
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to open ports in the firewall for ZNC.
|
||||
'';
|
||||
};
|
||||
|
||||
zncConf = mkOption {
|
||||
default = "";
|
||||
example = "See: http://wiki.znc.in/Configuration";
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Config file as generated with `znc --makeconf` to use for the whole ZNC configuration.
|
||||
If specified, `confOptions` will be ignored, and this value, as-is, will be used.
|
||||
If left empty, a conf file with default values will be used.
|
||||
'';
|
||||
};
|
||||
|
||||
confOptions = {
|
||||
modules = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "webadmin" "adminlog" ];
|
||||
example = [ "partyline" "webadmin" "adminlog" "log" ];
|
||||
description = ''
|
||||
A list of modules to include in the `znc.conf` file.
|
||||
'';
|
||||
};
|
||||
|
||||
userModules = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "chansaver" "controlpanel" ];
|
||||
example = [ "chansaver" "controlpanel" "fish" "push" ];
|
||||
description = ''
|
||||
A list of user modules to include in the `znc.conf` file.
|
||||
'';
|
||||
};
|
||||
|
||||
userName = mkOption {
|
||||
default = defaultUserName;
|
||||
example = "johntron";
|
||||
type = types.string;
|
||||
description = ''
|
||||
The user name used to log in to the ZNC web admin interface.
|
||||
'';
|
||||
};
|
||||
|
||||
networks = mkOption {
|
||||
default = { };
|
||||
type = with types; attrsOf (submodule networkOpts);
|
||||
description = ''
|
||||
IRC networks to connect the user to.
|
||||
'';
|
||||
example = {
|
||||
"freenode" = {
|
||||
server = "chat.freenode.net";
|
||||
port = 6697;
|
||||
useSSL = true;
|
||||
modules = [ "simple_away" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nick = mkOption {
|
||||
default = "znc-user";
|
||||
example = "john";
|
||||
type = types.string;
|
||||
description = ''
|
||||
The IRC nick.
|
||||
'';
|
||||
};
|
||||
|
||||
passBlock = mkOption {
|
||||
example = defaultPassBlock;
|
||||
type = types.string;
|
||||
description = ''
|
||||
Generate with `nix-shell -p znc --command "znc --makepass"`.
|
||||
This is the password used to log in to the ZNC web admin interface.
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
default = 5000;
|
||||
example = 5000;
|
||||
type = types.int;
|
||||
description = ''
|
||||
Specifies the port on which to listen.
|
||||
'';
|
||||
};
|
||||
|
||||
useSSL = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Indicates whether the ZNC server should use SSL when listening on the specified port. A self-signed certificate will be generated.
|
||||
'';
|
||||
};
|
||||
|
||||
uriPrefix = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "/znc/";
|
||||
description = ''
|
||||
An optional URI prefix for the ZNC web interface. Can be
|
||||
used to make ZNC available behind a reverse proxy.
|
||||
'';
|
||||
};
|
||||
|
||||
extraZncConf = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Extra config to `znc.conf` file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
modulePackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ ];
|
||||
example = literalExample "[ pkgs.zncModules.fish pkgs.zncModules.push ]";
|
||||
description = ''
|
||||
A list of global znc module packages to add to znc.
|
||||
'';
|
||||
};
|
||||
|
||||
mutable = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Indicates whether to allow the contents of the `dataDir` directory to be changed
|
||||
by the user at run-time.
|
||||
If true, modifications to the ZNC configuration after its initial creation are not
|
||||
overwritten by a NixOS system rebuild.
|
||||
If false, the ZNC configuration is rebuilt by every system rebuild.
|
||||
If the user wants to manage the ZNC service using the web admin interface, this value
|
||||
should be set to true.
|
||||
'';
|
||||
};
|
||||
|
||||
extraFlags = mkOption {
|
||||
default = [ ];
|
||||
example = [ "--debug" ];
|
||||
type = types.listOf types.str;
|
||||
description = ''
|
||||
Extra flags to use when executing znc command.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
###### Implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [ cfg.confOptions.port ];
|
||||
};
|
||||
|
||||
systemd.services.znc = {
|
||||
description = "ZNC Server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.service" ];
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
Restart = "always";
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||
ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID";
|
||||
};
|
||||
preStart = ''
|
||||
${pkgs.coreutils}/bin/mkdir -p ${cfg.dataDir}/configs
|
||||
|
||||
# If mutable, regenerate conf file every time.
|
||||
${optionalString (!cfg.mutable) ''
|
||||
${pkgs.coreutils}/bin/echo "znc is set to be system-managed. Now deleting old znc.conf file to be regenerated."
|
||||
${pkgs.coreutils}/bin/rm -f ${cfg.dataDir}/configs/znc.conf
|
||||
''}
|
||||
|
||||
# Ensure essential files exist.
|
||||
if [[ ! -f ${cfg.dataDir}/configs/znc.conf ]]; then
|
||||
${pkgs.coreutils}/bin/echo "No znc.conf file found in ${cfg.dataDir}. Creating one now."
|
||||
${pkgs.coreutils}/bin/cp --no-clobber ${zncConfFile} ${cfg.dataDir}/configs/znc.conf
|
||||
${pkgs.coreutils}/bin/chmod u+rw ${cfg.dataDir}/configs/znc.conf
|
||||
${pkgs.coreutils}/bin/chown ${cfg.user} ${cfg.dataDir}/configs/znc.conf
|
||||
fi
|
||||
|
||||
if [[ ! -f ${cfg.dataDir}/znc.pem ]]; then
|
||||
${pkgs.coreutils}/bin/echo "No znc.pem file found in ${cfg.dataDir}. Creating one now."
|
||||
${pkgs.znc}/bin/znc --makepem --datadir ${cfg.dataDir}
|
||||
fi
|
||||
|
||||
# Symlink modules
|
||||
rm ${cfg.dataDir}/modules || true
|
||||
ln -fs ${modules}/lib/znc ${cfg.dataDir}/modules
|
||||
'';
|
||||
script = "${pkgs.znc}/bin/znc --foreground --datadir ${cfg.dataDir} ${toString cfg.extraFlags}";
|
||||
};
|
||||
|
||||
users.users = optional (cfg.user == defaultUser)
|
||||
{ name = defaultUser;
|
||||
description = "ZNC server daemon owner";
|
||||
group = defaultUser;
|
||||
uid = config.ids.uids.znc;
|
||||
home = cfg.dataDir;
|
||||
createHome = true;
|
||||
};
|
||||
|
||||
users.groups = optional (cfg.user == defaultUser)
|
||||
{ name = defaultUser;
|
||||
gid = config.ids.gids.znc;
|
||||
members = [ defaultUser ];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
306
nixos/modules/services/networking/znc/default.nix
Normal file
306
nixos/modules/services/networking/znc/default.nix
Normal file
@ -0,0 +1,306 @@
|
||||
{ config, lib, pkgs, ...}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.znc;
|
||||
|
||||
defaultUser = "znc";
|
||||
|
||||
modules = pkgs.buildEnv {
|
||||
name = "znc-modules";
|
||||
paths = cfg.modulePackages;
|
||||
};
|
||||
|
||||
listenerPorts = concatMap (l: optional (l ? Port) l.Port)
|
||||
(attrValues (cfg.config.Listener or {}));
|
||||
|
||||
# Converts the config option to a string
|
||||
semanticString = let
|
||||
|
||||
sortedAttrs = set: sort (l: r:
|
||||
if l == "extraConfig" then false # Always put extraConfig last
|
||||
else if isAttrs set.${l} == isAttrs set.${r} then l < r
|
||||
else isAttrs set.${r} # Attrsets should be last, makes for a nice config
|
||||
# This last case occurs when any side (but not both) is an attrset
|
||||
# The order of these is correct when the attrset is on the right
|
||||
# which we're just returning
|
||||
) (attrNames set);
|
||||
|
||||
# Specifies an attrset that encodes the value according to its type
|
||||
encode = name: value: {
|
||||
null = [];
|
||||
bool = [ "${name} = ${boolToString value}" ];
|
||||
int = [ "${name} = ${toString value}" ];
|
||||
|
||||
# extraConfig should be inserted verbatim
|
||||
string = [ (if name == "extraConfig" then value else "${name} = ${value}") ];
|
||||
|
||||
# Values like `Foo = [ "bar" "baz" ];` should be transformed into
|
||||
# Foo=bar
|
||||
# Foo=baz
|
||||
list = concatMap (encode name) value;
|
||||
|
||||
# Values like `Foo = { bar = { Baz = "baz"; Qux = "qux"; Florps = null; }; };` should be transmed into
|
||||
# <Foo bar>
|
||||
# Baz=baz
|
||||
# Qux=qux
|
||||
# </Foo>
|
||||
set = concatMap (subname: [
|
||||
"<${name} ${subname}>"
|
||||
] ++ map (line: "\t${line}") (toLines value.${subname}) ++ [
|
||||
"</${name}>"
|
||||
]) (filter (v: v != null) (attrNames value));
|
||||
|
||||
}.${builtins.typeOf value};
|
||||
|
||||
# One level "above" encode, acts upon a set and uses encode on each name,value pair
|
||||
toLines = set: concatMap (name: encode name set.${name}) (sortedAttrs set);
|
||||
|
||||
in
|
||||
concatStringsSep "\n" (toLines cfg.config);
|
||||
|
||||
semanticTypes = with types; rec {
|
||||
zncAtom = nullOr (either (either int bool) str);
|
||||
zncAttr = attrsOf (nullOr zncConf);
|
||||
zncAll = either (either zncAtom (listOf zncAtom)) zncAttr;
|
||||
zncConf = attrsOf (zncAll // {
|
||||
# Since this is a recursive type and the description by default contains
|
||||
# the description of its subtypes, infinite recursion would occur without
|
||||
# explicitly breaking this cycle
|
||||
description = "znc values (null, atoms (str, int, bool), list of atoms, or attrsets of znc values)";
|
||||
});
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
options = {
|
||||
services.znc = {
|
||||
enable = mkEnableOption "ZNC";
|
||||
|
||||
user = mkOption {
|
||||
default = "znc";
|
||||
example = "john";
|
||||
type = types.str;
|
||||
description = ''
|
||||
The name of an existing user account to use to own the ZNC server
|
||||
process. If not specified, a default user will be created.
|
||||
'';
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
default = defaultUser;
|
||||
example = "users";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Group to own the ZNC process.
|
||||
'';
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
default = "/var/lib/znc/";
|
||||
example = "/home/john/.znc/";
|
||||
type = types.path;
|
||||
description = ''
|
||||
The state directory for ZNC. The config and the modules will be linked
|
||||
to from this directory as well.
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to open ports in the firewall for ZNC. Does work with
|
||||
ports for listeners specified in
|
||||
<option>services.znc.config.Listener</option>.
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
type = semanticTypes.zncConf;
|
||||
default = {};
|
||||
example = literalExample ''
|
||||
{
|
||||
LoadModule = [ "webadmin" "adminlog" ];
|
||||
User.paul = {
|
||||
Admin = true;
|
||||
Nick = "paul";
|
||||
AltNick = "paul1";
|
||||
LoadModule = [ "chansaver" "controlpanel" ];
|
||||
Network.freenode = {
|
||||
Server = "chat.freenode.net +6697";
|
||||
LoadModule = [ "simple_away" ];
|
||||
Chan = {
|
||||
"#nixos" = { Detached = false; };
|
||||
"##linux" = { Disabled = true; };
|
||||
};
|
||||
};
|
||||
Pass.password = {
|
||||
Method = "sha256";
|
||||
Hash = "e2ce303c7ea75c571d80d8540a8699b46535be6a085be3414947d638e48d9e93";
|
||||
Salt = "l5Xryew4g*!oa(ECfX2o";
|
||||
};
|
||||
};
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Configuration for ZNC, see
|
||||
<literal>https://wiki.znc.in/Configuration</literal> for details. The
|
||||
Nix value declared here will be translated directly to the xml-like
|
||||
format ZNC expects. This is much more flexible than the legacy options
|
||||
under <option>services.znc.confOptions.*</option>, but also can't do
|
||||
any type checking.
|
||||
</para>
|
||||
<para>
|
||||
You can use <command>nix-instantiate --eval --strict '<nixpkgs/nixos>' -A config.services.znc.config</command>
|
||||
to view the current value. By default it contains a listener for port
|
||||
5000 with SSL enabled.
|
||||
</para>
|
||||
<para>
|
||||
Nix attributes called <literal>extraConfig</literal> will be inserted
|
||||
verbatim into the resulting config file.
|
||||
</para>
|
||||
<para>
|
||||
If <option>services.znc.useLegacyConfig</option> is turned on, the
|
||||
option values in <option>services.znc.confOptions.*</option> will be
|
||||
gracefully be applied to this option.
|
||||
</para>
|
||||
<para>
|
||||
If you intend to update the configuration through this option, be sure
|
||||
to enable <option>services.znc.mutable</option>, otherwise none of the
|
||||
changes here will be applied after the initial deploy.
|
||||
'';
|
||||
};
|
||||
|
||||
configFile = mkOption {
|
||||
type = types.path;
|
||||
example = "~/.znc/configs/znc.conf";
|
||||
description = ''
|
||||
Configuration file for ZNC. It is recommended to use the
|
||||
<option>config</option> option instead.
|
||||
</para>
|
||||
<para>
|
||||
Setting this option will override any auto-generated config file
|
||||
through the <option>confOptions</option> or <option>config</option>
|
||||
options.
|
||||
'';
|
||||
};
|
||||
|
||||
modulePackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ ];
|
||||
example = literalExample "[ pkgs.zncModules.fish pkgs.zncModules.push ]";
|
||||
description = ''
|
||||
A list of global znc module packages to add to znc.
|
||||
'';
|
||||
};
|
||||
|
||||
mutable = mkOption {
|
||||
default = true; # TODO: Default to true when config is set, make sure to not delete the old config if present
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Indicates whether to allow the contents of the
|
||||
<literal>dataDir</literal> directory to be changed by the user at
|
||||
run-time.
|
||||
</para>
|
||||
<para>
|
||||
If enabled, modifications to the ZNC configuration after its initial
|
||||
creation are not overwritten by a NixOS rebuild. If disabled, the
|
||||
ZNC configuration is rebuilt on every NixOS rebuild.
|
||||
</para>
|
||||
<para>
|
||||
If the user wants to manage the ZNC service using the web admin
|
||||
interface, this option should be enabled.
|
||||
'';
|
||||
};
|
||||
|
||||
extraFlags = mkOption {
|
||||
default = [ ];
|
||||
example = [ "--debug" ];
|
||||
type = types.listOf types.str;
|
||||
description = ''
|
||||
Extra arguments to use for executing znc.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
###### Implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.znc = {
|
||||
configFile = mkDefault (pkgs.writeText "znc-generated.conf" semanticString);
|
||||
config = {
|
||||
Version = (builtins.parseDrvName pkgs.znc.name).version;
|
||||
Listener.l.Port = mkDefault 5000;
|
||||
Listener.l.SSL = mkDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall listenerPorts;
|
||||
|
||||
systemd.services.znc = {
|
||||
description = "ZNC Server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
Restart = "always";
|
||||
ExecStart = "${pkgs.znc}/bin/znc --foreground --datadir ${cfg.dataDir} ${escapeShellArgs cfg.extraFlags}";
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||
ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID";
|
||||
};
|
||||
preStart = ''
|
||||
mkdir -p ${cfg.dataDir}/configs
|
||||
|
||||
# If mutable, regenerate conf file every time.
|
||||
${optionalString (!cfg.mutable) ''
|
||||
echo "znc is set to be system-managed. Now deleting old znc.conf file to be regenerated."
|
||||
rm -f ${cfg.dataDir}/configs/znc.conf
|
||||
''}
|
||||
|
||||
# Ensure essential files exist.
|
||||
if [[ ! -f ${cfg.dataDir}/configs/znc.conf ]]; then
|
||||
echo "No znc.conf file found in ${cfg.dataDir}. Creating one now."
|
||||
cp --no-clobber ${cfg.configFile} ${cfg.dataDir}/configs/znc.conf
|
||||
chmod u+rw ${cfg.dataDir}/configs/znc.conf
|
||||
chown ${cfg.user} ${cfg.dataDir}/configs/znc.conf
|
||||
fi
|
||||
|
||||
if [[ ! -f ${cfg.dataDir}/znc.pem ]]; then
|
||||
echo "No znc.pem file found in ${cfg.dataDir}. Creating one now."
|
||||
${pkgs.znc}/bin/znc --makepem --datadir ${cfg.dataDir}
|
||||
fi
|
||||
|
||||
# Symlink modules
|
||||
rm ${cfg.dataDir}/modules || true
|
||||
ln -fs ${modules}/lib/znc ${cfg.dataDir}/modules
|
||||
'';
|
||||
};
|
||||
|
||||
users.users = optional (cfg.user == defaultUser)
|
||||
{ name = defaultUser;
|
||||
description = "ZNC server daemon owner";
|
||||
group = defaultUser;
|
||||
uid = config.ids.uids.znc;
|
||||
home = cfg.dataDir;
|
||||
createHome = true;
|
||||
};
|
||||
|
||||
users.groups = optional (cfg.user == defaultUser)
|
||||
{ name = defaultUser;
|
||||
gid = config.ids.gids.znc;
|
||||
members = [ defaultUser ];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
268
nixos/modules/services/networking/znc/options.nix
Normal file
268
nixos/modules/services/networking/znc/options.nix
Normal file
@ -0,0 +1,268 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.znc;
|
||||
|
||||
networkOpts = {
|
||||
options = {
|
||||
|
||||
server = mkOption {
|
||||
type = types.str;
|
||||
example = "chat.freenode.net";
|
||||
description = ''
|
||||
IRC server address.
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.ints.u16;
|
||||
default = 6697;
|
||||
description = ''
|
||||
IRC server port.
|
||||
'';
|
||||
};
|
||||
|
||||
password = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = ''
|
||||
IRC server password, such as for a Slack gateway.
|
||||
'';
|
||||
};
|
||||
|
||||
useSSL = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to use SSL to connect to the IRC server.
|
||||
'';
|
||||
};
|
||||
|
||||
modules = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "simple_away" ];
|
||||
example = literalExample "[ simple_away sasl ]";
|
||||
description = ''
|
||||
ZNC network modules to load.
|
||||
'';
|
||||
};
|
||||
|
||||
channels = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
example = [ "nixos" ];
|
||||
description = ''
|
||||
IRC channels to join.
|
||||
'';
|
||||
};
|
||||
|
||||
hasBitlbeeControlChannel = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to add the special Bitlbee operations channel.
|
||||
'';
|
||||
};
|
||||
|
||||
extraConf = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
example = ''
|
||||
Encoding = ^UTF-8
|
||||
FloodBurst = 4
|
||||
FloodRate = 1.00
|
||||
IRCConnectEnabled = true
|
||||
Ident = johntron
|
||||
JoinDelay = 0
|
||||
Nick = johntron
|
||||
'';
|
||||
description = ''
|
||||
Extra config for the network. Consider using
|
||||
<option>services.znc.config</option> instead.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options = {
|
||||
services.znc = {
|
||||
|
||||
useLegacyConfig = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to propagate the legacy options under
|
||||
<option>services.znc.confOptions.*</option> to the znc config. If this
|
||||
is turned on, the znc config will contain a user with the default name
|
||||
"znc", global modules "webadmin" and "adminlog" will be enabled by
|
||||
default, and more, all controlled through the
|
||||
<option>services.znc.confOptions.*</option> options.
|
||||
You can use <command>nix-instantiate --eval --strict '<nixpkgs/nixos>' -A config.services.znc.config</command>
|
||||
to view the current value of the config.
|
||||
</para>
|
||||
<para>
|
||||
In any case, if you need more flexibility,
|
||||
<option>services.znc.config</option> can be used to override/add to
|
||||
all of the legacy options.
|
||||
'';
|
||||
};
|
||||
|
||||
confOptions = {
|
||||
modules = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "webadmin" "adminlog" ];
|
||||
example = [ "partyline" "webadmin" "adminlog" "log" ];
|
||||
description = ''
|
||||
A list of modules to include in the `znc.conf` file.
|
||||
'';
|
||||
};
|
||||
|
||||
userModules = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "chansaver" "controlpanel" ];
|
||||
example = [ "chansaver" "controlpanel" "fish" "push" ];
|
||||
description = ''
|
||||
A list of user modules to include in the `znc.conf` file.
|
||||
'';
|
||||
};
|
||||
|
||||
userName = mkOption {
|
||||
default = "znc";
|
||||
example = "johntron";
|
||||
type = types.str;
|
||||
description = ''
|
||||
The user name used to log in to the ZNC web admin interface.
|
||||
'';
|
||||
};
|
||||
|
||||
networks = mkOption {
|
||||
default = { };
|
||||
type = with types; attrsOf (submodule networkOpts);
|
||||
description = ''
|
||||
IRC networks to connect the user to.
|
||||
'';
|
||||
example = literalExample ''
|
||||
{
|
||||
"freenode" = {
|
||||
server = "chat.freenode.net";
|
||||
port = 6697;
|
||||
useSSL = true;
|
||||
modules = [ "simple_away" ];
|
||||
};
|
||||
};
|
||||
'';
|
||||
};
|
||||
|
||||
nick = mkOption {
|
||||
default = "znc-user";
|
||||
example = "john";
|
||||
type = types.str;
|
||||
description = ''
|
||||
The IRC nick.
|
||||
'';
|
||||
};
|
||||
|
||||
passBlock = mkOption {
|
||||
example = literalExample ''
|
||||
<Pass password>
|
||||
Method = sha256
|
||||
Hash = e2ce303c7ea75c571d80d8540a8699b46535be6a085be3414947d638e48d9e93
|
||||
Salt = l5Xryew4g*!oa(ECfX2o
|
||||
</Pass>
|
||||
'';
|
||||
type = types.str;
|
||||
description = ''
|
||||
Generate with `nix-shell -p znc --command "znc --makepass"`.
|
||||
This is the password used to log in to the ZNC web admin interface.
|
||||
You can also set this through
|
||||
<option>services.znc.config.User.<username>.Pass.Method</option>
|
||||
and co.
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
default = 5000;
|
||||
type = types.int;
|
||||
description = ''
|
||||
Specifies the port on which to listen.
|
||||
'';
|
||||
};
|
||||
|
||||
useSSL = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Indicates whether the ZNC server should use SSL when listening on
|
||||
the specified port. A self-signed certificate will be generated.
|
||||
'';
|
||||
};
|
||||
|
||||
uriPrefix = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "/znc/";
|
||||
description = ''
|
||||
An optional URI prefix for the ZNC web interface. Can be
|
||||
used to make ZNC available behind a reverse proxy.
|
||||
'';
|
||||
};
|
||||
|
||||
extraZncConf = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Extra config to `znc.conf` file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.useLegacyConfig {
|
||||
|
||||
services.znc.config = let
|
||||
c = cfg.confOptions;
|
||||
# defaults here should override defaults set in the non-legacy part
|
||||
mkDefault = mkOverride 900;
|
||||
in {
|
||||
LoadModule = mkDefault c.modules;
|
||||
Listener.l = {
|
||||
Port = mkDefault c.port;
|
||||
IPv4 = mkDefault true;
|
||||
IPv6 = mkDefault true;
|
||||
SSL = mkDefault c.useSSL;
|
||||
};
|
||||
User.${c.userName} = {
|
||||
Admin = mkDefault true;
|
||||
Nick = mkDefault c.nick;
|
||||
AltNick = mkDefault "${c.nick}_";
|
||||
Ident = mkDefault c.nick;
|
||||
RealName = mkDefault c.nick;
|
||||
LoadModule = mkDefault c.userModules;
|
||||
Network = mapAttrs (name: net: {
|
||||
LoadModule = mkDefault net.modules;
|
||||
Server = mkDefault "${net.server} ${optionalString net.useSSL "+"}${toString net.port} ${net.password}";
|
||||
Chan = optionalAttrs net.hasBitlbeeControlChannel { "&bitlbee" = mkDefault {}; } //
|
||||
listToAttrs (map (n: nameValuePair "#${n}" (mkDefault {})) net.channels);
|
||||
extraConfig = if net.extraConf == "" then mkDefault null else net.extraConf;
|
||||
}) c.networks;
|
||||
extraConfig = [ c.passBlock ] ++ optional (c.extraZncConf != "") c.extraZncConf;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
(mkRemovedOptionModule ["services" "znc" "zncConf"] ''
|
||||
Instead of `services.znc.zncConf = "... foo ...";`, use
|
||||
`services.znc.configFile = pkgs.writeText "znc.conf" "... foo ...";`.
|
||||
'')
|
||||
];
|
||||
}
|
@ -4,6 +4,8 @@ let
|
||||
|
||||
cfg = config.services.kmscon;
|
||||
|
||||
autologinArg = lib.optionalString (cfg.autologinUser != null) "-f ${cfg.autologinUser}";
|
||||
|
||||
configDir = pkgs.writeTextFile { name = "kmscon-config"; destination = "/kmscon.conf"; text = cfg.extraConfig; };
|
||||
in {
|
||||
options = {
|
||||
@ -39,6 +41,15 @@ in {
|
||||
default = "";
|
||||
example = "--term xterm-256color";
|
||||
};
|
||||
|
||||
autologinUser = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Username of the account that will be automatically logged in at the console.
|
||||
If unspecified, a login prompt is shown as usual.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -61,7 +72,7 @@ in {
|
||||
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=${pkgs.kmscon}/bin/kmscon "--vt=%I" ${cfg.extraOptions} --seats=seat0 --no-switchvt --configdir ${configDir} --login -- ${pkgs.shadow}/bin/login -p
|
||||
ExecStart=${pkgs.kmscon}/bin/kmscon "--vt=%I" ${cfg.extraOptions} --seats=seat0 --no-switchvt --configdir ${configDir} --login -- ${pkgs.shadow}/bin/login -p ${autologinArg}
|
||||
UtmpIdentifier=%I
|
||||
TTYPath=/dev/%I
|
||||
TTYReset=yes
|
||||
|
@ -34,6 +34,13 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
description = "Matomo package to use";
|
||||
default = pkgs.matomo;
|
||||
defaultText = "pkgs.matomo";
|
||||
};
|
||||
|
||||
webServerUser = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
@ -124,7 +131,7 @@ in {
|
||||
# the update part of the script can only work if the database is already up and running
|
||||
requires = [ databaseService ];
|
||||
after = [ databaseService ];
|
||||
path = [ pkgs.matomo ];
|
||||
path = [ cfg.package ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = user;
|
||||
@ -151,7 +158,7 @@ in {
|
||||
# Use User-Private Group scheme to protect matomo data, but allow administration / backup via matomo group
|
||||
# Copy config folder
|
||||
chmod g+s "${dataDir}"
|
||||
cp -r "${pkgs.matomo}/config" "${dataDir}/"
|
||||
cp -r "${cfg.package}/config" "${dataDir}/"
|
||||
chmod -R u+rwX,g+rwX,o-rwx "${dataDir}"
|
||||
|
||||
# check whether user setup has already been done
|
||||
@ -164,7 +171,7 @@ in {
|
||||
|
||||
systemd.services.${phpExecutionUnit} = {
|
||||
# stop phpfpm on package upgrade, do database upgrade via matomo_setup_update, and then restart
|
||||
restartTriggers = [ pkgs.matomo ];
|
||||
restartTriggers = [ cfg.package ];
|
||||
# stop config.ini.php from getting written with read permission for others
|
||||
serviceConfig.UMask = "0007";
|
||||
};
|
||||
@ -195,7 +202,7 @@ in {
|
||||
"${user}.${fqdn}" = mkMerge [ cfg.nginx {
|
||||
# don't allow to override the root easily, as it will almost certainly break matomo.
|
||||
# disadvantage: not shown as default in docs.
|
||||
root = mkForce "${pkgs.matomo}/share";
|
||||
root = mkForce "${cfg.package}/share";
|
||||
|
||||
# define locations here instead of as the submodule option's default
|
||||
# so that they can easily be extended with additional locations if required
|
||||
|
@ -145,8 +145,12 @@ let cfg = config.ec2; in
|
||||
environment.systemPackages = [ pkgs.cryptsetup ];
|
||||
|
||||
boot.initrd.supportedFilesystems = [ "unionfs-fuse" ];
|
||||
|
||||
|
||||
# EC2 has its own NTP server provided by the hypervisor
|
||||
networking.timeServers = [ "169.254.169.123" ];
|
||||
|
||||
# udisks has become too bloated to have in a headless system
|
||||
# (e.g. it depends on GTK+).
|
||||
services.udisks2.enable = false;
|
||||
};
|
||||
}
|
||||
|
@ -130,6 +130,7 @@ let
|
||||
--bind-ro=/nix/var/nix/daemon-socket \
|
||||
--bind="/nix/var/nix/profiles/per-container/$INSTANCE:/nix/var/nix/profiles" \
|
||||
--bind="/nix/var/nix/gcroots/per-container/$INSTANCE:/nix/var/nix/gcroots" \
|
||||
--link-journal=try-guest \
|
||||
--setenv PRIVATE_NETWORK="$PRIVATE_NETWORK" \
|
||||
--setenv HOST_BRIDGE="$HOST_BRIDGE" \
|
||||
--setenv HOST_ADDRESS="$HOST_ADDRESS" \
|
||||
|
@ -257,5 +257,22 @@ let self = {
|
||||
"18.03".sa-east-1.hvm-ebs = "ami-163e1f7a";
|
||||
"18.03".ap-south-1.hvm-ebs = "ami-6a390b05";
|
||||
|
||||
latest = self."18.03";
|
||||
# 18.09.910.c15e342304a
|
||||
"18.09".eu-west-1.hvm-ebs = "ami-0f412186fb8a0ec97";
|
||||
"18.09".eu-west-2.hvm-ebs = "ami-0dada3805ce43c55e";
|
||||
"18.09".eu-west-3.hvm-ebs = "ami-074df85565f2e02e2";
|
||||
"18.09".eu-central-1.hvm-ebs = "ami-07c9b884e679df4f8";
|
||||
"18.09".us-east-1.hvm-ebs = "ami-009c9c3f1af480ff3";
|
||||
"18.09".us-east-2.hvm-ebs = "ami-08199961085ea8bc6";
|
||||
"18.09".us-west-1.hvm-ebs = "ami-07aa7f56d612ddd38";
|
||||
"18.09".us-west-2.hvm-ebs = "ami-01c84b7c368ac24d1";
|
||||
"18.09".ca-central-1.hvm-ebs = "ami-04f66113f76198f6c";
|
||||
"18.09".ap-southeast-1.hvm-ebs = "ami-0892c7e24ebf2194f";
|
||||
"18.09".ap-southeast-2.hvm-ebs = "ami-010730f36424b0a2c";
|
||||
"18.09".ap-northeast-1.hvm-ebs = "ami-0cdba8e998f076547";
|
||||
"18.09".ap-northeast-2.hvm-ebs = "ami-0400a698e6a9f4a15";
|
||||
"18.09".sa-east-1.hvm-ebs = "ami-0e4a8a47fd6db6112";
|
||||
"18.09".ap-south-1.hvm-ebs = "ami-0880a678d3f555313";
|
||||
|
||||
latest = self."18.09";
|
||||
}; in self
|
||||
|
@ -243,6 +243,25 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
tor = {
|
||||
exporterConfig = {
|
||||
enable = true;
|
||||
};
|
||||
metricProvider = {
|
||||
# Note: this does not connect the test environment to the Tor network.
|
||||
# Client, relay, bridge or exit connectivity are disabled by default.
|
||||
services.tor.enable = true;
|
||||
services.tor.controlPort = 9051;
|
||||
};
|
||||
exporterTest = ''
|
||||
waitForUnit("tor.service");
|
||||
waitForOpenPort(9051);
|
||||
waitForUnit("prometheus-tor-exporter.service");
|
||||
waitForOpenPort(9130);
|
||||
succeed("curl -sSf localhost:9130/metrics | grep -q 'tor_version{.\\+} 1'");
|
||||
'';
|
||||
};
|
||||
|
||||
varnish = {
|
||||
exporterConfig = {
|
||||
enable = true;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, openssl, db48, boost
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, openssl, db53, boost
|
||||
, zlib, miniupnpc, qtbase ? null , qttools ? null, utillinux, protobuf, qrencode, libevent
|
||||
, withGui }:
|
||||
|
||||
@ -7,19 +7,19 @@ with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-abc-" + version;
|
||||
version = "0.17.1";
|
||||
version = "0.18.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bitcoin-ABC";
|
||||
repo = "bitcoin-abc";
|
||||
rev = "v${version}";
|
||||
sha256 = "1kq9n3s9vhkmfaizsyi2cb91ibi06gb6wx0hkcb9hg3nrrvcka3y";
|
||||
sha256 = "1ha219xnd61qicf7r3j0wbfrifh7blwp3lyk3ycgdn381q1qln29";
|
||||
};
|
||||
|
||||
patches = [ ./fix-bitcoin-qt-build.patch ];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
||||
buildInputs = [ openssl db48 boost zlib
|
||||
buildInputs = [ openssl db53 boost zlib
|
||||
miniupnpc utillinux protobuf libevent ]
|
||||
++ optionals withGui [ qtbase qttools qrencode ];
|
||||
|
||||
|
@ -53,7 +53,6 @@ rec {
|
||||
|
||||
freicoin = callPackage ./freicoin.nix { boost = boost155; };
|
||||
go-ethereum = callPackage ./go-ethereum.nix {
|
||||
buildGoPackage = buildGo110Package;
|
||||
inherit (darwin) libobjc;
|
||||
inherit (darwin.apple_sdk.frameworks) IOKit;
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "go-ethereum-${version}";
|
||||
version = "1.8.13";
|
||||
version = "1.8.17";
|
||||
goPackagePath = "github.com/ethereum/go-ethereum";
|
||||
|
||||
# Fix for usb-related segmentation faults on darwin
|
||||
@ -16,7 +16,7 @@ buildGoPackage rec {
|
||||
owner = "ethereum";
|
||||
repo = "go-ethereum";
|
||||
rev = "v${version}";
|
||||
sha256 = "123jkyb293z7ww3sa9ji5rw7xd229isi03k4ayyh5p7rr0dg8al0";
|
||||
sha256 = "0vm526gbyi8bygqwwki9hx7gf5g3xk2s1biyvwjidrydzj9i46zd";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
85
pkgs/applications/audio/cozy-audiobooks/default.nix
Normal file
85
pkgs/applications/audio/cozy-audiobooks/default.nix
Normal file
@ -0,0 +1,85 @@
|
||||
{ stdenv, fetchFromGitHub
|
||||
, ninja
|
||||
, boost
|
||||
, meson
|
||||
, pkgconfig
|
||||
, wrapGAppsHook
|
||||
, appstream-glib
|
||||
, desktop-file-utils
|
||||
, gtk3
|
||||
, gst_all_1
|
||||
, gobjectIntrospection
|
||||
, python3Packages
|
||||
, file
|
||||
, cairo
|
||||
, sqlite
|
||||
, gettext
|
||||
, gnome3
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
|
||||
format = "other"; # no setup.py
|
||||
|
||||
name = "cozy-${version}";
|
||||
version = "0.6.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "geigi";
|
||||
repo = "cozy";
|
||||
rev = version;
|
||||
sha256 = "0xs6vzvmx0nvybpjqlrngggv2x8b2ky073slh760iirs1p0dclbc";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson ninja pkgconfig
|
||||
wrapGAppsHook
|
||||
appstream-glib
|
||||
desktop-file-utils
|
||||
gobjectIntrospection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
cairo
|
||||
gettext
|
||||
gnome3.defaultIconTheme
|
||||
] ++ (with gst_all_1; [
|
||||
gstreamer
|
||||
gst-plugins-good
|
||||
gst-plugins-ugly
|
||||
gst-plugins-base
|
||||
]);
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
gst-python
|
||||
pygobject3
|
||||
dbus-python
|
||||
mutagen
|
||||
peewee
|
||||
magic
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
chmod +x data/meson_post_install.py
|
||||
patchShebangs data/meson_post_install.py
|
||||
substituteInPlace cozy/magic/magic.py --replace "ctypes.util.find_library('magic')" "'${file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
ninja test
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
ln -s $out/bin/com.github.geigi.cozy $out/bin/cozy
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = ''
|
||||
A modern audio book player for Linux using GTK+ 3
|
||||
'';
|
||||
homepage = https://cozy.geigi.de/;
|
||||
maintainers = [ maintainers.makefu ];
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
@ -2,11 +2,11 @@
|
||||
|
||||
pythonPackages.buildPythonApplication rec {
|
||||
pname = "Mopidy-Iris";
|
||||
version = "3.26.2";
|
||||
version = "3.27.1";
|
||||
|
||||
src = pythonPackages.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "04jg5k8znkn0iirfnsndm74f8mypj8zwj76j489l0m263k1kn715";
|
||||
sha256 = "00qlvfwfn7kybrx6rlj5h862syw3d5yak4sjqpxvacp7i5n1arsk";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -20,14 +20,14 @@ let
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
version = "3.0.1";
|
||||
version = "3.1.0";
|
||||
name = "sonic-pi-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "samaaron";
|
||||
repo = "sonic-pi";
|
||||
rev = "v${version}";
|
||||
sha256 = "1l1892hijp1dj2h799sfjr699q6xp660n0siibab5kv238521a81";
|
||||
sha256 = "0gi4a73szaa8iz5q1gxgpsnyvhhghcfqm6bfwwxbix4m5csbfgh9";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
@ -58,21 +58,21 @@ in stdenv.mkDerivation rec {
|
||||
export SONIC_PI_HOME=$TMPDIR
|
||||
export AUBIO_LIB=${aubio}/lib/libaubio.so
|
||||
|
||||
pushd app/server/bin
|
||||
pushd app/server/ruby/bin
|
||||
./compile-extensions.rb
|
||||
./i18n-tool.rb -t
|
||||
popd
|
||||
|
||||
pushd app/gui/qt
|
||||
cp -f ruby_help.tmpl ruby_help.h
|
||||
../../server/bin/qt-doc.rb -o ruby_help.h
|
||||
../../server/ruby/bin/qt-doc.rb -o ruby_help.h
|
||||
|
||||
substituteInPlace SonicPi.pro \
|
||||
--replace "LIBS += -lrt -lqt5scintilla2" \
|
||||
"LIBS += -lrt -lqscintilla2 -lqwt"
|
||||
|
||||
lrelease SonicPi.pro
|
||||
qmake SonicPi.pro
|
||||
qmake SonicPi.pro
|
||||
|
||||
make
|
||||
popd
|
||||
|
22
pkgs/applications/audio/spectmorph/default.nix
Normal file
22
pkgs/applications/audio/spectmorph/default.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ stdenv, fetchurl, pkgconfig, libjack2, lv2, glib, qt5, libao, cairo, libsndfile, fftwFloat }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "spectmorph-${version}";
|
||||
version = "0.4.1";
|
||||
src = fetchurl {
|
||||
url = "http://spectmorph.org/files/releases/${name}.tar.bz2";
|
||||
sha256 = "0z00yvv3jl8qsx6bz9msmg09mdnj5r5d4ws5bmnylwxk182whbrv";
|
||||
};
|
||||
|
||||
buildInputs = [ libjack2 lv2 glib qt5.qtbase libao cairo libsndfile fftwFloat ];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Allows to analyze samples of musical instruments, and to combine them (morphing) to construct hybrid sounds";
|
||||
homepage = http://spectmorph.org;
|
||||
license = licenses.gpl3;
|
||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
maintainers = [ maintainers.magnetophon ];
|
||||
};
|
||||
}
|
31
pkgs/applications/audio/spotifywm/default.nix
Normal file
31
pkgs/applications/audio/spotifywm/default.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ stdenv, fetchFromGitHub, spotify, xorg }:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "spotifywm-unstable-${version}";
|
||||
version = "2016-11-28";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dasJ";
|
||||
repo = "spotifywm";
|
||||
rev = "91dd5532ffb7a398d775abe94fe7781904ab406f";
|
||||
sha256 = "01z088i83410bpx1vbp7c6cq01r431v55l7340x3izp53lnpp379";
|
||||
};
|
||||
|
||||
buildInputs = [ xorg.libX11 ];
|
||||
|
||||
propagatedBuildInputs = [ spotify ];
|
||||
|
||||
installPhase = ''
|
||||
echo "#!${stdenv.shell}" > spotifywm
|
||||
echo "LD_PRELOAD="$out/lib/spotifywm.so" ${spotify}/bin/spotify \$*" >> spotifywm
|
||||
install -Dm644 spotifywm.so $out/lib/spotifywm.so
|
||||
install -Dm755 spotifywm $out/bin/spotifywm
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/dasJ/spotifywm;
|
||||
description = "Wrapper around Spotify that correctly sets class name before opening the window";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ jqueiroz ];
|
||||
};
|
||||
}
|
@ -8,9 +8,9 @@ let
|
||||
inherit (gnome2) GConf gnome_vfs;
|
||||
};
|
||||
stableVersion = {
|
||||
version = "3.2.0.26"; # "Android Studio 3.2.0"
|
||||
build = "181.5014246";
|
||||
sha256Hash = "0v1a3b0n8dq5p8f6jap2ypqw724v61ki31qhqmh9hn36mn6d8wg6";
|
||||
version = "3.2.1.0"; # "Android Studio 3.2.1"
|
||||
build = "181.5056338";
|
||||
sha256Hash = "117skqjax1xz9plarhdnrw2rwprjpybdc7mx7wggxapyy920vv5r";
|
||||
};
|
||||
betaVersion = stableVersion;
|
||||
latestVersion = { # canary & dev
|
||||
|
@ -228,6 +228,27 @@ rec {
|
||||
};
|
||||
eclipse_sdk_37 = eclipse-sdk-37; # backward compatibility, added 2016-01-30
|
||||
|
||||
### Eclipse Java
|
||||
|
||||
eclipse-java = eclipse-java-49;
|
||||
|
||||
eclipse-java-49 = buildEclipse {
|
||||
name = "eclipse-java-4.9.0";
|
||||
description = "Eclipse IDE for Java Developers";
|
||||
src =
|
||||
if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/2018-09/R/eclipse-java-2018-09-linux-gtk-x86_64.tar.gz;
|
||||
sha512 = "9dac5d040cdabf779de3996de87290e352130c7e860c1d0a98772f41da828ad45f90748b68e0a8a4f8d1ebbbbe5fdfe6401b7d871b93af34103d4a81a041c6a5";
|
||||
}
|
||||
else if stdenv.system == "i686-linux" then
|
||||
fetchurl {
|
||||
url = http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/2018-09/R/eclipse-java-2018-09-linux-gtk.tar.gz;
|
||||
sha512 = "24208e95b972e848d6b65ed8108d9e81584cf051397f2f43fb6269f5a625b8d7552ad77c7980a1a5653c87f06776e2926fd85607aae44e44657b4f6cc9b3e2e3";
|
||||
}
|
||||
else throw "Unsupported system: ${stdenv.system}";
|
||||
};
|
||||
|
||||
### Environments
|
||||
|
||||
# Function that assembles a complete Eclipse environment from an
|
||||
|
30
pkgs/applications/editors/emacs-modes/cedille/default.nix
Normal file
30
pkgs/applications/editors/emacs-modes/cedille/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ stdenv, cedille, emacs }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cedille-mode-${version}";
|
||||
version = cedille.version;
|
||||
|
||||
src = cedille.src;
|
||||
|
||||
buildInputs = [ emacs ];
|
||||
|
||||
buildPhase = ":";
|
||||
|
||||
installPhase = ''
|
||||
install -d $out/share/emacs/site-lisp
|
||||
install se-mode/*.el se-mode/*.elc $out/share/emacs/site-lisp
|
||||
install cedille-mode/*.el cedille-mode/*.elc $out/share/emacs/site-lisp
|
||||
install *.el *.elc $out/share/emacs/site-lisp
|
||||
substituteInPlace $out/share/emacs/site-lisp/cedille-mode.el \
|
||||
--replace /usr/bin/cedille ${cedille}/bin/cedille \
|
||||
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Emacs major mode for Cedille";
|
||||
homepage = cedille.meta.homepage;
|
||||
license = cedille.meta.license ;
|
||||
platforms = cedille.meta.platforms;
|
||||
maintainers = cedille.meta.maintainers;
|
||||
};
|
||||
}
|
@ -167,6 +167,12 @@ self:
|
||||
(attrs.nativeBuildInputs or []) ++ [ external.git ];
|
||||
});
|
||||
|
||||
magit-filenotify = super.magit-filenotify.overrideAttrs (attrs: {
|
||||
# searches for Git at build time
|
||||
nativeBuildInputs =
|
||||
(attrs.nativeBuildInputs or []) ++ [ external.git ];
|
||||
});
|
||||
|
||||
# missing OCaml
|
||||
merlin = markBroken super.merlin;
|
||||
|
||||
|
@ -157,6 +157,12 @@ self:
|
||||
(attrs.nativeBuildInputs or []) ++ [ external.git ];
|
||||
});
|
||||
|
||||
magit-filenotify = super.magit-filenotify.overrideAttrs (attrs: {
|
||||
# searches for Git at build time
|
||||
nativeBuildInputs =
|
||||
(attrs.nativeBuildInputs or []) ++ [ external.git ];
|
||||
});
|
||||
|
||||
# missing OCaml
|
||||
merlin = markBroken super.merlin;
|
||||
|
||||
|
@ -1,40 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
# This hook is supposed to be run on Linux. It patches the proper locations of
|
||||
# the crt{1,i,n}.o files into the build to ensure that Emacs is linked with
|
||||
# *our* versions, not the ones found in the system, as it would do by default.
|
||||
# On other platforms, this appears to be unnecessary.
|
||||
preConfigure() {
|
||||
./autogen.sh
|
||||
|
||||
for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in; do
|
||||
substituteInPlace $i --replace /bin/pwd pwd
|
||||
done
|
||||
|
||||
case "${system}" in
|
||||
x86_64-linux) glibclibdir=lib64 ;;
|
||||
i686-linux) glibclibdir=lib ;;
|
||||
*) return;
|
||||
esac
|
||||
|
||||
libc=$(cat ${NIX_CC}/nix-support/orig-libc)
|
||||
echo "libc: $libc"
|
||||
|
||||
for i in src/s/*.h src/m/*.h; do
|
||||
substituteInPlace $i \
|
||||
--replace /usr/${glibclibdir}/crt1.o $libc/${glibclibdir}/crt1.o \
|
||||
--replace /usr/${glibclibdir}/crti.o $libc/${glibclibdir}/crti.o \
|
||||
--replace /usr/${glibclibdir}/crtn.o $libc/${glibclibdir}/crtn.o \
|
||||
--replace /usr/lib/crt1.o $libc/${glibclibdir}/crt1.o \
|
||||
--replace /usr/lib/crti.o $libc/${glibclibdir}/crti.o \
|
||||
--replace /usr/lib/crtn.o $libc/${glibclibdir}/crtn.o
|
||||
done
|
||||
}
|
||||
|
||||
preInstall () {
|
||||
for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in; do
|
||||
substituteInPlace $i --replace /bin/pwd pwd
|
||||
done
|
||||
}
|
||||
|
||||
genericBuild
|
@ -9,8 +9,6 @@ stdenv.mkDerivation rec {
|
||||
macportVersion = "7.2";
|
||||
name = "emacs-mac-${emacsVersion}-${macportVersion}";
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/emacs/${emacsName}.tar.xz";
|
||||
sha256 = "0b6k1wq44rc8gkvxhi1bbjxbz3cwg29qbq8mklq2az6p1hjgrx0w";
|
||||
|
@ -3,12 +3,12 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ne-${version}";
|
||||
version = "3.1.1";
|
||||
version = "3.1.2";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vigna";
|
||||
repo = "ne";
|
||||
rev = version;
|
||||
sha256 = "1i4vk5r2wn4cd6sgsidzqs9s3bmb4j9cn4392izkidi0j9mm3hvg";
|
||||
sha256 = "154grh9gdzydnqn9xxj7zpia9cc5x6a7y1g73vwizr9bkg92l5cc";
|
||||
};
|
||||
buildInputs = [ ncurses texlive.combined.scheme-medium texinfo perl ghostscript ];
|
||||
dontBuild = true;
|
||||
|
@ -1,14 +1,15 @@
|
||||
{ stdenv, fetchurl, fetchpatch, gdal, cmake, qt4, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl
|
||||
, qwt, fcgi, python2Packages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper
|
||||
, qjson, qca2, txt2tags, openssl, darwin, pkgconfig
|
||||
, withGrass ? true, grass, IOKit, ApplicationServices
|
||||
, withGrass ? true, grass, saga, IOKit, ApplicationServices
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "qgis-2.18.22";
|
||||
|
||||
buildInputs = [ gdal qt4 flex openssl bison proj geos xlibsWrapper sqlite gsl qwt qscintilla
|
||||
fcgi libspatialindex libspatialite postgresql qjson qca2 txt2tags pkgconfig ]
|
||||
fcgi libspatialindex libspatialite postgresql qjson qca2 txt2tags pkgconfig
|
||||
saga ]
|
||||
++
|
||||
(stdenv.lib.optionals stdenv.isDarwin [IOKit ApplicationServices])
|
||||
++
|
||||
@ -68,6 +69,8 @@ stdenv.mkDerivation rec {
|
||||
# Necessary for QGIS to find the correct default GRASS path
|
||||
# Plugins look for gdal tools like deminfo on the PATH
|
||||
${stdenv.lib.optionalString withGrass "ln -sf ${grass} $out/QGIS.app/Contents/MacOS/grass"}
|
||||
# Necessary for QGIS to find the right SAGA installation
|
||||
ln -sf ${saga}/bin/saga_cmd $out/QGIS.app/Contents/MacOS/bin/saga_cmd
|
||||
for file in $(find $out -type f -name "QGIS"); do
|
||||
wrapProgram "$file" \
|
||||
--prefix DYLD_LIBRARY_PATH : "${qwt}/lib" \
|
||||
|
19
pkgs/applications/gis/saga/clang_patch.patch
Normal file
19
pkgs/applications/gis/saga/clang_patch.patch
Normal file
@ -0,0 +1,19 @@
|
||||
commit e92b250968e9656084ab5984689747ca615ff6e7
|
||||
Author: Volker Wichmann <wichmann@laserdata.at>
|
||||
Date: Sun Mar 5 13:49:53 2017 +0100
|
||||
|
||||
saga_api, CSG_Table::Del_Records(): bug fix, check record count correctly
|
||||
|
||||
diff --git a/src/saga_core/saga_api/table.cpp b/src/saga_core/saga_api/table.cpp
|
||||
index 76a1d8d..fa1a66f 100644
|
||||
--- a/src/saga_core/saga_api/table.cpp
|
||||
+++ b/src/saga_core/saga_api/table.cpp
|
||||
@@ -901,7 +901,7 @@ bool CSG_Table::Del_Record(int iRecord)
|
||||
//---------------------------------------------------------
|
||||
bool CSG_Table::Del_Records(void)
|
||||
{
|
||||
- if( m_Records > 0 )
|
||||
+ if( m_nRecords > 0 )
|
||||
{
|
||||
_Index_Destroy();
|
||||
|
@ -1,23 +1,33 @@
|
||||
{ stdenv, fetchurl, gdal, wxGTK30, proj, libiodbc, lzma, jasper,
|
||||
libharu, opencv, vigra, postgresql }:
|
||||
libharu, opencv, vigra, postgresql, Cocoa,
|
||||
unixODBC , poppler, hdf4, hdf5, netcdf, sqlite, qhull, giflib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "saga-6.3.0";
|
||||
|
||||
buildInputs = [ gdal wxGTK30 proj libharu opencv vigra postgresql libiodbc lzma jasper ];
|
||||
# See https://groups.google.com/forum/#!topic/nix-devel/h_vSzEJAPXs
|
||||
# for why the have additional buildInputs on darwin
|
||||
buildInputs = [ gdal wxGTK30 proj libharu opencv vigra postgresql libiodbc lzma
|
||||
jasper qhull giflib ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin
|
||||
[ Cocoa unixODBC poppler hdf4.out hdf5 netcdf sqlite ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patches = [ ./finite-6.3.0.patch];
|
||||
|
||||
CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11 -Wno-narrowing";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/saga-gis/SAGA%20-%206/SAGA%20-%206.3.0/saga-6.3.0.tar.gz";
|
||||
sha256 = "0hyjim8fcp3mna1hig22nnn4ki3j6b7096am2amcs99sdr09jjxv";
|
||||
};
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "System for Automated Geoscientific Analyses";
|
||||
homepage = http://www.saga-gis.org;
|
||||
license = stdenv.lib.licenses.gpl2Plus;
|
||||
maintainers = [ stdenv.lib.maintainers.michelk ];
|
||||
platforms = ["x86_64-linux" ];
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ michelk mpickering ];
|
||||
platforms = with platforms; unix;
|
||||
};
|
||||
}
|
||||
|
55
pkgs/applications/gis/saga/finite-6.3.0.patch
Normal file
55
pkgs/applications/gis/saga/finite-6.3.0.patch
Normal file
@ -0,0 +1,55 @@
|
||||
diff --git a/src/tools/imagery/imagery_maxent/me.cpp b/src/tools/imagery/imagery_maxent/me.cpp
|
||||
index c5da854..d3e9cff 100755
|
||||
--- a/src/tools/imagery/imagery_maxent/me.cpp
|
||||
+++ b/src/tools/imagery/imagery_maxent/me.cpp
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifdef _SAGA_MSW
|
||||
#define isinf(x) (!_finite(x))
|
||||
#else
|
||||
-#define isinf(x) (!finite(x))
|
||||
+#define isinf(x) (!isfinite(x))
|
||||
#endif
|
||||
|
||||
/** The input array contains a set of log probabilities lp1, lp2, lp3
|
||||
@@ -47,7 +47,7 @@ double sumLogProb(vector<double>& logprobs)
|
||||
/** returns log (e^logprob1 + e^logprob2). */
|
||||
double sumLogProb(double logprob1, double logprob2)
|
||||
{
|
||||
- if (isinf(logprob1) && isinf(logprob2))
|
||||
+ if (isinf(logprob1) && isinf(logprob2))
|
||||
return logprob1; // both prob1 and prob2 are 0, return log 0.
|
||||
if (logprob1>logprob2)
|
||||
return logprob1+log(1+exp(logprob2-logprob1));
|
||||
@@ -70,8 +70,8 @@ void MaxEntModel::print(ostream& ostrm, MaxEntTrainer& trainer)
|
||||
for (FtMap::iterator it = _index.begin(); it!=_index.end(); it++) {
|
||||
unsigned long i = it->second;
|
||||
for (unsigned long c = 0; c<_classes; c++) {
|
||||
- ostrm << "lambda(" << trainer.className(c) << ", "
|
||||
- << trainer.getStr(it->first) << ")="
|
||||
+ ostrm << "lambda(" << trainer.className(c) << ", "
|
||||
+ << trainer.getStr(it->first) << ")="
|
||||
<< _lambda[i+c] << endl;
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,7 @@ int MaxEntModel::getProbs(MaxEntEvent& event, vector<double>& probs)
|
||||
double s = 0;
|
||||
for (unsigned int f = 0; f<event.size(); f++) {
|
||||
FtMap::iterator it = _index.find(event[f]);
|
||||
- if (it!=_index.end())
|
||||
+ if (it!=_index.end())
|
||||
s += _lambda[it->second+c];
|
||||
}
|
||||
probs[c] = s;
|
||||
@@ -142,10 +142,10 @@ double MaxEntModel::getObsCounts(EventSet& events, vector<double>& obsCounts)
|
||||
double ftSum = 0;
|
||||
for (unsigned long j=0; j<e.size(); j++) {
|
||||
FtMap::iterator it = _index.find(e[j]);
|
||||
- if (it!=_index.end())
|
||||
+ if (it!=_index.end())
|
||||
obsCounts[it->second+c] += count;
|
||||
else { // new feature, need to expand obsCounts and _lambda
|
||||
- for (unsigned int k = 0; k<_classes; k++)
|
||||
+ for (unsigned int k = 0; k<_classes; k++)
|
||||
obsCounts.push_back(0);
|
||||
obsCounts[_lambda.size()+c] += count;
|
||||
addFeature(e[j]);
|
13
pkgs/applications/gis/saga/finite.patch
Normal file
13
pkgs/applications/gis/saga/finite.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/saga-gis/src/modules/imagery/imagery_maxent/me.cpp b/saga-gis/src/modules/imagery/imagery_maxent/me.cpp
|
||||
index c5da854..d3e9cff 100755
|
||||
--- a/src/modules/imagery/imagery_maxent/me.cpp
|
||||
+++ b/src/modules/imagery/imagery_maxent/me.cpp
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifdef _SAGA_MSW
|
||||
#define isinf(x) (!_finite(x))
|
||||
#else
|
||||
-#define isinf(x) (!finite(x))
|
||||
+#define isinf(x) (!isfinite(x))
|
||||
#endif
|
||||
|
||||
/** The input array contains a set of log probabilities lp1, lp2, lp3
|
36
pkgs/applications/gis/saga/lts.nix
Normal file
36
pkgs/applications/gis/saga/lts.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{ stdenv, fetchgit, gdal, wxGTK30, proj, libiodbc, lzma, jasper,
|
||||
libharu, opencv, vigra, postgresql, autoreconfHook, Cocoa
|
||||
, unixODBC , poppler, hdf4, hdf5, netcdf, sqlite, qhull, giflib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "saga-2.3.2";
|
||||
|
||||
# See https://groups.google.com/forum/#!topic/nix-devel/h_vSzEJAPXs
|
||||
# for why the have additional buildInputs on darwin
|
||||
buildInputs = [ autoreconfHook gdal wxGTK30 proj libharu opencv vigra
|
||||
postgresql libiodbc lzma jasper
|
||||
unixODBC poppler hdf4.out hdf5 netcdf sqlite qhull giflib ]
|
||||
++ stdenv.lib.optional stdenv.isDarwin Cocoa ;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11 -Wno-narrowing";
|
||||
|
||||
sourceRoot = "code-b6f474f/saga-gis";
|
||||
|
||||
patches = [ ./clang_patch.patch ./finite.patch];
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://git.code.sf.net/p/saga-gis/code.git";
|
||||
rev = "b6f474f8af4af7f0ff82548cc6f88c53547d91f5";
|
||||
sha256 = "0iakynai8mhcwj6wxvafkqhd7b417ss7hyhbcp9wf6092l6vc2zd";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "System for Automated Geoscientific Analyses";
|
||||
homepage = http://www.saga-gis.org;
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = [ maintainers.mpickering ];
|
||||
platforms = with platforms; unix;
|
||||
};
|
||||
}
|
@ -3,13 +3,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "goxel-${version}";
|
||||
version = "0.8.0";
|
||||
version = "0.8.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "guillaumechereau";
|
||||
repo = "goxel";
|
||||
rev = "v${version}";
|
||||
sha256 = "01022c43pmwiqb18rx9fz08xr99h6p03gw6bp0lay5z61g3xkz17";
|
||||
sha256 = "0g6jkihjmsx6lyfl301qrq26gwvq89sk7xkkba6vrpklfs2jafkb";
|
||||
};
|
||||
|
||||
patches = [ ./disable-imgui_ini.patch ];
|
||||
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
||||
description = "Open Source 3D voxel editor";
|
||||
homepage = https://guillaumechereau.github.io/goxel/;
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
platforms = [ "x86_64-linux" ]; # see https://github.com/guillaumechereau/goxel/issues/125
|
||||
maintainers = with maintainers; [ tilpner ];
|
||||
};
|
||||
}
|
||||
|
@ -10,11 +10,11 @@
|
||||
|
||||
mkDerivation rec {
|
||||
name = "krita-${version}";
|
||||
version = "4.1.1";
|
||||
version = "4.1.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.kde.org/stable/krita/${version}/${name}.tar.gz";
|
||||
sha256 = "1qz9bjvnwa5gc2b0063i2p72jq6y1b6kgqdj39599acp7ws11asw";
|
||||
sha256 = "0d546dxs552z0pxnaka1jm7ksravw17f777wf593z0pl4ds8dgdx";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake extra-cmake-modules ];
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "rapid-photo-downloader";
|
||||
version = "0.9.10";
|
||||
version = "0.9.12";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://launchpad.net/rapid/pyqt/${version}/+download/${pname}-${version}.tar.gz";
|
||||
sha256 = "1i0lfj9gnfya49gxx59ls364z651fqagd4krnz9jhg9m0l48ljdf";
|
||||
sha256 = "0nzahps7hs120xv2r55k293kialf83nx44x3jg85yh349rpqrii8";
|
||||
};
|
||||
|
||||
# Disable version check and fix install tests
|
||||
|
@ -52,6 +52,9 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out/share/doc/apvlv/
|
||||
cp ../Startup.pdf $out/share/doc/apvlv/Startup.pdf
|
||||
cp ../main_menubar.glade $out/share/doc/apvlv/main_menubar.glade
|
||||
''
|
||||
+ stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
install -D ../apvlv.desktop $out/share/applications/apvlv.desktop
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -4,11 +4,11 @@ with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
name = "cherrytree-${version}";
|
||||
version = "0.38.5";
|
||||
version = "0.38.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.giuspen.com/software/${name}.tar.xz";
|
||||
sha256 = "1ja3b14vm3yd26pf82p2qlld0flqkqvgdg2g33r5dav6wfq3pz6y";
|
||||
sha256 = "0b83ygv0y4lrclsyagmllkwiia62xkwij14i6z53avba191jvhma";
|
||||
};
|
||||
|
||||
buildInputs = with pythonPackages;
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dbeaver-ce-${version}";
|
||||
version = "5.2.1";
|
||||
version = "5.2.2";
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "dbeaver";
|
||||
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz";
|
||||
sha256 = "0zm320cdpypv2s58gcg89mdkir9xpz1824dscfqkmahx89g1ma81";
|
||||
sha256 = "1rrj0c7ksvv9irsz9hb4ip30qgmzps4dy1nj4vl8mzzf389xa43n";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
@ -1,14 +1,14 @@
|
||||
{stdenv, fetchFromGitHub, python}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.7";
|
||||
version = "3.7.1";
|
||||
name = "googler-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jarun";
|
||||
repo = "googler";
|
||||
rev = "v${version}";
|
||||
sha256 = "0dxg849ckyy181zlrb57hd959cgvx105c35ksmvi4wl285sh5kpj";
|
||||
sha256 = "0dcszpz85h3yjnr55ixf8mzsdv46w3g27frhgcsl5zlsgk6vl8kw";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ python ];
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
||||
{ stdenv, buildGoPackage, fetchFromGitHub, fetchpatch }:
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "hugo-${version}";
|
||||
@ -13,6 +13,13 @@ buildGoPackage rec {
|
||||
sha256 = "0n27vyg66jfx4lwswsmdlybly8c9gy5rk7yhy7wzs3rwzlqv1jzj";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gohugoio/hugo/commit/b137ad4dbd6d14d0a9af68c044aaee61f2c87fe5.diff";
|
||||
sha256 = "0w1gpg11idqywqcpwzvx4xabn02kk8y4jmyz4h67mc3yh2dhq3ll";
|
||||
})
|
||||
];
|
||||
|
||||
goDeps = ./deps.nix;
|
||||
|
||||
buildFlags = "-tags extended";
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "josm-${version}";
|
||||
version = "14178";
|
||||
version = "14289";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
|
||||
sha256 = "08an4s8vbcd8vyinnvd7cxmgnrsy47j78a94nk6vq244gp7v5n0r";
|
||||
sha256 = "102dph3479qskzf72cpb9139pq9ifka6pzna1c6s5rs2il6mfvsb";
|
||||
};
|
||||
|
||||
buildInputs = [ jre10 makeWrapper ];
|
||||
|
@ -18,11 +18,11 @@ let
|
||||
|
||||
in with python.pkgs; buildPythonApplication rec {
|
||||
pname = "khal";
|
||||
version = "0.9.9";
|
||||
version = "0.9.10";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0dq9aqb9pqjfqrnfg43mhpb7m0szmychxy1ydb3lwzf3500c9rsh";
|
||||
sha256 = "03h0j0d3xyqh98x5v2gv63wv3g91hip3vsaxvybsn5iz331d23h4";
|
||||
};
|
||||
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
|
@ -1,22 +1,27 @@
|
||||
{ stdenv, fetchurl, sane-backends, qtbase, qtsvg, nss, autoPatchelfHook }:
|
||||
{ stdenv, fetchurl, sane-backends, qtbase, qtsvg, nss, autoPatchelfHook, lib, makeWrapper }:
|
||||
|
||||
let
|
||||
version = "5.1.12";
|
||||
version = "5.1.60";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "masterpdfeditor-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://code-industry.net/public/master-pdf-editor-${version}_qt5.amd64.tar.gz";
|
||||
sha256 = "1i3pdrhnlj06phm36gs42s6b94pigcfb8wa5dhmplxn0dqp434hq";
|
||||
sha256 = "0br5f04klzpbd25igbjjj1dqasmrcrw2zsan5bv0ydnr2lmpb2fz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
||||
|
||||
buildInputs = [ nss qtbase qtsvg sane-backends stdenv.cc.cc ];
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
# Please remove this when #44047 is fixed
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/masterpdfeditor5 --prefix QT_PLUGIN_PATH : ${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
{ stdenv, fetchFromGitHub, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.0.14";
|
||||
version = "1.0.15";
|
||||
name = "mdp-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "visit1985";
|
||||
repo = "mdp";
|
||||
rev = version;
|
||||
sha256 = "1nljb2bkk7kswywvvn3b2k6q14bh2jnwm8cypax3mwssjmid78af";
|
||||
sha256 = "1m9a0vvyw2m55cn7zcq011vrjkiaj5a3g5g6f2dpq953gyi7gff9";
|
||||
};
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
40
pkgs/applications/misc/omegat.nix
Normal file
40
pkgs/applications/misc/omegat.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{ stdenv, fetchurl, unzip, jdk, makeWrapper}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "4.1.5.2";
|
||||
name = "omegat";
|
||||
|
||||
src = fetchurl { # their zip has repeated files or something, so no fetchzip
|
||||
url = mirror://sourceforge/project/omegat/OmegaT%20-%20Latest/OmegaT%204.1.5%20update%202/OmegaT_4.1.5_02_Beta_Without_JRE.zip;
|
||||
sha256 = "1mdnsvjgsccpd5xwpqzgva5jjp8yd1akq9aqpild4v6k70lqql2b";
|
||||
};
|
||||
|
||||
buildInputs = [ unzip makeWrapper ];
|
||||
|
||||
unpackCmd = "unzip -o $curSrc"; # tries to go interactive without -o
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -r lib docs images plugins scripts *.txt *.html OmegaT.jar $out/
|
||||
|
||||
cat > $out/bin/omegat <<EOF
|
||||
#! $SHELL -e
|
||||
CLASSPATH="$out/lib"
|
||||
exec ${jdk}/bin/java -jar -Xmx1024M $out/OmegaT.jar "\$@"
|
||||
EOF
|
||||
chmod +x $out/bin/omegat
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "The free computer aided translation (CAT) tool for professionals";
|
||||
longDescription = ''
|
||||
OmegaT is a free and open source multiplatform Computer Assisted Translation
|
||||
tool with fuzzy matching, translation memory, keyword search, glossaries, and
|
||||
translation leveraging into updated projects.
|
||||
'';
|
||||
homepage = http://www.omegat.org/;
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ t184256 ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
};
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
{ lib, buildPythonApplication, fetchPypi, pythonPackages, ffmpeg }:
|
||||
|
||||
buildPythonApplication rec {
|
||||
version = "1.4.0";
|
||||
version = "1.4.1";
|
||||
pname = "sigal";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit version pname;
|
||||
sha256 = "0da0n8jhjp2swr18zga87xc77r8c7qwqf5sp222ph9sn3yyyc35i";
|
||||
sha256 = "1fg32ii26j3xpq3cryi212lx9z33qnicm1cszwv1wfpg6sr2rr61";
|
||||
};
|
||||
|
||||
buildInputs = with pythonPackages; [ pytest ];
|
||||
|
59
pkgs/applications/misc/taskell/default.nix
Normal file
59
pkgs/applications/misc/taskell/default.nix
Normal file
@ -0,0 +1,59 @@
|
||||
{ haskell, lib, haskellPackages, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
version = "1.3.2";
|
||||
sha256 = "0cyysvkl8m1ldlprmw9mpvch3r244nl25yv74dwcykga3g5mw4aa";
|
||||
|
||||
in (haskellPackages.mkDerivation {
|
||||
pname = "taskell";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "smallhadroncollider";
|
||||
repo = "taskell";
|
||||
rev = version;
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
postPatch = ''${haskellPackages.hpack}/bin/hpack'';
|
||||
|
||||
# basically justStaticExecutables; TODO: use justStaticExecutables
|
||||
enableSharedExecutables = false;
|
||||
enableLibraryProfiling = false;
|
||||
isExecutable = true;
|
||||
doHaddock = false;
|
||||
postFixup = "rm -rf $out/lib $out/nix-support $out/share/doc";
|
||||
|
||||
# copied from packages.yaml
|
||||
libraryHaskellDepends = with haskellPackages; [
|
||||
classy-prelude
|
||||
# base <=5
|
||||
aeson
|
||||
brick
|
||||
# bytestring
|
||||
config-ini
|
||||
# containers
|
||||
# directory
|
||||
file-embed
|
||||
http-conduit
|
||||
http-client
|
||||
http-types
|
||||
lens
|
||||
# mtl
|
||||
# template-haskell
|
||||
# text
|
||||
time
|
||||
vty
|
||||
];
|
||||
|
||||
executableHaskellDepends = [];
|
||||
|
||||
testHaskellDepends = with haskellPackages; [
|
||||
tasty
|
||||
tasty-discover
|
||||
tasty-expected-failure
|
||||
tasty-hunit
|
||||
];
|
||||
|
||||
license = lib.licenses.bsd3;
|
||||
})
|
@ -6,11 +6,11 @@ with stdenv.lib;
|
||||
buildPythonApplication rec {
|
||||
|
||||
name = "termdown-${version}";
|
||||
version = "1.11.0";
|
||||
version = "1.14.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
rev = "d1e3504e02ad49013595112cb03fbf175822e58d";
|
||||
sha256 = "1i6fxymg52q95n0cbm4imdxh6yvpj3q57yf7w9z5d9pr35cf1iq5";
|
||||
rev = version;
|
||||
sha256 = "0jgjzglna0gwp0j31l48pny69szslczl13aahwjfjypkv9lx8w2a";
|
||||
repo = "termdown";
|
||||
owner = "trehn";
|
||||
};
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
name = "urh-${version}";
|
||||
version = "2.2.4";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jopohl";
|
||||
repo = "urh";
|
||||
rev = "v${version}";
|
||||
sha256 = "1afmja4cffyw0ipx7zm93wvjmz0v5ccl7vcw2r18kdzrs1mr99zl";
|
||||
sha256 = "1n105lwz8w5fiw93w9amasq0f4gknihl3x9kj0q77lw7ha1lvdfz";
|
||||
};
|
||||
|
||||
buildInputs = [ hackrf rtl-sdr ];
|
||||
|
@ -7,11 +7,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "workrave-${version}";
|
||||
version = "1.10.21";
|
||||
version = "1.10.23";
|
||||
|
||||
src = let
|
||||
in fetchFromGitHub {
|
||||
sha256 = "150qca8c552fakjlzkgarsxgp87l1xcwn19svqsa9d0cygqxjgia";
|
||||
sha256 = "1qhlwfhwk5agv4904d6bsf83k9k89q7bms6agg967vsca4905vcw";
|
||||
rev = with stdenv.lib;
|
||||
"v" + concatStringsSep "_" (splitString "." version);
|
||||
repo = "workrave";
|
||||
|
@ -140,8 +140,26 @@ let
|
||||
./patches/fix-freetype.patch
|
||||
./patches/nix_plugin_paths_68.patch
|
||||
./patches/remove-webp-include-69.patch
|
||||
] ++ optional enableWideVine ./patches/widevine.patch;
|
||||
|
||||
] ++ optional enableWideVine ./patches/widevine.patch
|
||||
++ optional ((versionRange "69" "70") && stdenv.isAarch64)
|
||||
(fetchpatch {
|
||||
url = https://raw.githubusercontent.com/OSSystems/meta-browser/e4a667deaaf9a26a3a1aeb355770d1f29da549ad/recipes-browser/chromium/files/0001-vpx_sum_squares_2d_i16_neon-Make-s2-a-uint64x1_t.patch;
|
||||
sha256 = "0f37rsjx7jcvdngkj8y6600091nwgn4jci0ny7bxlapq0zx2a4x7";
|
||||
})
|
||||
++ optional stdenv.isAarch64
|
||||
(if (versionOlder version "71") then
|
||||
fetchpatch {
|
||||
url = https://raw.githubusercontent.com/OSSystems/meta-browser/e4a667deaaf9a26a3a1aeb355770d1f29da549ad/recipes-browser/chromium/files/aarch64-skia-build-fix.patch;
|
||||
sha256 = "0dkchqair8cy2f5a5p5vi24r9b4d28pgn2bfvm1568lypbjw6iab";
|
||||
}
|
||||
else
|
||||
fetchpatch {
|
||||
url = https://raw.githubusercontent.com/OSSystems/meta-browser/e4a667deaaf9a26a3a1aeb355770d1f29da549ad/recipes-browser/chromium/files/aarch64-skia-build-fix.patch;
|
||||
postFetch = "substituteInPlace $out --replace __aarch64__ SK_CPU_ARM64";
|
||||
sha256 = "018fbdzyw9rvia8m0qkk5gv8q8gl7x34rrjbn7mi1fgxdsayn22s";
|
||||
}
|
||||
);
|
||||
|
||||
postPatch = ''
|
||||
# We want to be able to specify where the sandbox is via CHROME_DEVEL_SANDBOX
|
||||
substituteInPlace sandbox/linux/suid/client/setuid_sandbox_host.cc \
|
||||
|
@ -94,6 +94,8 @@ let
|
||||
envVars.NIX_CHROMIUM_PLUGIN_PATH_WIDEVINE = "@out@/lib";
|
||||
}}
|
||||
'';
|
||||
|
||||
meta.platforms = platforms.x86_64;
|
||||
};
|
||||
|
||||
flash = stdenv.mkDerivation rec {
|
||||
@ -133,6 +135,8 @@ let
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
meta.platforms = platforms.x86_64;
|
||||
};
|
||||
|
||||
in {
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -28,12 +28,12 @@ let
|
||||
|
||||
in python3Packages.buildPythonApplication rec {
|
||||
pname = "qutebrowser";
|
||||
version = "1.4.2";
|
||||
version = "1.5.1";
|
||||
|
||||
# the release tarballs are different from the git checkout!
|
||||
src = fetchurl {
|
||||
url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1pnj47mllg1x34qakxs7s59x8mj262nfhdxgihsb2h2ywjq4fpgx";
|
||||
sha256 = "1yn181gscj04ni58swk6cmggn047q29siqwgn66pvxhfdf0ny7fq";
|
||||
};
|
||||
|
||||
# Needs tox
|
||||
|
32
pkgs/applications/networking/cluster/luigi/default.nix
Normal file
32
pkgs/applications/networking/cluster/luigi/default.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ lib, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "luigi";
|
||||
version = "2.7.9";
|
||||
|
||||
src = python3Packages.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "035w8gqql36zlan0xjrzz9j4lh9hs0qrsgnbyw07qs7lnkvbdv9x";
|
||||
};
|
||||
|
||||
# Relax version constraint
|
||||
postPatch = ''
|
||||
sed -i 's/<2.2.0//' setup.py
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ tornado_4 pythondaemon ];
|
||||
|
||||
# Requires tox, hadoop, and google cloud
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = https://github.com/spotify/luigi;
|
||||
description = "Python package that helps you build complex pipelines of batch jobs";
|
||||
longDescription = ''
|
||||
Luigi handles dependency resolution, workflow management, visualization,
|
||||
handling failures, command line integration, and much more.
|
||||
'';
|
||||
license = [ licenses.asl20 ];
|
||||
maintainers = [ maintainers.bhipple ];
|
||||
};
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
# USAGE:
|
||||
# install the following package globally or in nix-shell:
|
||||
#
|
||||
# (terraform.withPlugins (old: [terraform-provider-libvirt]))
|
||||
# (terraform.withPlugins (p: [p.libvirt]))
|
||||
#
|
||||
# configuration.nix:
|
||||
#
|
||||
@ -36,6 +36,10 @@ buildGoPackage rec {
|
||||
# and wrapped to terraform via deecb4c1aab780047d79978c636eeb879dd68630
|
||||
propagatedBuildInputs = [ cdrtools ];
|
||||
|
||||
# Terraform allow checking the provider versions, but this breaks
|
||||
# if the versions are not provided via file paths.
|
||||
postBuild = "mv go/bin/terraform-provider-libvirt{,_v${version}}";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/dmacvicar/terraform-provider-libvirt;
|
||||
description = "Terraform provider for libvirt";
|
||||
|
@ -36,11 +36,11 @@ with python'.pkgs;
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "FlexGet";
|
||||
version = "2.15.1";
|
||||
version = "2.16.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0c0qyafm01j94m9vky6x4k6j6g3nygzhgm79fb25brc2fyydkm3c";
|
||||
sha256 = "1b9nyrg1r69kmwhpmw9pxdrwa9pnw5mphpdlki85cpxiii2sms9j";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
name = "gmailieer-${version}";
|
||||
version = "0.9";
|
||||
version = "0.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gauteh";
|
||||
repo = "gmailieer";
|
||||
rev = "v${version}";
|
||||
sha256 = "1ixs5hip37hzcxwi2gsxp34r914f1wrl4r3swxqmzln3a15kngsk";
|
||||
sha256 = "0qv74marzdv99xc2jbzzcwx3b2hm6byjl734h9x42g4mcg5pq9yf";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
|
@ -3,11 +3,11 @@
|
||||
, gsm, speex, portaudio, spandsp, libuuid, ccache, libvpx
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.5.10";
|
||||
version = "0.5.11";
|
||||
name = "baresip-${version}";
|
||||
src=fetchurl {
|
||||
url = "http://www.creytiv.com/pub/baresip-${version}.tar.gz";
|
||||
sha256 = "1yx721qnyhgk2lna1p6iwndl767cy0ss5zcwhyjccgqd848b0grr";
|
||||
sha256 = "1pv2fllg5z6q524k7dyqwm41kaj6bh2xjqg98p6v25n31v3gvy04";
|
||||
};
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [zlib openssl libre librem cairo mpg123
|
||||
|
@ -3,13 +3,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "rambox-bare-${version}";
|
||||
version = "0.5.17";
|
||||
version = "0.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "saenzramiro";
|
||||
repo = "rambox";
|
||||
rev = version;
|
||||
sha256 = "18adga0symhb825db80l4c7kjl3lzzh54p1qibqsfa087rjxx9ay";
|
||||
sha256 = "1cyxxgcv0qvm1la8yl5ag3j11spw7zvnj75zpf9c1y33pqmp44yc";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ nodejs-8_x ruby sencha ];
|
||||
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||
inherit src;
|
||||
|
||||
nodejs = nodejs-8_x;
|
||||
sha256 = "1v7zwp8vs2pgy04qi92lvnxgfwkyxbid04lab8925wg1pvm2pk3k";
|
||||
sha256 = "0mg1ilz65qyxgh5zg1f8fhx7ygz10w8ifamflpwbk8mrvqpkjlvr";
|
||||
};
|
||||
|
||||
patches = [ ./isDev.patch ];
|
||||
|
@ -3,11 +3,11 @@
|
||||
let configFile = writeText "riot-config.json" conf; in
|
||||
stdenv.mkDerivation rec {
|
||||
name= "riot-web-${version}";
|
||||
version = "0.16.2";
|
||||
version = "0.16.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/vector-im/riot-web/releases/download/v${version}/riot-v${version}.tar.gz";
|
||||
sha256 = "14k8hsz2i1nd126jprvi45spdxawk4c8nb3flkrg7rmjdp5sski2";
|
||||
sha256 = "1b82d82pfv4kjdxghc8y78zwmnc89hi7arvql2bx0zyfhzxj6drl";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
@ -56,11 +56,11 @@ let
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "signal-desktop-${version}";
|
||||
version = "1.16.2";
|
||||
version = "1.16.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
|
||||
sha256 = "1j1785sc8pmrhi8yhlv4brxn7zrd33skgkkvzfl60nqkh2nybh3y";
|
||||
sha256 = "1fhs3408i8f80z5rlchrc3gwm0481rxqb5jk37gb8ip94zf97hsf";
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
@ -6,7 +6,7 @@ let
|
||||
|
||||
# Please keep the version x.y.0.z and do not update to x.y.76.z because the
|
||||
# source of the latter disappears much faster.
|
||||
version = "8.28.0.41";
|
||||
version = "8.32.0.44";
|
||||
|
||||
rpath = stdenv.lib.makeLibraryPath [
|
||||
alsaLib
|
||||
@ -56,7 +56,7 @@ let
|
||||
if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb";
|
||||
sha256 = "1kydf71qbz35dx4674h3nxfx8a88k620217906i54ic4qq2mgy2x";
|
||||
sha256 = "0yzh4bmv8mrfp0ml9nhcpcy0lhi8jp1fnmnxy0krvnphkp8750c7";
|
||||
}
|
||||
else
|
||||
throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}";
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, fetchurl, makeWrapper }:
|
||||
|
||||
let
|
||||
version = "3.3.0";
|
||||
version = "3.4.0";
|
||||
arch = if stdenv.is64bit then "amd64" else "x86";
|
||||
libDir = if stdenv.is64bit then "lib64" else "lib";
|
||||
in
|
||||
@ -15,8 +15,8 @@ stdenv.mkDerivation {
|
||||
"http://teamspeak.gameserver.gamed.de/ts3/releases/${version}/teamspeak3-server_linux_${arch}-${version}.tar.bz2"
|
||||
];
|
||||
sha256 = if stdenv.is64bit
|
||||
then "1jv5c1br3ypxz8px7fl5rg75j0kfdg8mqasdk2gka6yvgf7qc97i"
|
||||
else "0m889xl9iz3fmq7wyjjn42swprpspagbkn52a82nzkhgvagd45bz";
|
||||
then "12wis5sbbx502g86irhi3g2gvpczbxzjw7z0lw9rk7jagplwhvkx"
|
||||
else "01ajiqizy4f8niqipxccimvvsqlfypr4a28rwxk6zran7m1kjpp6";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
@ -4,8 +4,8 @@ let
|
||||
mkTelegram = args: qt5.callPackage (import ./generic.nix args) { };
|
||||
stableVersion = {
|
||||
stable = true;
|
||||
version = "1.4.2";
|
||||
sha256Hash = "025qld597b6x7wbf1y1qpcsz0brpf3qsqj650mq9fpps1yi1vfk7";
|
||||
version = "1.4.3";
|
||||
sha256Hash = "1pvjvndqc7ylgc8ihf20fl1vb1x6fj7ywl6p1fr16j683vhdcml8";
|
||||
# svn log svn://svn.archlinux.org/community/telegram-desktop/trunk
|
||||
archPatchesRevision = "388730";
|
||||
archPatchesHash = "1gvisz36bc6bl4zcpjyyk0a2dl6ixp65an8wgm2lkc9mhkl783q7";
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "imapfilter-${version}";
|
||||
version = "2.6.11";
|
||||
version = "2.6.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lefcha";
|
||||
repo = "imapfilter";
|
||||
rev = "v${version}";
|
||||
sha256 = "0cjnp7vqmgqym2zswabkmwlbj21r063vw7wkwxglj08z5qyjl5ps";
|
||||
sha256 = "0vzpc54fjf5vb5vx5w0fl20xvx1k9cg6a3hbl86mm8kwsqf3wrab";
|
||||
};
|
||||
|
||||
makeFlagsArray = "PREFIX=$(out)";
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "notmuch-bower-${version}";
|
||||
version = "0.8.1";
|
||||
version = "0.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wangp";
|
||||
repo = "bower";
|
||||
rev = version;
|
||||
sha256 = "0rdjip6jq7qlfn640ci81m9vfgcn4q5vaj72zp3bria8m55a56rf";
|
||||
sha256 = "0f8djiclq4rz9isbx18bpzymbvb2q0spvjp982b149hr1my6klaf";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gawk mercury pandoc ];
|
||||
|
@ -12,7 +12,7 @@
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.27";
|
||||
version = "0.28";
|
||||
name = "notmuch-${version}";
|
||||
|
||||
passthru = {
|
||||
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://notmuchmail.org/releases/${name}.tar.gz";
|
||||
sha256 = "0xh8vq2sa7r07xb3n13drc6gdiqhcgl0pj0za5xj43qkiwpikls0";
|
||||
sha256 = "0dqarmjc8544m2w7bqrqmvsfy55fw82707z3lz9cql8nr777bjmc";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
|
||||
doxygen perl # (optional) api docs
|
||||
pythonPackages.sphinx pythonPackages.python # (optional) documentation -> doc/INSTALL
|
||||
bash-completion # (optional) dependency to install bash completion
|
||||
emacs # (optional) to byte compile emacs code
|
||||
emacs # (optional) to byte compile emacs code, also needed for tests
|
||||
ruby # (optional) ruby bindings
|
||||
which dtach openssl bash # test dependencies
|
||||
]
|
||||
@ -56,6 +56,8 @@ stdenv.mkDerivation rec {
|
||||
done
|
||||
'';
|
||||
|
||||
configureFlags = [ "--zshcompletiondir=$(out)/share/zsh/site-functions" ];
|
||||
|
||||
# Notmuch doesn't use autoconf and consequently doesn't tag --bindir and
|
||||
# friends
|
||||
setOutputFlags = false;
|
||||
|
@ -3,12 +3,12 @@
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "6.7.2";
|
||||
version = "6.7.4";
|
||||
name = "frostwire-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dl.frostwire.com/frostwire/${version}/frostwire-${version}.noarch.tar.gz";
|
||||
sha256 = "1dxk2cmwbn4ahkmr8qpiq1dpkkyswg5wz1cnv36izafpr87lxfvj";
|
||||
sha256 = "03vxg0qas4mz5ggrmi396nkz44x1kgq8bfbhbr9mnal9ay9qmi8m";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
@ -5,7 +5,7 @@
|
||||
, qtbase, qtmultimedia
|
||||
, libjson, libgpgerror
|
||||
, libX11, libxcb, libXau, libXdmcp, freetype, libbsd
|
||||
, pythonPackages, squashfsTools, desktop_file_utils
|
||||
, pythonPackages, squashfsTools, desktop-file-utils
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
@ -31,7 +31,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
buildInputs = [ pythonPackages.binwalk squashfsTools desktop_file_utils ];
|
||||
buildInputs = [ pythonPackages.binwalk squashfsTools desktop-file-utils ];
|
||||
|
||||
# avoid usage of appimage's runner option --appimage-extract
|
||||
unpackCmd = ''
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pythonPackages, makeWrapper, libtorrentRasterbar, imagemagick
|
||||
{ stdenv, fetchurl, pythonPackages, makeWrapper, imagemagick
|
||||
, enablePlayer ? true, vlc ? null, qt5 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
pythonPath = [
|
||||
libtorrentRasterbar
|
||||
pythonPackages.libtorrentRasterbar
|
||||
pythonPackages.apsw
|
||||
pythonPackages.twisted
|
||||
pythonPackages.netifaces
|
||||
|
@ -10,7 +10,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.2.31.4";
|
||||
version = "1.2.32";
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "remmina";
|
||||
@ -29,7 +29,7 @@ in stdenv.mkDerivation {
|
||||
owner = "Remmina";
|
||||
repo = "Remmina";
|
||||
rev = "v${version}";
|
||||
sha256 = "1jx704f5zjns3nqy0ffgyfaxfxcxp83mfm5k539xfnqjn5g5h1qr";
|
||||
sha256 = "15szv1xs6drxq6qyksmxcfdz516ja4zm52r4yf6hwij3fgl8qdpw";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
@ -12,7 +12,7 @@ assert withQt -> !withGtk && qt5 != null;
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
version = "2.6.3";
|
||||
version = "2.6.4";
|
||||
variant = if withGtk then "gtk" else if withQt then "qt" else "cli";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
@ -20,7 +20,7 @@ in stdenv.mkDerivation {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.xz";
|
||||
sha256 = "1v538h02y8avwy3cr11xz6wkyf9xd8qva4ng4sl9f2fw4skahn6i";
|
||||
sha256 = "0qf81dk726sdsmjqa9nd251j1cwvzkyb4hrlp6w4iwa3cdz00sx0";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "rclone-${version}";
|
||||
version = "1.43.1";
|
||||
version = "1.44";
|
||||
|
||||
goPackagePath = "github.com/ncw/rclone";
|
||||
|
||||
@ -10,7 +10,7 @@ buildGoPackage rec {
|
||||
owner = "ncw";
|
||||
repo = "rclone";
|
||||
rev = "v${version}";
|
||||
sha256 = "0iz427gdm8cxx3kbjmhw7jsvi9j0ppb5aqcq4alwf72fvpvql3mx";
|
||||
sha256 = "0kpx9r4kksscsvia7r79z9h8ghph25ay9dgpqrnp599fq1bqky61";
|
||||
};
|
||||
|
||||
outputs = [ "bin" "out" "man" ];
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user