Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dezgeg committed Jan 17, 2018
2 parents 78f9d80 + 67c73b4 commit 884a167
Show file tree
Hide file tree
Showing 180 changed files with 373 additions and 244 deletions.
2 changes: 2 additions & 0 deletions nixos/modules/misc/ids.nix
Expand Up @@ -301,6 +301,7 @@
pykms = 282;
kodi = 283;
restya-board = 284;
mighttpd2 = 285;

# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!

Expand Down Expand Up @@ -570,6 +571,7 @@
pykms = 282;
kodi = 283;
restya-board = 284;
mighttpd2 = 285;

# When adding a gid, make sure it doesn't match an existing
# uid. Users and groups with the same name should have equal
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Expand Up @@ -633,6 +633,7 @@
./services/web-servers/lighttpd/default.nix
./services/web-servers/lighttpd/gitweb.nix
./services/web-servers/lighttpd/inginious.nix
./services/web-servers/mighttpd2.nix
./services/web-servers/minio.nix
./services/web-servers/nginx/default.nix
./services/web-servers/phpfpm/default.nix
Expand Down
132 changes: 132 additions & 0 deletions nixos/modules/services/web-servers/mighttpd2.nix
@@ -0,0 +1,132 @@
{ config, lib, pkgs, ... }:

with lib;

