diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index c2f79753bd1..3f764b1d845 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/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 @@ -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; }; } diff --git a/pkgs/development/python-modules/astral/default.nix b/pkgs/development/python-modules/astral/default.nix index 76dba87f964..c6a3ac47aa7 100644 --- a/pkgs/development/python-modules/astral/default.nix +++ b/pkgs/development/python-modules/astral/default.nix @@ -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 ]; diff --git a/pkgs/development/python-modules/h5py/default.nix b/pkgs/development/python-modules/h5py/default.nix index e9bae3f8206..bdbdcdcc2e7 100644 --- a/pkgs/development/python-modules/h5py/default.nix +++ b/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; @@ -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 ""; @@ -33,7 +37,7 @@ in buildPythonPackage rec { ++ optional mpiSupport mpi ; propagatedBuildInputs = [ numpy six] - ++ optional mpiSupport mpi4py + ++ optionals mpiSupport [ mpi4py openssh ] ; meta = { diff --git a/pkgs/development/python-modules/mpi4py/default.nix b/pkgs/development/python-modules/mpi4py/default.nix index fcbca62ff9d..d4750f252ad 100644 --- a/pkgs/development/python-modules/mpi4py/default.nix +++ b/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"; @@ -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 = '' @@ -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 = diff --git a/pkgs/os-specific/linux/eudev/default.nix b/pkgs/os-specific/linux/eudev/default.nix index 67ce39ddbd3..0ca85c7e50b 100644 --- a/pkgs/os-specific/linux/eudev/default.nix +++ b/pkgs/os-specific/linux/eudev/default.nix @@ -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 ]; diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 679ca2afd43..4903c4db092 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -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; [ ]; @@ -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; [ ]; @@ -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; [ ]; @@ -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; [ ]; @@ -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; [ ]; @@ -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 ]; @@ -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; [ ]; @@ -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; [ ]; @@ -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; [ ]; diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index eed800fa7d3..cafb84e333a 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, python3 +{ lib, fetchFromGitHub, python3 , extraComponents ? [] , extraPackages ? ps: [] , skipPip ? true }: @@ -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 { @@ -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"; @@ -57,7 +57,7 @@ in with py.pkgs; buildPythonApplication rec { owner = "home-assistant"; repo = "home-assistant"; rev = version; - sha256 = "0151prwk2ci6bih0mdmc3r328nrvazn9jwk0w26wmd4cpvnb5h26"; + sha256 = "0gfdhjydl619jpnflnig5hzglib9385hdk5vw5pris0ksqk27mfk"; }; propagatedBuildInputs = [ @@ -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; diff --git a/pkgs/servers/home-assistant/frontend.nix b/pkgs/servers/home-assistant/frontend.nix index 6e1a789012f..018405f578d 100644 --- a/pkgs/servers/home-assistant/frontend.nix +++ b/pkgs/servers/home-assistant/frontend.nix @@ -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"; }; } diff --git a/pkgs/servers/home-assistant/parse-requirements.py b/pkgs/servers/home-assistant/parse-requirements.py index aa293921e87..5af794e75fa 100755 --- a/pkgs/servers/home-assistant/parse-requirements.py +++ b/pkgs/servers/home-assistant/parse-requirements.py @@ -52,10 +52,16 @@ packages = json.loads(output) 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: @@ -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():