From e013f0d81ac7fb9e0b33de1df8bea33e8679ad17 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Fri, 19 Jan 2018 16:16:35 -0800 Subject: [PATCH 1/8] openmpi: 1.10.7->3.0.0, add markuskowa as maintainer * add license * update description * add markuskowa as maintainer --- .../development/libraries/openmpi/default.nix | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index c2f79753bd1..c8cfec3ab2d 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 @@ -10,41 +10,47 @@ 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 ] + ++ optional isLinux libnl + ++ optional (isLinux || isFreeBSD) rdma-core; nativeBuildInputs = [ perl ]; configureFlags = [] + ++ optional stdenv.isLinux "--with-libnl=${libnl.dev}" ++ optional enableSGE "--with-sge" ++ 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 ''; + doCheck = true; + meta = { 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; }; } From 58765282f821216795a75c5cc130a75a02120df8 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 25 Jan 2018 13:31:45 -0800 Subject: [PATCH 2/8] openmpi: refactor --- pkgs/development/libraries/openmpi/default.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index c8cfec3ab2d..3f764b1d845 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -7,8 +7,6 @@ , enablePrefix ? false }: -with stdenv.lib; - let majorVersion = "3.0"; minorVersion = "0"; @@ -26,15 +24,15 @@ in stdenv.mkDerivation rec { ''; buildInputs = with stdenv; [ gfortran zlib ] - ++ optional isLinux libnl - ++ optional (isLinux || isFreeBSD) rdma-core; + ++ lib.optional isLinux libnl + ++ lib.optional (isLinux || isFreeBSD) rdma-core; nativeBuildInputs = [ perl ]; - configureFlags = [] - ++ optional stdenv.isLinux "--with-libnl=${libnl.dev}" - ++ 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; @@ -45,7 +43,7 @@ in stdenv.mkDerivation rec { doCheck = true; - meta = { + meta = with stdenv.lib; { homepage = http://www.open-mpi.org/; 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."; From aa83877cf874f38d998262e25e5cf1e547181e2f Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Fri, 26 Jan 2018 18:26:22 -0800 Subject: [PATCH 3/8] mpi4py/h5py: fix test to run reliably with openmpi-3 --- pkgs/development/python-modules/h5py/default.nix | 8 ++++++-- pkgs/development/python-modules/mpi4py/default.nix | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) 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..9329d386099 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"; @@ -28,11 +28,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 = From 0577bc4832d67e77a9f224c8b04aef1d80c9ed8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 3 Feb 2018 01:17:10 +0100 Subject: [PATCH 4/8] pythonPackages.astral: 1.4 -> 1.5 --- pkgs/development/python-modules/astral/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 ]; From b1603e951effe2dd1149d8ade015b757a7fb4c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 10 Feb 2018 23:18:41 +0100 Subject: [PATCH 5/8] home-assistant: make parse-requirements.py detect more packages --- pkgs/servers/home-assistant/parse-requirements.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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(): From 7b616b624096d06e6702e106dcbf926b8bdaf2ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 10 Feb 2018 23:19:19 +0100 Subject: [PATCH 6/8] home-assistant: 0.62.1 -> 0.63 --- .../home-assistant/component-packages.nix | 17 ++++++++++++----- pkgs/servers/home-assistant/default.nix | 18 +++++++++--------- pkgs/servers/home-assistant/frontend.nix | 4 ++-- 3 files changed, 23 insertions(+), 16 deletions(-) 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"; }; } From 97ee203a2264f798a36c6d52710e02f62c6b5e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Gaspard?= Date: Sat, 10 Feb 2018 23:28:30 +0100 Subject: [PATCH 7/8] eudev: 3.2.4 -> 3.2.5 --- pkgs/os-specific/linux/eudev/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ]; From 389a130e6df3ef4e918e1fea7e4026c2584c1290 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sat, 10 Feb 2018 22:34:36 -0800 Subject: [PATCH 8/8] mpi4py: disable test_spawn.py test_spawn.py fails when build with openmpi-3.0.0 in a sandboxed environment. --- pkgs/development/python-modules/mpi4py/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/mpi4py/default.nix b/pkgs/development/python-modules/mpi4py/default.nix index 9329d386099..d4750f252ad 100644 --- a/pkgs/development/python-modules/mpi4py/default.nix +++ b/pkgs/development/python-modules/mpi4py/default.nix @@ -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 = ''