let
cfg = config.services.mighttpd2;
configFile = pkgs.writeText "mighty-config" cfg.config;
routingFile = pkgs.writeText "mighty-routing" cfg.routing;
in {
options.services.mighttpd2 = {
enable = mkEnableOption "Mighttpd2 web server";

config = mkOption {
default = "";
example = ''
# Example configuration for Mighttpd 2
Port: 80
# IP address or "*"
Host: *
Debug_Mode: Yes # Yes or No
# If available, "nobody" is much more secure for User:.
User: root
# If available, "nobody" is much more secure for Group:.
Group: root
Pid_File: /var/run/mighty.pid
Logging: Yes # Yes or No
Log_File: /var/log/mighty # The directory must be writable by User:
Log_File_Size: 16777216 # bytes
Log_Backup_Number: 10
Index_File: index.html
Index_Cgi: index.cgi
Status_File_Dir: /usr/local/share/mighty/status
Connection_Timeout: 30 # seconds
Fd_Cache_Duration: 10 # seconds
# Server_Name: Mighttpd/3.x.y
Tls_Port: 443
Tls_Cert_File: cert.pem # should change this with an absolute path
# should change this with comma-separated absolute paths
Tls_Chain_Files: chain.pem
# Currently, Tls_Key_File must not be encrypted.
Tls_Key_File: privkey.pem # should change this with an absolute path
Service: 0 # 0 is HTTP only, 1 is HTTPS only, 2 is both
'';
type = types.lines;
description = ''
Verbatim config file to use
(see http://www.mew.org/~kazu/proj/mighttpd/en/config.html)
'';
};

routing = mkOption {
default = "";
example = ''
# Example routing for Mighttpd 2
# Domain lists
[localhost www.example.com]
# Entries are looked up in the specified order
# All paths must end with "/"
# A path to CGI scripts should be specified with "=>"
/~alice/cgi-bin/ => /home/alice/public_html/cgi-bin/
# A path to static files should be specified with "->"
/~alice/ -> /home/alice/public_html/
/cgi-bin/ => /export/cgi-bin/
# Reverse proxy rules should be specified with ">>"
# /path >> host:port/path2
# Either "host" or ":port" can be committed, but not both.
/app/cal/ >> example.net/calendar/
# Yesod app in the same server
/app/wiki/ >> 127.0.0.1:3000/
/ -> /export/www/
'';
type = types.lines;
description = ''
Verbatim routing file to use
(see http://www.mew.org/~kazu/proj/mighttpd/en/config.html)
'';
};

cores = mkOption {
default = null;
type = types.nullOr types.int;
description = ''
How many cores to use.
If null it will be determined automatically
'';
};

};

config = mkIf cfg.enable {
assertions =
[ { assertion = cfg.routing != "";
message = "You need at least one rule in mighttpd2.routing";
}
];
systemd.services.mighttpd2 = {
description = "Mighttpd2 web server";
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = ''
${pkgs.haskellPackages.mighttpd2}/bin/mighty \
${configFile} \
${routingFile} \
+RTS -N${optionalString (cfg.cores != null) "${cfg.cores}"}
'';
Type = "simple";
User = "mighttpd2";
Group = "mighttpd2";
Restart = "on-failure";
AmbientCapabilities = "cap_net_bind_service";
CapabilityBoundingSet = "cap_net_bind_service";
};
};

users.extraUsers.mighttpd2 = {
group = "mighttpd2";
uid = config.ids.uids.mighttpd2;
isSystemUser = true;
};

users.extraGroups.mighttpd2.gid = config.ids.gids.mighttpd2;
};

meta.maintainers = with lib.maintainers; [ fgaz ];
}
1 change: 0 additions & 1 deletion pkgs/applications/audio/dfasma/default.nix
Expand Up @@ -62,6 +62,5 @@ in stdenv.mkDerivation rec {
homepage = http://gillesdegottex.github.io/dfasma/;
license = [ licenses.gpl3Plus reaperFork.meta.license ];
platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
};
}
1 change: 0 additions & 1 deletion pkgs/applications/audio/fmit/default.nix
Expand Up @@ -49,6 +49,5 @@ stdenv.mkDerivation rec {
homepage = http://gillesdegottex.github.io/fmit/;
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
};
}
1 change: 0 additions & 1 deletion pkgs/applications/audio/id3v2/default.nix
Expand Up @@ -23,7 +23,6 @@ stdenv.mkDerivation rec {
description = "A command line editor for id3v2 tags";
homepage = http://id3v2.sourceforge.net/;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ nckx ];
platforms = with platforms; unix;
};
}
1 change: 0 additions & 1 deletion pkgs/applications/audio/keyfinder-cli/default.nix
Expand Up @@ -27,6 +27,5 @@ stdenv.mkDerivation rec {
'';
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
};
}
1 change: 0 additions & 1 deletion pkgs/applications/audio/keyfinder/default.nix
Expand Up @@ -37,6 +37,5 @@ stdenv.mkDerivation rec {
homepage = http://www.ibrahimshaath.co.uk/keyfinder/;
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
};
}
2 changes: 1 addition & 1 deletion pkgs/applications/audio/seq24/default.nix
Expand Up @@ -19,6 +19,6 @@ stdenv.mkDerivation rec {
homepage = http://www.filter24.org/seq24;
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ goibhniu nckx ];
maintainers = with maintainers; [ goibhniu ];
};
}
2 changes: 1 addition & 1 deletion pkgs/applications/editors/neovim/default.nix
Expand Up @@ -32,7 +32,7 @@ let
description = "VT220/xterm/ECMA-48 terminal emulator library";
homepage = http://www.leonerd.org.uk/code/libvterm/;
license = licenses.mit;
maintainers = with maintainers; [ nckx garbas ];
maintainers = with maintainers; [ garbas ];
platforms = platforms.unix;
};
};
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/editors/tiled/default.nix
Expand Up @@ -25,6 +25,5 @@ stdenv.mkDerivation rec {
gpl2Plus # all the rest
];
platforms = platforms.linux;
maintainers = [ maintainers.nckx ];
};
}
1 change: 0 additions & 1 deletion pkgs/applications/graphics/apitrace/default.nix
Expand Up @@ -22,6 +22,5 @@ stdenv.mkDerivation rec {
description = "Tools to trace OpenGL, OpenGL ES, Direct3D, and DirectDraw APIs";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
};
}
2 changes: 1 addition & 1 deletion pkgs/applications/graphics/sane/backends/generic.nix
Expand Up @@ -71,7 +71,7 @@ stdenv.mkDerivation {
homepage = http://www.sane-project.org/;
license = licenses.gpl2Plus;

maintainers = with maintainers; [ nckx peti ];
maintainers = with maintainers; [ peti ];
platforms = platforms.linux;
};
}
1 change: 0 additions & 1 deletion pkgs/applications/graphics/swingsane/default.nix
Expand Up @@ -57,6 +57,5 @@ stdenv.mkDerivation rec {
homepage = http://swingsane.com/;
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ nckx ];
};
}
1 change: 0 additions & 1 deletion pkgs/applications/misc/ganttproject-bin/default.nix
Expand Up @@ -51,6 +51,5 @@ stdenv.mkDerivation rec {
# ‘GPL3-compatible’. See ${downloadPage} for detailed information.
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
};
}
4 changes: 2 additions & 2 deletions pkgs/applications/misc/moonlight-embedded/default.nix
Expand Up @@ -6,13 +6,13 @@

stdenv.mkDerivation rec {
name = "moonlight-embedded-${version}";
version = "2.4.2";
version = "2.4.6";

# fetchgit used to ensure submodules are available
src = fetchgit {
url = "git://github.com/irtimmer/moonlight-embedded";
rev = "refs/tags/v${version}";
sha256 = "0khdbwfclvpjgyk5ar1fs4j66zsjikaj422wlvrvqhyzi1v5arpr";
sha256 = "0vs6rjmz8058s9lscagiif6pcizwfrvfpk9rxxgacfi0xisfgmf1";
};

outputs = [ "out" "man" ];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/ocropus/default.nix
Expand Up @@ -53,7 +53,7 @@ pythonPackages.buildPythonApplication rec {
description = "Open source document analysis and OCR system";
license = licenses.asl20;
homepage = https://github.com/tmbdev/ocropy/;
maintainers = with maintainers; [ domenkozar nckx viric ];
maintainers = with maintainers; [ domenkozar viric ];
platforms = platforms.linux;
};
}
5 changes: 3 additions & 2 deletions pkgs/applications/misc/qlcplus/default.nix
Expand Up @@ -5,13 +5,13 @@

