summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/home-assistant/default.nix72
-rw-r--r--pkgs/servers/home-assistant/frontend.nix11
-rw-r--r--pkgs/servers/mail/dovecot/default.nix12
-rw-r--r--pkgs/servers/mail/dovecot/plugins/antispam/default.nix34
-rw-r--r--pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix6
-rw-r--r--pkgs/servers/mail/postfix/default.nix2
6 files changed, 98 insertions, 39 deletions
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix
new file mode 100644
index 000000000000..9ec314e5c737
--- /dev/null
+++ b/pkgs/servers/home-assistant/default.nix
@@ -0,0 +1,72 @@
+{ stdenv, fetchFromGitHub, python3
+, extraPackages ? ps: []
+, skipPip ? true }:
+
+let
+
+  py = python3.override {
+    packageOverrides = self: super: {
+      yarl = super.yarl.overridePythonAttrs (oldAttrs: rec {
+        version = "0.18.0";
+        src = oldAttrs.src.override {
+          inherit version;
+          sha256 = "11j8symkxh0ngvpddqpj85qmk6p70p20jca3alxc181gk3vx785s";
+        };
+      });
+      aiohttp = super.aiohttp.overridePythonAttrs (oldAttrs: rec {
+        version = "2.3.7";
+        src = oldAttrs.src.override {
+          inherit version;
+          sha256 = "0fzfpx5ny7559xrxaawnylq20dvrkjiag0ypcd13frwwivrlsagy";
+        };
+      });
+      hass-frontend = super.callPackage ./frontend.nix { };
+    };
+  };
+
+  # Ensure that we are using a consistent package set
+  extraBuildInputs = extraPackages py.pkgs;
+
+in with py.pkgs; buildPythonApplication rec {
+  pname = "homeassistant";
+  version = "0.62.1";
+
+  diabled = !isPy3k;
+
+  # PyPI tarball is missing tests/ directory
+  src = fetchFromGitHub {
+    owner = "home-assistant";
+    repo = "home-assistant";
+    rev = version;
+    sha256 = "0151prwk2ci6bih0mdmc3r328nrvazn9jwk0w26wmd4cpvnb5h26";
+  };
+
+  propagatedBuildInputs = [
+    # From setup.py
+    requests pyyaml pytz pip jinja2 voluptuous typing aiohttp yarl async-timeout chardet astral certifi
+    # From the components that are part of the default configuration.yaml
+    sqlalchemy aiohttp-cors hass-frontend user-agents distro mutagen xmltodict netdisco 
+  ] ++ extraBuildInputs;
+
+  checkInputs = [
+    pytest requests-mock pydispatcher pytest-aiohttp
+  ];
+
+  checkPhase = ''
+    # The components' dependencies are not included, so they cannot be tested
+    py.test --ignore tests/components
+    # Some basic components should be tested however
+    py.test \
+      tests/components/{group,http} \
+      tests/components/test_{api,configurator,demo,discovery,frontend,init,introduction,logger,script,shell_command,system_log,websocket_api}.py
+  '';
+
+  makeWrapperArgs = [] ++ stdenv.lib.optional skipPip [ "--add-flags --skip-pip" ];
+
+  meta = with stdenv.lib; {
+    homepage = https://home-assistant.io/;
+    description = "Open-source home automation platform running on Python 3";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ f-breidenstein dotlambda ];
+  };
+}
diff --git a/pkgs/servers/home-assistant/frontend.nix b/pkgs/servers/home-assistant/frontend.nix
new file mode 100644
index 000000000000..6e1a789012f3
--- /dev/null
+++ b/pkgs/servers/home-assistant/frontend.nix
@@ -0,0 +1,11 @@
+{ stdenv, fetchPypi, buildPythonPackage }:
+
+buildPythonPackage rec {
+  pname = "home-assistant-frontend";
+  version = "20180130.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0b9klisl7hh30rml8qlrp9gpz33z9b825pd1vxbck48k0s98z1zi";
+  };
+}
diff --git a/pkgs/servers/mail/dovecot/default.nix b/pkgs/servers/mail/dovecot/default.nix
index e995763a4a2d..6b2adf572175 100644
--- a/pkgs/servers/mail/dovecot/default.nix
+++ b/pkgs/servers/mail/dovecot/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, perl, pkgconfig, systemd, openssl
+{ stdenv, lib, fetchurl, fetchpatch, perl, pkgconfig, systemd, openssl
 , bzip2, zlib, lz4, inotify-tools, pam, libcap
 , clucene_core_2, icu, openldap, libsodium, libstemmer
 # Auth modules
@@ -47,6 +47,16 @@ stdenv.mkDerivation rec {
     # so we can symlink plugins from several packages there.
     # The symlinking needs to be done in NixOS.
     ./2.2.x-module_dir.patch
+    (fetchpatch {
+      name = "CVE-2017-14132_part1.patch";
+      url = https://github.com/dovecot/core/commit/1a29ed2f96da1be22fa5a4d96c7583aa81b8b060.patch;
+      sha256 = "1pcfzxr8xlwbpa7z19grp7mlvdnan6ln8zw74dj4pdmynmlk4aw9";
+    })
+    (fetchpatch {
+      name = "CVE-2017-14132_part2.patch";
+      url = https://github.com/dovecot/core/commit/a9b135760aea6d1790d447d351c56b78889dac22.patch;
+      sha256 = "0082iid5rvjmh003xi9s09jld2rb31hbvni0yai1h1ggbmd5zf8l";
+    })
   ];
 
   configureFlags = [
diff --git a/pkgs/servers/mail/dovecot/plugins/antispam/default.nix b/pkgs/servers/mail/dovecot/plugins/antispam/default.nix
deleted file mode 100644
index 1a1ba1ad4486..000000000000
--- a/pkgs/servers/mail/dovecot/plugins/antispam/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ stdenv, fetchhg, autoconf, automake, dovecot, openssl }:
-
-stdenv.mkDerivation {
-  name = "dovecot-antispam-20130429";
-
-  src = fetchhg {
-    url = "http://hg.dovecot.org/dovecot-antispam-plugin/";
-    rev = "5ebc6aae4d7c";
-    sha256 = "181i79c9sf3a80mgmycfq1f77z7fpn3j2s0qiddrj16h3yklf4gv";
-  };
-
-  buildInputs = [ dovecot openssl ];
-  nativeBuildInputs = [ autoconf automake ];
-
-  preConfigure = ''
-    ./autogen.sh
-    # Ugly hack; any ideas?
-    sed "s,^dovecot_moduledir=.*,dovecot_moduledir=$out/lib/dovecot," ${dovecot}/lib/dovecot/dovecot-config > dovecot-config
-  '';
-
-  configureFlags = [
-    "--with-dovecot=."
-  ];
-
-  enableParallelBuilding = true;
-
-  meta = with stdenv.lib; {
-    homepage = http://wiki2.dovecot.org/Plugins/Antispam;
-    description = "An antispam plugin for the Dovecot IMAP server";
-    license = licenses.gpl2;
-    maintainers = with maintainers; [ abbradar ];
-    platforms = platforms.linux;
-  };
-}
diff --git a/pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix b/pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix
index 67094228a5e7..92b404d0f653 100644
--- a/pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix
+++ b/pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "dovecot-pigeonhole-${version}";
-  version = "0.4.21";
+  version = "0.5.0.1";
 
   src = fetchurl {
-    url = "http://pigeonhole.dovecot.org/releases/2.2/dovecot-2.2-pigeonhole-${version}.tar.gz";
-    sha256 = "0snxrx9lk3j0rrcd4jlhwlqk4v31n1qfx2asgwb4scy5i2vrrq2a";
+    url = "http://pigeonhole.dovecot.org/releases/2.3/dovecot-2.3-pigeonhole-${version}.tar.gz";
+    sha256 = "1lpsdqh9pwqx917z5v23bahhhbrcb3y5ps3l413sli8cn4a6sdan";
   };
 
   buildInputs = [ dovecot openssl ];
diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix
index bf1c16acfeb8..f8b36e816e0e 100644
--- a/pkgs/servers/mail/postfix/default.nix
+++ b/pkgs/servers/mail/postfix/default.nix
@@ -90,7 +90,7 @@ in stdenv.mkDerivation rec {
   meta = {
     homepage = http://www.postfix.org/;
     description = "A fast, easy to administer, and secure mail server";
-    license = lib.licenses.bsdOriginal;
+    license = with lib.licenses; [ ipl10 epl20 ];
     platforms = lib.platforms.linux;
     maintainers = [ lib.maintainers.rickynils ];
   };