Loading pkgs/development/python-modules/pymongo-inmemory/default.nix 0 → 100644 +65 −0 Original line number Diff line number Diff line { lib , buildPythonPackage , pythonOlder , fetchFromGitHub , fetchpatch , poetry-core , pymongo , pytestCheckHook }: buildPythonPackage rec { pname = "pymongo-inmemory"; version = "0.3.1"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "kaizendorks"; repo = "pymongo_inmemory"; rev = "refs/tags/v${version}"; hash = "sha256-1v36cI6JjDZA/uJE85NSMNnoyKI1VCgDrymfnCkpVqU="; }; postPatch = '' # move cache location from nix store to home substituteInPlace pymongo_inmemory/context.py \ --replace \ 'CACHE_FOLDER = path.join(path.dirname(__file__), "..", ".cache")' \ 'CACHE_FOLDER = os.environ.get("XDG_CACHE_HOME", os.environ["HOME"] + "/.cache") + "/pymongo-inmemory"' # fix a broken assumption arising from the above fix substituteInPlace pymongo_inmemory/_utils.py \ --replace \ 'os.mkdir(current_path)' \ 'os.makedirs(current_path)' ''; nativeBuildInputs = [ poetry-core ]; propagatedBuildInputs = [ pymongo ]; nativeCheckInputs = [ pytestCheckHook ]; preCheck = '' export HOME="$(mktemp -d)" ''; pythonImportsCheck = [ "pymongo_inmemory" ]; meta = { homepage = "https://github.com/kaizendorks/pymongo_inmemory"; description = "A mongo mocking library with an ephemeral MongoDB running in memory"; maintainers = with lib.maintainers; [ pbsds ]; license = lib.licenses.mit; }; } pkgs/top-level/python-packages.nix +2 −0 Original line number Diff line number Diff line Loading @@ -9492,6 +9492,8 @@ self: super: with self; { pymongo = callPackage ../development/python-modules/pymongo { }; pymongo-inmemory = callPackage ../development/python-modules/pymongo-inmemory { }; pymoo = callPackage ../development/python-modules/pymoo { }; pymorphy2 = callPackage ../development/python-modules/pymorphy2 { }; Loading Loading
pkgs/development/python-modules/pymongo-inmemory/default.nix 0 → 100644 +65 −0 Original line number Diff line number Diff line { lib , buildPythonPackage , pythonOlder , fetchFromGitHub , fetchpatch , poetry-core , pymongo , pytestCheckHook }: buildPythonPackage rec { pname = "pymongo-inmemory"; version = "0.3.1"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "kaizendorks"; repo = "pymongo_inmemory"; rev = "refs/tags/v${version}"; hash = "sha256-1v36cI6JjDZA/uJE85NSMNnoyKI1VCgDrymfnCkpVqU="; }; postPatch = '' # move cache location from nix store to home substituteInPlace pymongo_inmemory/context.py \ --replace \ 'CACHE_FOLDER = path.join(path.dirname(__file__), "..", ".cache")' \ 'CACHE_FOLDER = os.environ.get("XDG_CACHE_HOME", os.environ["HOME"] + "/.cache") + "/pymongo-inmemory"' # fix a broken assumption arising from the above fix substituteInPlace pymongo_inmemory/_utils.py \ --replace \ 'os.mkdir(current_path)' \ 'os.makedirs(current_path)' ''; nativeBuildInputs = [ poetry-core ]; propagatedBuildInputs = [ pymongo ]; nativeCheckInputs = [ pytestCheckHook ]; preCheck = '' export HOME="$(mktemp -d)" ''; pythonImportsCheck = [ "pymongo_inmemory" ]; meta = { homepage = "https://github.com/kaizendorks/pymongo_inmemory"; description = "A mongo mocking library with an ephemeral MongoDB running in memory"; maintainers = with lib.maintainers; [ pbsds ]; license = lib.licenses.mit; }; }
pkgs/top-level/python-packages.nix +2 −0 Original line number Diff line number Diff line Loading @@ -9492,6 +9492,8 @@ self: super: with self; { pymongo = callPackage ../development/python-modules/pymongo { }; pymongo-inmemory = callPackage ../development/python-modules/pymongo-inmemory { }; pymoo = callPackage ../development/python-modules/pymoo { }; pymorphy2 = callPackage ../development/python-modules/pymorphy2 { }; Loading