mkDerivation rec {
name = "qlcplus-${version}";
version = "4.11.0";
version = "4.11.1";

src = fetchFromGitHub {
owner = "mcallegari";
repo = "qlcplus";
rev = "QLC+_${version}";
sha256 = "0a45ww341yjx9k54j5s8b5wj83rgbwxkdvgy0v5jbbdf9m78ifrg";
sha256 = "0lb1mdp7kbnkja14phgyknr65irwkxcmzk96rqacysvwrvzvfzyd";
};

nativeBuildInputs = [ qmake pkgconfig ];
Expand All @@ -34,5 +34,6 @@ mkDerivation rec {
maintainers = [ maintainers.globin ];
license = licenses.asl20;
platforms = platforms.all;
homepage = "http://www.qlcplus.org/";
};
}
2 changes: 1 addition & 1 deletion pkgs/applications/misc/redshift/default.nix
Expand Up @@ -58,6 +58,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl3Plus;
homepage = http://jonls.dk/redshift;
platforms = platforms.linux;
maintainers = with maintainers; [ mornfall nckx ];
maintainers = with maintainers; [ mornfall yegortimoshenko ];
};
}
2 changes: 1 addition & 1 deletion pkgs/applications/misc/workrave/default.nix
Expand Up @@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
homepage = http://www.workrave.org/;
downloadPage = https://github.com/rcaelers/workrave/releases;
license = licenses.gpl3;
maintainers = with maintainers; [ nckx prikhi ];
maintainers = with maintainers; [ prikhi ];
platforms = platforms.linux;
};
}
4 changes: 2 additions & 2 deletions pkgs/applications/networking/errbot/default.nix
Expand Up @@ -2,11 +2,11 @@

pythonPackages.buildPythonApplication rec {
name = "errbot-${version}";
version = "5.1.2";
version = "5.1.3";

src = fetchurl {
url = "mirror://pypi/e/errbot/${name}.tar.gz";
sha256 = "1r9w7pmdw77h1hwxns6d0sdg8cndsq1lwkq0y5qiiqr91jz93ajm";
sha256 = "0nkfq6fx87g7kvxrb5lp8gkb75658cmyffnacpy8jq3a16py3jrr";
};

disabled = !pythonPackages.isPy3k;
Expand Down
Expand Up @@ -18,6 +18,5 @@ python2Packages.buildPythonApplication rec {
description = "RSS Aggregator Without Delusions Of Grandeur";
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = with maintainers; [ nckx ];
};
}
Expand Up @@ -32,6 +32,5 @@ stdenv.mkDerivation rec {
homepage = http://www.vanheusden.com/rsstail/;
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
};
}
Expand Up @@ -32,19 +32,17 @@ with stdenv.lib;

stdenv.mkDerivation rec {
name = "claws-mail-${version}";
version = "3.15.1";
version = "3.16.0";

src = fetchurl {
url = "http://www.claws-mail.org/download.php?file=releases/claws-mail-${version}.tar.xz";
sha256 = "0hlm2jipyr4z6izlrpvabpz4ivh49i13avnm848kr1nv68pkq2cd";
sha256 = "1awpr3s7n8bq8p3w10a4j6lg5bizjxyiqp4rqzc2j8cn7lyi64n2";
};

outputs = [ "out" "dev" ];

patches = [ ./mime.patch ];

hardeningDisable = [ "format" ];

postPatch = ''
substituteInPlace src/procmime.c \
--subst-var-by MIMEROOTDIR ${shared_mime_info}/share
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/networking/remote/x2goclient/default.nix
Expand Up @@ -33,6 +33,5 @@ stdenv.mkDerivation rec {
homepage = http://x2go.org/;
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
};
}
1 change: 0 additions & 1 deletion pkgs/applications/networking/vnstat/default.nix
Expand Up @@ -26,7 +26,6 @@ stdenv.mkDerivation rec {
'';
homepage = http://humdi.net/vnstat/;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ nckx ];
platforms = platforms.linux;
};
}
Expand Up @@ -49,7 +49,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl2Plus;
homepage = http://git.fishsoup.net/cgit/git-bz/;

maintainers = with maintainers; [ nckx ];
platforms = platforms.linux;
};
}
Expand Up @@ -40,6 +40,5 @@ stdenv.mkDerivation rec {
'';
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
};
}

0 comments on commit 884a167

Please sign in to comment.