diff --git a/pkgs/applications/version-management/dvc/default.nix b/pkgs/development/python-modules/dvc/default.nix similarity index 60% rename from pkgs/applications/version-management/dvc/default.nix rename to pkgs/development/python-modules/dvc/default.nix index 1cfa62ea6d47..c80c66709363 100644 --- a/pkgs/applications/version-management/dvc/default.nix +++ b/pkgs/development/python-modules/dvc/default.nix @@ -1,14 +1,59 @@ { lib -, python3 +, buildPythonPackage , fetchFromGitHub , fetchpatch +, pythonOlder +, pythonRelaxDepsHook +, setuptools-scm +, appdirs +, colorama +, configobj +, distro +, dpath +, dvc-azure +, dvc-data +, dvc-gs +, dvc-http +, dvc-render +, dvc-s3 +, dvc-ssh +, dvc-studio-client +, dvc-task +, flatten-dict +, flufl_lock +, funcy +, grandalf +, hydra-core +, importlib-metadata +, importlib-resources +, iterative-telemetry +, networkx +, packaging +, pathspec +, platformdirs +, psutil +, pydot +, pygtrie +, pyparsing +, requests +, rich +, ruamel-yaml +, scmrepo +, shortuuid +, shtab +, tabulate +, tomlkit +, tqdm +, typing-extensions +, voluptuous +, zc_lockfile , enableGoogle ? false , enableAWS ? false , enableAzure ? false , enableSSH ? false }: -python3.pkgs.buildPythonApplication rec { +buildPythonPackage rec { pname = "dvc"; version = "3.8.1"; format = "pyproject"; @@ -31,12 +76,12 @@ python3.pkgs.buildPythonApplication rec { --subst-var-by dvc "$out/bin/dcv" ''; - nativeBuildInputs = with python3.pkgs; [ + nativeBuildInputs = [ pythonRelaxDepsHook setuptools-scm ]; - propagatedBuildInputs = with python3.pkgs; [ + propagatedBuildInputs = [ appdirs colorama configobj @@ -73,20 +118,24 @@ python3.pkgs.buildPythonApplication rec { typing-extensions voluptuous zc_lockfile - ] ++ lib.optionals enableGoogle [ - dvc-gs - ] ++ lib.optionals enableAWS [ - dvc-s3 - ] ++ lib.optionals enableAzure [ - dvc-azure - ] ++ lib.optionals enableSSH [ - dvc-ssh - ] ++ lib.optionals (pythonOlder "3.8") [ + ] + ++ lib.optionals enableGoogle passthru.optional-dependencies.gs + ++ lib.optionals enableAWS passthru.optional-dependencies.s3 + ++ lib.optionals enableAzure passthru.optional-dependencies.azure + ++ lib.optionals enableSSH passthru.optional-dependencies.ssh + ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ]; + passthru.optional-dependencies = { + azure = [ dvc-azure ]; + gs = [ dvc-gs ]; + s3 = [ dvc-s3 ]; + ssh = [ dvc-ssh ]; + }; + # Tests require access to real cloud services doCheck = false; diff --git a/pkgs/applications/version-management/dvc/dvc-daemon.patch b/pkgs/development/python-modules/dvc/dvc-daemon.patch similarity index 100% rename from pkgs/applications/version-management/dvc/dvc-daemon.patch rename to pkgs/development/python-modules/dvc/dvc-daemon.patch diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 03e83e1b45e3..63b0967758d6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5025,9 +5025,9 @@ with pkgs; duperemove = callPackage ../tools/filesystems/duperemove { }; - dvc = callPackage ../applications/version-management/dvc { }; + dvc = with python3.pkgs; toPythonApplication dvc; - dvc-with-remotes = callPackage ../applications/version-management/dvc { + dvc-with-remotes = dvc.override { enableGoogle = true; enableAWS = true; enableAzure = true; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cf100d385b5f..31918ecb4d8a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3187,6 +3187,8 @@ self: super: with self; { durus = callPackage ../development/python-modules/durus { }; + dvc = callPackage ../development/python-modules/dvc { }; + dvc-azure = callPackage ../development/python-modules/dvc-azure { }; dvc-data = callPackage ../development/python-modules/dvc-data { };