From 0a1695b0241b56de84f7366cbf455ac64e6844e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 23 Jun 2021 00:30:31 +0200 Subject: [PATCH 1/2] ceph: use packageOverrides --- pkgs/tools/filesystems/ceph/default.nix | 37 +++++++++++++++++-------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index 52bce3f274df..a25bf744a91a 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -2,7 +2,7 @@ , ensureNewerSourcesHook , cmake, pkg-config , which, git -, boost, python3Packages +, boost , libxml2, zlib, lz4 , openldap, lttng-ust , babeltrace, gperf @@ -92,19 +92,35 @@ let platforms = [ "x86_64-linux" "aarch64-linux" ]; }; - ceph-common = python3Packages.buildPythonPackage rec{ + ceph-common = python.pkgs.buildPythonPackage rec{ pname = "ceph-common"; inherit src version; sourceRoot = "ceph-${version}/src/python-common"; - checkInputs = [ python3Packages.pytest ]; - propagatedBuildInputs = with python3Packages; [ pyyaml six ]; + checkInputs = [ python.pkgs.pytest ]; + propagatedBuildInputs = with python.pkgs; [ pyyaml six ]; meta = getMeta "Ceph common module for code shared by manager modules"; }; - ceph-python-env = python3Packages.python.withPackages (ps: [ + python = python3.override { + packageOverrides = self: super: { + # scipy > 1.3 breaks diskprediction_local, leading to mgr hang on startup + # Bump once these issues are resolved: + # https://tracker.ceph.com/issues/42764 https://tracker.ceph.com/issues/45147 + scipy = super.scipy.overridePythonAttrs (oldAttrs: rec { + version = "1.3.3"; + src = oldAttrs.src.override { + inherit version; + sha256 = "02iqb7ws7fw5fd1a83hx705pzrw1imj7z0bphjsl4bfvw254xgv4"; + }; + doCheck = false; + }); + }; + }; + + ceph-python-env = python.withPackages (ps: [ ps.sphinx ps.flask ps.cython @@ -122,10 +138,7 @@ let ps.pyjwt ps.webob ps.bcrypt - # scipy > 1.3 breaks diskprediction_local, leading to mgr hang on startup - # Bump (and get rid of scipy_1_3) once these issues are resolved: - # https://tracker.ceph.com/issues/42764 https://tracker.ceph.com/issues/45147 - ps.scipy_1_3 + ps.scipy ps.six ps.pyyaml ]); @@ -147,10 +160,10 @@ in rec { nativeBuildInputs = [ cmake - pkg-config which git python3Packages.wrapPython makeWrapper - python3Packages.python # for the toPythonPath function + pkg-config which git python.pkgs.wrapPython makeWrapper + python.pkgs.python # for the toPythonPath function (ensureNewerSourcesHook { year = "1980"; }) - python3 + python fmt # for building docs/man-pages presumably doxygen From 0bce48d5b77d399b5a127bef68b9b84898e19dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 23 Jun 2021 00:31:28 +0200 Subject: [PATCH 2/2] pythonPackages.scipy_1_3: drop Versioned attributes in python-packages.nix should be avoided. --- pkgs/top-level/python-packages.nix | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 29913ff47bc0..7056c935efc3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7702,16 +7702,6 @@ in { scikit-tda = callPackage ../development/python-modules/scikit-tda { }; - scipy_1_3 = self.scipy.overridePythonAttrs (oldAttrs: rec { - version = "1.3.3"; - src = oldAttrs.src.override { - inherit version; - sha256 = "02iqb7ws7fw5fd1a83hx705pzrw1imj7z0bphjsl4bfvw254xgv4"; - }; - doCheck = false; - disabled = !isPy3k; - }); - scipy_1_4 = self.scipy.overridePythonAttrs (oldAttrs: rec { version = "1.4.1"; src = oldAttrs.src.override {