Skip to content

Commit

Permalink
Merge master into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
FRidh committed Feb 11, 2018
2 parents 48f3036 + 9d69ebe commit 06a7281
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 49 deletions.
44 changes: 24 additions & 20 deletions pkgs/development/libraries/openmpi/default.nix
@@ -1,4 +1,4 @@
{stdenv, fetchurl, gfortran, perl, rdma-core
{ stdenv, fetchurl, gfortran, perl, libnl, rdma-core, zlib

# Enable the Sun Grid Engine bindings
, enableSGE ? false
Expand All @@ -7,44 +7,48 @@
, enablePrefix ? false
}:

with stdenv.lib;

let
majorVersion = "1.10";
majorVersion = "3.0";
minorVersion = "0";

in stdenv.mkDerivation rec {
name = "openmpi-${majorVersion}.7";
name = "openmpi-${majorVersion}.${minorVersion}";

src = fetchurl {
url = "http://www.open-mpi.org/software/ompi/v${majorVersion}/downloads/${name}.tar.bz2";
sha256 = "142s1vny9gllkq336yafxayjgcirj2jv0ddabj879jgya7hyr2d0";
sha256 = "1mw2d94k6mp4scg1wnkj50vdh734fy5m2ygyrj65s4mh3prbz6gn";
};

buildInputs = [ gfortran ]
++ optional (stdenv.isLinux || stdenv.isFreeBSD) rdma-core;
postPatch = ''
patchShebangs ./
'';

buildInputs = with stdenv; [ gfortran zlib ]
++ lib.optional isLinux libnl
++ lib.optional (isLinux || isFreeBSD) rdma-core;

nativeBuildInputs = [ perl ];

configureFlags = []
++ optional enableSGE "--with-sge"
++ optional enablePrefix "--enable-mpirun-prefix-by-default"
configureFlags = with stdenv; []
++ lib.optional isLinux "--with-libnl=${libnl.dev}"
++ lib.optional enableSGE "--with-sge"
++ lib.optional enablePrefix "--enable-mpirun-prefix-by-default"
;

enableParallelBuilding = true;

preBuild = ''
patchShebangs ompi/mpi/fortran/base/gen-mpi-sizeof.pl
'';

postInstall = ''
rm -f $out/lib/*.la
rm -f $out/lib/*.la
'';

meta = {
doCheck = true;

meta = with stdenv.lib; {
homepage = http://www.open-mpi.org/;
description = "Open source MPI-2 implementation";
longDescription = "The Open MPI Project is an open source MPI-2 implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.";
maintainers = [ ];
description = "Open source MPI-3 implementation";
longDescription = "The Open MPI Project is an open source MPI-3 implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.";
maintainers = with maintainers; [ markuskowa ];
license = licenses.bsd3;
platforms = platforms.unix;
};
}
5 changes: 2 additions & 3 deletions pkgs/development/python-modules/astral/default.nix
Expand Up @@ -2,12 +2,11 @@

buildPythonPackage rec {
pname = "astral";
version = "1.4";
version = "1.5";

src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "1zm1ypc6w279gh7lbgsfbzfxk2x4gihlq3rfh59hj70hmhjwiwp7";
sha256 = "527628fbfe90c1596c3950ff84ebd07ecc10c8fb1044c903a0519b5057700cb6";
};

propagatedBuildInputs = [ pytz ];
Expand Down
8 changes: 6 additions & 2 deletions pkgs/development/python-modules/h5py/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, python, buildPythonPackage
, numpy, hdf5, cython, six, pkgconfig
, mpi4py ? null }:
, mpi4py ? null, openssh }:

assert hdf5.mpiSupport -> mpi4py != null && hdf5.mpi == mpi4py.mpi;

Expand All @@ -24,6 +24,10 @@ in buildPythonPackage rec {

postConfigure = ''
${python.executable} setup.py configure ${configure_flags}
# Needed to run the tests reliably. See:
# https://bitbucket.org/mpi4py/mpi4py/issues/87/multiple-test-errors-with-openmpi-30
${optionalString mpiSupport "export OMPI_MCA_rmaps_base_oversubscribe=yes"}
'';

preBuild = if mpiSupport then "export CC=${mpi}/bin/mpicc" else "";
Expand All @@ -33,7 +37,7 @@ in buildPythonPackage rec {
++ optional mpiSupport mpi
;
propagatedBuildInputs = [ numpy six]
++ optional mpiSupport mpi4py
++ optionals mpiSupport [ mpi4py openssh ]
;

meta = {
Expand Down
14 changes: 12 additions & 2 deletions pkgs/development/python-modules/mpi4py/default.nix
@@ -1,4 +1,4 @@
{ stdenv, fetchPypi, python, buildPythonPackage, mpi }:
{ stdenv, fetchPypi, python, buildPythonPackage, mpi, openssh }:

buildPythonPackage rec {
pname = "mpi4py";
Expand All @@ -14,6 +14,12 @@ buildPythonPackage rec {
inherit mpi;
};

postPatch = ''
substituteInPlace test/test_spawn.py --replace \
"unittest.skipMPI('openmpi(<3.0.0)')" \
"unittest.skipMPI('openmpi')"
'';

configurePhase = "";

installPhase = ''
Expand All @@ -28,11 +34,15 @@ buildPythonPackage rec {
# sometimes packages specify where files should be installed outside the usual
# python lib prefix, we override that back so all infrastructure (setup hooks)
# work as expected
# Needed to run the tests reliably. See:
# https://bitbucket.org/mpi4py/mpi4py/issues/87/multiple-test-errors-with-openmpi-30
export OMPI_MCA_rmaps_base_oversubscribe=yes
'';

setupPyBuildFlags = ["--mpicc=${mpi}/bin/mpicc"];

buildInputs = [ mpi ];
buildInputs = [ mpi openssh ];

meta = {
description =
Expand Down
4 changes: 2 additions & 2 deletions pkgs/os-specific/linux/eudev/default.nix
Expand Up @@ -3,10 +3,10 @@ let
s = # Generated upstream information
rec {
baseName="eudev";
version = "3.2.4";
version = "3.2.5";
name="${baseName}-${version}";
url="http://dev.gentoo.org/~blueness/eudev/eudev-${version}.tar.gz";
sha256 = "1vbg2k5mngyxdcdw4jkkzxbwdgrcr643hkby1whz7x91kg4g9p6x";
sha256 = "1bwh72brp4dvr2dm6ng0lflic6abl87h8zk209im5lna0m0x1hj9";
};

nativeBuildInputs = [ pkgconfig ];
Expand Down
17 changes: 12 additions & 5 deletions pkgs/servers/home-assistant/component-packages.nix
Expand Up @@ -2,7 +2,7 @@
# Do not edit!

{
version = "0.62.1";
version = "0.63";
components = {
"nuimo_controller" = ps: with ps; [ ];
"bbb_gpio" = ps: with ps; [ ];
Expand All @@ -23,7 +23,7 @@
"sensor.dnsip" = ps: with ps; [ aiodns ];
"emulated_hue" = ps: with ps; [ aiohttp-cors ];
"http" = ps: with ps; [ aiohttp-cors ];
"sensor.imap" = ps: with ps; [ ];
"sensor.imap" = ps: with ps; [ aioimaplib ];
"light.lifx" = ps: with ps; [ ];
"scene.hunterdouglas_powerview" = ps: with ps; [ ];
"alarmdecoder" = ps: with ps; [ ];
Expand Down Expand Up @@ -160,10 +160,11 @@
"media_player.liveboxplaytv" = ps: with ps; [ ];
"lametric" = ps: with ps; [ ];
"notify.lametric" = ps: with ps; [ ];
"sensor.luftdaten" = ps: with ps; [ ];
"sensor.luftdaten" = ps: with ps; [ luftdaten ];
"sensor.lyft" = ps: with ps; [ ];
"notify.matrix" = ps: with ps; [ matrix-client ];
"maxcube" = ps: with ps; [ ];
"mercedesme" = ps: with ps; [ ];
"notify.message_bird" = ps: with ps; [ ];
"sensor.mfi" = ps: with ps; [ ];
"switch.mfi" = ps: with ps; [ ];
Expand Down Expand Up @@ -216,6 +217,7 @@
"light.rpi_gpio_pwm" = ps: with ps; [ ];
"canary" = ps: with ps; [ ];
"sensor.cpuspeed" = ps: with ps; [ ];
"melissa" = ps: with ps; [ ];
"camera.synology" = ps: with ps; [ ];
"hdmi_cec" = ps: with ps; [ ];
"light.tplink" = ps: with ps; [ ];
Expand Down Expand Up @@ -271,6 +273,7 @@
"lutron_caseta" = ps: with ps; [ ];
"lutron" = ps: with ps; [ ];
"notify.mailgun" = ps: with ps; [ ];
"media_player.mediaroom" = ps: with ps; [ ];
"mochad" = ps: with ps; [ ];
"modbus" = ps: with ps; [ ];
"media_player.monoprice" = ps: with ps; [ ];
Expand All @@ -288,12 +291,14 @@
"sensor.otp" = ps: with ps; [ ];
"sensor.openweathermap" = ps: with ps; [ ];
"weather.openweathermap" = ps: with ps; [ ];
"sensor.pollen" = ps: with ps; [ ];
"qwikswitch" = ps: with ps; [ ];
"rainbird" = ps: with ps; [ ];
"climate.sensibo" = ps: with ps; [ ];
"sensor.serial" = ps: with ps; [ ];
"switch.acer_projector" = ps: with ps; [ pyserial ];
"lock.sesame" = ps: with ps; [ ];
"goalfeed" = ps: with ps; [ ];
"sensor.sma" = ps: with ps; [ ];
"device_tracker.snmp" = ps: with ps; [ pysnmp ];
"sensor.snmp" = ps: with ps; [ pysnmp ];
Expand All @@ -316,9 +321,10 @@
"lirc" = ps: with ps; [ ];
"fan.xiaomi_miio" = ps: with ps; [ ];
"light.xiaomi_miio" = ps: with ps; [ ];
"remote.xiaomi_miio" = ps: with ps; [ ];
"switch.xiaomi_miio" = ps: with ps; [ ];
"vacuum.xiaomi_miio" = ps: with ps; [ ];
"media_player.mpd" = ps: with ps; [ ];
"media_player.mpd" = ps: with ps; [ mpd2 ];
"light.mystrom" = ps: with ps; [ ];
"switch.mystrom" = ps: with ps; [ ];
"nest" = ps: with ps; [ ];
Expand All @@ -329,7 +335,7 @@
"sensor.sochain" = ps: with ps; [ ];
"sensor.synologydsm" = ps: with ps; [ ];
"tado" = ps: with ps; [ ];
"telegram_bot" = ps: with ps; [ ];
"telegram_bot" = ps: with ps; [ python-telegram-bot ];
"sensor.twitch" = ps: with ps; [ ];
"velbus" = ps: with ps; [ ];
"media_player.vlc" = ps: with ps; [ ];
Expand Down Expand Up @@ -380,6 +386,7 @@
"media_player.snapcast" = ps: with ps; [ ];
"sensor.speedtest" = ps: with ps; [ ];
"recorder" = ps: with ps; [ sqlalchemy ];
"sensor.sql" = ps: with ps; [ sqlalchemy ];
"statsd" = ps: with ps; [ statsd ];
"sensor.steam_online" = ps: with ps; [ ];
"tahoma" = ps: with ps; [ ];
Expand Down
18 changes: 9 additions & 9 deletions pkgs/servers/home-assistant/default.nix
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, python3
{ lib, fetchFromGitHub, python3
, extraComponents ? []
, extraPackages ? ps: []
, skipPip ? true }:
Expand All @@ -8,17 +8,17 @@ let
py = python3.override {
packageOverrides = self: super: {
yarl = super.yarl.overridePythonAttrs (oldAttrs: rec {
version = "0.18.0";
version = "1.1.0";
src = oldAttrs.src.override {
inherit version;
sha256 = "11j8symkxh0ngvpddqpj85qmk6p70p20jca3alxc181gk3vx785s";
sha256 = "162630v7f98l27h11msk9416lqwm2mpgxh4s636594nlbfs9by3a";
};
});
aiohttp = super.aiohttp.overridePythonAttrs (oldAttrs: rec {
version = "2.3.7";
version = "2.3.10";
src = oldAttrs.src.override {
inherit version;
sha256 = "0fzfpx5ny7559xrxaawnylq20dvrkjiag0ypcd13frwwivrlsagy";
sha256 = "8adda6583ba438a4c70693374e10b60168663ffa6564c5c75d3c7a9055290964";
};
});
pytest = super.pytest.overridePythonAttrs (oldAttrs: rec {
Expand All @@ -44,7 +44,7 @@ let
extraBuildInputs = extraPackages py.pkgs;

# Don't forget to run parse-requirements.py after updating
hassVersion = "0.62.1";
hassVersion = "0.63";

in with py.pkgs; buildPythonApplication rec {
pname = "homeassistant";
Expand All @@ -57,7 +57,7 @@ in with py.pkgs; buildPythonApplication rec {
owner = "home-assistant";
repo = "home-assistant";
rev = version;
sha256 = "0151prwk2ci6bih0mdmc3r328nrvazn9jwk0w26wmd4cpvnb5h26";
sha256 = "0gfdhjydl619jpnflnig5hzglib9385hdk5vw5pris0ksqk27mfk";
};

propagatedBuildInputs = [
Expand All @@ -80,9 +80,9 @@ in with py.pkgs; buildPythonApplication rec {
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" ];
makeWrapperArgs = lib.optional skipPip "--add-flags --skip-pip";

meta = with stdenv.lib; {
meta = with lib; {
homepage = https://home-assistant.io/;
description = "Open-source home automation platform running on Python 3";
license = licenses.asl20;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/servers/home-assistant/frontend.nix
Expand Up @@ -2,10 +2,10 @@

buildPythonPackage rec {
pname = "home-assistant-frontend";
version = "20180130.0";
version = "20180209.0";

src = fetchPypi {
inherit pname version;
sha256 = "0b9klisl7hh30rml8qlrp9gpz33z9b825pd1vxbck48k0s98z1zi";
sha256 = "b85f0e833871408a95619ae38d5344701a6466e8f7b5530e718ccc260b68d3ed";
};
}
15 changes: 11 additions & 4 deletions pkgs/servers/home-assistant/parse-requirements.py
Expand Up @@ -52,10 +52,16 @@ def fetch_reqs(version='master'):

def name_to_attr_path(req):
attr_paths = []
pattern = re.compile('python3\\.6-{}-\\d'.format(req), re.I)
for attr_path, package in packages.items():
if pattern.match(package['name']):
attr_paths.append(attr_path)
names = [req]
# E.g. python-mpd2 is actually called python3.6-mpd2
# instead of python-3.6-python-mpd2 inside Nixpkgs
if req.startswith('python-'):
names.append(req[len('python-'):])
for name in names:
pattern = re.compile('^python\\d\\.\\d-{}-\\d'.format(name), re.I)
for attr_path, package in packages.items():
if pattern.match(package['name']):
attr_paths.append(attr_path)
# Let's hope there's only one derivation with a matching name
assert(len(attr_paths) <= 1)
if attr_paths:
Expand All @@ -64,6 +70,7 @@ def name_to_attr_path(req):
return None

version = get_version()
print('Generating component-packages.nix for version {}'.format(version))
requirements = fetch_reqs(version=version)
build_inputs = {}
for component, reqs in requirements.items():
Expand Down

0 comments on commit 06a7281

Please sign in to comment.