Merge commit '0f21306ca3af2bc94a452ac8c414cdbe36703be2' into gcc-7

This commit is contained in:
Tuomas Tynkkynen 2018-01-29 04:20:54 +02:00
commit f03c18869d
14 changed files with 312 additions and 68 deletions

View File

@ -15,6 +15,9 @@ let
} // (optionalAttrs vhostConfig.enableACME {
sslCertificate = "/var/lib/acme/${serverName}/fullchain.pem";
sslCertificateKey = "/var/lib/acme/${serverName}/key.pem";
}) // (optionalAttrs (vhostConfig.useACMEHost != null) {
sslCertificate = "/var/lib/acme/${vhostConfig.useACMEHost}/fullchain.pem";
sslCertificateKey = "/var/lib/acme/${vhostConfig.useACMEHost}/key.pem";
})
) cfg.virtualHosts;
enableIPv6 = config.networking.enableIPv6;
@ -174,7 +177,7 @@ let
redirectListen = filter (x: !x.ssl) defaultListen;
acmeLocation = ''
acmeLocation = optionalString (vhost.enableACME || vhost.useACMEHost != null) ''
location /.well-known/acme-challenge {
${optionalString (vhost.acmeFallbackHost != null) "try_files $uri @acme-fallback;"}
root ${vhost.acmeRoot};
@ -194,7 +197,7 @@ let
${concatMapStringsSep "\n" listenString redirectListen}
server_name ${vhost.serverName} ${concatStringsSep " " vhost.serverAliases};
${optionalString vhost.enableACME acmeLocation}
${acmeLocation}
location / {
return 301 https://$host$request_uri;
}
@ -204,7 +207,7 @@ let
server {
${concatMapStringsSep "\n" listenString hostListen}
server_name ${vhost.serverName} ${concatStringsSep " " vhost.serverAliases};
${optionalString vhost.enableACME acmeLocation}
${acmeLocation}
${optionalString (vhost.root != null) "root ${vhost.root};"}
${optionalString (vhost.globalRedirect != null) ''
return 301 http${optionalString hasSSL "s"}://${vhost.globalRedirect}$request_uri;
@ -555,6 +558,14 @@ in
are mutually exclusive.
'';
}
{
assertion = all (conf: !(conf.enableACME && conf.useACMEHost != null)) (attrValues virtualHosts);
message = ''
Options services.nginx.service.virtualHosts.<name>.enableACME and
services.nginx.virtualHosts.<name>.useACMEHost are mutually exclusive.
'';
}
];
systemd.services.nginx = {
@ -580,7 +591,7 @@ in
security.acme.certs = filterAttrs (n: v: v != {}) (
let
vhostsConfigs = mapAttrsToList (vhostName: vhostConfig: vhostConfig) virtualHosts;
acmeEnabledVhosts = filter (vhostConfig: vhostConfig.enableACME) vhostsConfigs;
acmeEnabledVhosts = filter (vhostConfig: vhostConfig.enableACME && vhostConfig.useACMEHost == null) vhostsConfigs;
acmePairs = map (vhostConfig: { name = vhostConfig.serverName; value = {
user = cfg.user;
group = lib.mkDefault cfg.group;

View File

@ -48,7 +48,21 @@ with lib;
enableACME = mkOption {
type = types.bool;
default = false;
description = "Whether to ask Let's Encrypt to sign a certificate for this vhost.";
description = ''
Whether to ask Let's Encrypt to sign a certificate for this vhost.
Alternately, you can use an existing certificate through <option>useACMEHost</option>.
'';
};
useACMEHost = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
A host of an existing Let's Encrypt certificate to use.
This is useful if you have many subdomains and want to avoid hitting the
<link xlink:href="https://letsencrypt.org/docs/rate-limits/">rate limit</link>.
Alternately, you can generate a certificate through <option>enableACME</option>.
'';
};
acmeRoot = mkOption {

View File

@ -0,0 +1,21 @@
{ stdenv, fetchurl, alsaLib
, version ? "1.7.1"
, sourceSha256 ? "051mv6f13c8y13c1iv3279k1hhzpz4fm9sfczhgp9sim2bjdj055"
}:
stdenv.mkDerivation {
name = "pmidi-${version}";
src = fetchurl {
url = "mirror://sourceforge/pmidi/${version}/pmidi-${version}.tar.gz";
sha256 = sourceSha256;
};
buildInputs = [ alsaLib ];
meta = with stdenv.lib; {
homepage = http://www.parabola.me.uk/alsa/pmidi.html;
description = "A straightforward command line program to play midi files through the ALSA sequencer";
maintainers = with maintainers; [ lheckemann ];
license = licenses.gpl2;
};
}

View File

@ -1,15 +1,16 @@
{ stdenv, fetchurl, unzip, makeWrapper, libX11, zlib, libSM, libICE, libXext
, freetype, libXrender, fontconfig, libXft, libXinerama, libnotify, glib
, gtk3, libappindicator-gtk3, curl }:
{ stdenv, fetchurl, unzip, makeWrapper, libX11, zlib, libSM, libICE
, libXext , freetype, libXrender, fontconfig, libXft, libXinerama
, libXfixes, libXScrnSaver, libnotify, glib , gtk3, libappindicator-gtk3
, curl }:
let
version = "1.2.15-590e8bc";
version = "1.3.0-9b2ba62";
rpath = stdenv.lib.makeLibraryPath
[ libX11 zlib libSM libICE libXext freetype libXrender fontconfig libXft
libXinerama stdenv.cc.cc.lib libnotify glib gtk3 libappindicator-gtk3
curl ];
curl libXfixes libXScrnSaver ];
in
@ -18,14 +19,14 @@ stdenv.mkDerivation {
src = fetchurl {
url = "https://hubstaff-production.s3.amazonaws.com/downloads/HubstaffClient/Builds/Release/${version}/Hubstaff-${version}.sh";
sha256 = "142q8xvwn5gdmpv5x25py2lindr74jqncf8vvw22yb9nj5aqqsi6";
sha256 = "1dxzyl3yxbfmbw1pv8k3vhqzbmyyf16zkgrhzsbm866nmbgnqk1s";
};
nativeBuildInputs = [ unzip makeWrapper ];
unpackCmd = ''
# MojoSetups have a ZIP file at the end. ZIPs magic string is
# most often PK\x03\x04. This *should* work for future updates,
# most often PK\x03\x04. This has worked for all past updates,
# but feel free to come up with something more reasonable.
dataZipOffset=$(grep --max-count=1 --byte-offset --only-matching --text ''$'PK\x03\x04' $curSrc | cut -d: -f1)
dd bs=$dataZipOffset skip=1 if=$curSrc of=data.zip 2>/dev/null
@ -38,17 +39,18 @@ stdenv.mkDerivation {
installPhase = ''
# TODO: handle 32-bit arch?
rm -r x86
rm -r x86_64/lib64
opt=$out/opt/hubstaff
mkdir -p $out/bin $opt
cp -r . $opt/
prog=$opt/x86_64/HubstaffClient.bin.x86_64
for f in "$opt/x86_64/"*.bin.x86_64 ; do
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) $f
wrapProgram $f --prefix LD_LIBRARY_PATH : ${rpath}
done
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) $prog
wrapProgram $prog --prefix LD_LIBRARY_PATH : ${rpath}
ln -s $prog $out/bin/HubstaffClient
ln -s $opt/x86_64/HubstaffClient.bin.x86_64 $out/bin/HubstaffClient
# Why is this needed? SEGV otherwise.
ln -s $opt/data/resources $opt/x86_64/resources

View File

@ -0,0 +1,56 @@
{ stdenv, fetchFromGitHub, libnotify, librsvg, psmisc, gtk3, substituteAll, syncthing, wrapGAppsHook, gnome3, buildPythonApplication, dateutil, pyinotify, pygobject3, bcrypt, gobjectIntrospection }:
buildPythonApplication rec {
version = "0.9.2.7";
name = "syncthing-gtk-${version}";
src = fetchFromGitHub {
owner = "syncthing";
repo = "syncthing-gtk";
rev = "v${version}";
sha256 = "08k7vkibia85klwjxbnzk67h4pphrizka5v9zxwvvv3cisjiclc2";
};
nativeBuildInputs = [
wrapGAppsHook
# For setup hook populating GI_TYPELIB_PATH
gobjectIntrospection
];
buildInputs = [
gtk3 (librsvg.override { enableIntrospection = true; })
libnotify
# Schemas with proxy configuration
gnome3.gsettings_desktop_schemas
];
propagatedBuildInputs = [
dateutil pyinotify pygobject3 bcrypt
];
patches = [
./disable-syncthing-binary-configuration.patch
(substituteAll {
src = ./paths.patch;
killall = "${psmisc}/bin/killall";
syncthing = "${syncthing}/bin/syncthing";
})
];
postPatch = ''
substituteInPlace setup.py --replace "version = get_version()" "version = '${version}'"
substituteInPlace scripts/syncthing-gtk --replace "/usr/share" "$out/share"
substituteInPlace syncthing_gtk/app.py --replace "/usr/share" "$out/share"
substituteInPlace syncthing_gtk/uisettingsdialog.py --replace "/usr/share" "$out/share"
substituteInPlace syncthing_gtk/wizard.py --replace "/usr/share" "$out/share"
substituteInPlace syncthing-gtk.desktop --replace "/usr/bin/syncthing-gtk" "$out/bin/syncthing-gtk"
'';
meta = with stdenv.lib; {
description = "GTK3 & python based GUI for Syncthing";
maintainers = with maintainers; [ ];
platforms = syncthing.meta.platforms;
homepage = https://github.com/syncthing/syncthing-gtk;
license = licenses.gpl2;
};
}

View File

@ -0,0 +1,77 @@
--- a/find-daemon.glade
+++ b/find-daemon.glade
@@ -112,6 +112,7 @@
<object class="GtkEntry" id="vsyncthing_binary">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="sensitive">False</property>
<property name="margin_right">20</property>
<signal name="changed" handler="cb_check_value" swapped="no"/>
</object>
@@ -126,6 +127,7 @@
<property name="label" translatable="yes">_Browse...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="sensitive">False</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<property name="yalign">0.51999998092651367</property>
--- a/syncthing_gtk/configuration.py
+++ b/syncthing_gtk/configuration.py
@@ -168,6 +168,8 @@
yield k
def get(self, key):
+ if key == "syncthing_binary":
+ return self.REQUIRED_KEYS[key][1]
return self.values[key]
def set(self, key, value):
--- a/syncthing_gtk/finddaemondialog.py
+++ b/syncthing_gtk/finddaemondialog.py
@@ -163,7 +163,7 @@
self["lblDownloadProgress"].set_markup(_("Download failed."))
self["btDownload"].set_visible(True)
self["pbDownload"].set_visible(False)
- self["vsyncthing_binary"].set_sensitive(True)
+ self["vsyncthing_binary"].set_sensitive(False)
self["btBrowse"].set_sensitive(True)
self["btSave"].set_sensitive(True)
@@ -179,7 +179,7 @@
def cb_extract_finished(self, downloader, *a):
""" Called after extraction is finished """
- self["vsyncthing_binary"].set_sensitive(True)
+ self["vsyncthing_binary"].set_sensitive(False)
self["btBrowse"].set_sensitive(True)
self["vsyncthing_binary"].set_text(downloader.get_target())
self["lblDownloadProgress"].set_markup("<b>" + _("Download finished.") + "</b>")
--- a/syncthing_gtk/wizard.py
+++ b/syncthing_gtk/wizard.py
@@ -60,7 +60,6 @@
self.quit_button.connect("clicked", lambda *a : self.emit("cancel"))
# Pages
self.add_page(IntroPage(self))
- self.add_page(FindDaemonPage())
self.add_page(GenerateKeysPage())
self.add_page(HttpSettingsPage())
self.add_page(SaveSettingsPage())
--- a/ui-settings.glade
+++ b/ui-settings.glade
@@ -943,6 +943,7 @@
<property name="label" translatable="yes">_Browse...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="sensitive">False</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<property name="yalign">0.51999998092651367</property>
@@ -974,6 +975,7 @@
<object class="GtkEntry" id="vsyncthing_binary">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="sensitive">False</property>
<property name="hexpand">True</property>
<signal name="changed" handler="cb_check_value" swapped="no"/>
</object>

View File

@ -0,0 +1,22 @@
--- a/syncthing_gtk/configuration.py
+++ b/syncthing_gtk/configuration.py
@@ -30,7 +30,7 @@
"autokill_daemon" : (int, 2), # 0 - never kill, 1 - always kill, 2 - ask
"daemon_priority" : (int, 0), # uses nice values
"max_cpus" : (int, 0), # 0 for all cpus
- "syncthing_binary" : (str, "/usr/bin/syncthing"),
+ "syncthing_binary" : (str, "@syncthing@"),
"syncthing_arguments" : (str, ""),
"minimize_on_start" : (bool, False),
"folder_as_path" : (bool, True),
--- a/syncthing_gtk/tools.py
+++ b/syncthing_gtk/tools.py
@@ -303,7 +303,7 @@
return False
# signal 0 doesn't kill anything, but killall exits with 1 if
# named process is not found
- p = Popen(["killall", "-u", os.environ["USER"], "-q", "-s", "0", "syncthing"])
+ p = Popen(["@killall@", "-u", os.environ["USER"], "-q", "-s", "0", "syncthing"])
p.communicate()
return p.returncode == 0
else:

View File

@ -15,6 +15,26 @@ let
in rec {
backlog = zncDerivation rec {
name = "znc-backlog-${version}";
version = "git-2017-06-13";
module_name = "backlog";
src = fetchFromGitHub {
owner = "FruitieX";
repo = "znc-backlog";
rev = "42e8f439808882d2dae60f2a161eabead14e4b0d";
sha256 = "1k7ifpqqzzf2j7w795q4mx1nvmics2higzjqr3mid3lp43sqg5s6";
};
meta = with stdenv.lib; {
description = "Request backlog for IRC channels.";
homepage = https://github.com/fruitiex/znc-backlog/;
license = licenses.asl20;
maintainers = with maintainers; [ infinisil ];
};
};
clientbuffer = zncDerivation rec {
name = "znc-clientbuffer-${version}";
version = "git-2015-08-27";

View File

@ -1,7 +1,12 @@
{ stdenv, fetchFromGitHub, wrapGAppsHook, gtk2, boost, gnome2, scons,
mjpegtools, libdvdread, dvdauthor, gettext, dvdplusrwtools, libxmlxx, ffmpeg,
enca, pkgconfig }:
enca, pkgconfig, fetchpatch }:
let fetchPatchFromAur = {name, sha256}:
fetchpatch {
inherit name sha256;
url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=e6cc6bc80c672aaa1a2260abfe8823da299a192c";
}; in
stdenv.mkDerivation rec {
name = "bombono-${version}";
version = "1.2.4";
@ -12,6 +17,17 @@ stdenv.mkDerivation rec {
sha256 = "1lz1vik6abn1i1pvxhm55c9g47nxxv755wb2ijszwswwrwgvq5b9";
};
patches = map fetchPatchFromAur [
{name="fix_ffmpeg_codecid.patch"; sha256="1asfc0lqzk4gjssrvjmsi1xr53ygnsx2sh7c8yzp5r3j2bagxhp7";}
{name="fix_ptr2bool_cast.patch"; sha256="0iqzrmbg38ikh4x9cmx0v0rnm7a9lcq0kd8sh1z9yfmnz71qqahg";}
{name="fix_c++11_literal_warnings.patch"; sha256="1zbf12i77p0j0090pz5lzg4a7kyahahzqssybv7vi0xikwvw57w9";}
{name="autoptr2uniqueptr.patch"; sha256="0a3wvwfplmqvi8fnj929y85z3h1iq7baaz2d4v08h1q2wbmakqdm";}
{name="fix_deprecated_boost_api.patch"; sha256="184gdz3w95ihhsd8xscpwvq77xd4il47kvmv6wslax77xyw50gm8";}
{name="fix_throw_specifications.patch"; sha256="1f5gi3qwm843hsxvijq7sjy0s62xm7rnr1vdp7f242fi0ldq6c1n";}
{name="fix_operator_ambiguity.patch"; sha256="0r4scsbsqfg6wgzsbfxxpckamvgyrida0n1ypg1klx24pk5dc7n7";}
{name="fix_ffmpeg30.patch"; sha256="1irva7a9bpbzs60ga8ypa3la9y84i5rz20jnd721qmfqp2yip8dw";}
];
nativeBuildInputs = [ wrapGAppsHook scons pkgconfig gettext ];
buildInputs = [
@ -20,9 +36,11 @@ stdenv.mkDerivation rec {
];
buildPhase = ''
scons PREFIX=$out
scons PREFIX=$out -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES
'';
enableParallelBuilding = true;
installPhase = ''
scons install
'';
@ -31,5 +49,6 @@ stdenv.mkDerivation rec {
description = "a DVD authoring program for personal computers";
homepage = "http://www.bombono.org/";
license = stdenv.lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ symphorien ];
};
}

View File

@ -33,11 +33,11 @@ in
stdenv.mkDerivation rec {
name = "racket-${version}";
version = "6.11";
version = "6.12";
src = fetchurl {
url = "https://mirror.racket-lang.org/installers/${version}/${name}-src.tgz";
sha256 = "1nk7705x24jjlbqqhj8yvbgqkfscxx3m81bry1g56kjxysjmf3sw";
sha256 = "0cwcypzjfl9py1s695mhqkiapff7c1w29llsmdj7qgn58wl0apk5";
};
FONTCONFIG_FILE = fontsConf;

View File

@ -0,0 +1,37 @@
{ stdenv, fetchurl, pkgconfig, libnl, popt, gnugrep }:
stdenv.mkDerivation rec {
name = "ipvsadm-${version}";
version = "1.29";
src = fetchurl {
url = "mirror://kernel/linux/utils/kernel/ipvsadm/${name}.tar.xz";
sha256 = "c3de4a21d90a02c621f0c72ee36a7aa27374b6f29fd4178f33fbf71b4c66c149";
};
postPatch = ''
substituteInPlace Makefile --replace "-lnl" "$(pkg-config --libs libnl-genl-3.0)"
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libnl popt ];
preBuild = ''
makeFlagsArray+=(
INCLUDE=$(pkg-config --cflags libnl-genl-3.0)
BUILD_ROOT=$out
MANDIR=share/man
)
'';
postInstall = ''
sed -i -e "s|^PATH=.*|PATH=$out/bin:${gnugrep}/bin|" $out/sbin/ipvsadm-{restore,save}
'';
meta = with stdenv.lib; {
description = "Linux Virtual Server support programs";
homepage = http://www.linuxvirtualserver.org/software/ipvs.html;
license = licenses.gpl2;
platforms = platforms.linux;
};
}

View File

@ -1,28 +1,25 @@
{ stdenv, fetchurl, pkgconfig, boost
, openssl, systemd, lua, luajit, protobuf
, enableLua ? false
, enableProtoBuf ? false
}:
assert enableLua -> lua != null && luajit != null;
assert enableProtoBuf -> protobuf != null;
with stdenv.lib;
stdenv.mkDerivation rec {
name = "pdns-recursor-${version}";
version = "4.0.8";
version = "4.1.1";
src = fetchurl {
url = "https://downloads.powerdns.com/releases/pdns-recursor-${version}.tar.bz2";
sha256 = "04v5y6mfdhn8ikigqmm3k5k0zz5l8d3k1a7ih464n1161q7z0vww";
sha256 = "0srrw726qpwg69v75dwbxab9hk73x1wia4rcnmf7g5qr2k3h7swg";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
boost openssl systemd
] ++ optional enableLua [ lua luajit ]
++ optional enableProtoBuf protobuf;
lua luajit
] ++ optional enableProtoBuf protobuf;
configureFlags = [
"--enable-reproducible"

View File

@ -1227,6 +1227,8 @@ with pkgs;
iio-sensor-proxy = callPackage ../os-specific/linux/iio-sensor-proxy { };
ipvsadm = callPackage ../os-specific/linux/ipvsadm { };
lynis = callPackage ../tools/security/lynis { };
mathics = pythonPackages.mathics;
@ -17107,6 +17109,8 @@ with pkgs;
peru = callPackage ../applications/version-management/peru {};
pmidi = callPackage ../applications/audio/pmidi { };
printrun = callPackage ../applications/misc/printrun { };
sddm = libsForQt5.callPackage ../applications/display-managers/sddm { };
@ -17226,6 +17230,8 @@ with pkgs;
syncthing013 = callPackage ../applications/networking/syncthing013 { };
syncthing-gtk = python2Packages.callPackage ../applications/networking/syncthing-gtk { };
syncthing-inotify = callPackage ../applications/networking/syncthing/inotify.nix { };
syncthing-tray = callPackage ../applications/misc/syncthing-tray { };

View File

@ -17329,46 +17329,8 @@ in {
sybil = callPackage ../development/python-modules/sybil { };
syncthing-gtk = buildPythonPackage rec {
version = "0.9.2.3";
name = "syncthing-gtk-${version}";
src = pkgs.fetchFromGitHub {
owner = "syncthing";
repo = "syncthing-gtk";
rev = "v${version}";
sha256 = "0chl0f0kp6z0z00d1f3xjlicjfr9rzabw39wmjr66fwb5w5hcc42";
};
disabled = isPy3k;
propagatedBuildInputs = with self; [ pkgs.syncthing dateutil pyinotify
pkgs.libnotify
(pkgs.librsvg.override { withGTK = true; })
pkgs.psmisc pygobject3 pkgs.gtk3
];
preFixup = ''
wrapProgram $out/bin/syncthing-gtk \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH"
'';
patchPhase = ''
substituteInPlace setup.py --replace "version = get_version()" "version = '${version}'"
substituteInPlace scripts/syncthing-gtk --replace "/usr/share" "$out/share"
substituteInPlace syncthing_gtk/app.py --replace "/usr/share" "$out/share"
substituteInPlace syncthing_gtk/wizard.py --replace "/usr/share" "$out/share"
substituteInPlace syncthing-gtk.desktop --replace "/usr/bin/syncthing-gtk" "$out/bin/syncthing-gtk"
'';
meta = {
description = " GTK3 & python based GUI for Syncthing ";
maintainers = with maintainers; [ ];
platforms = pkgs.syncthing.meta.platforms;
homepage = "https://github.com/syncthing/syncthing-gtk";
license = licenses.gpl2;
};
};
# legacy alias
syncthing-gtk = pkgs.syncthing-gtk;
systemd = callPackage ../development/python-modules/systemd {
inherit (pkgs) pkgconfig systemd;