about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/platformdirs
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/platformdirs')
-rw-r--r--nixpkgs/pkgs/development/python-modules/platformdirs/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/platformdirs/default.nix b/nixpkgs/pkgs/development/python-modules/platformdirs/default.nix
new file mode 100644
index 000000000000..c807faff9d0b
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/platformdirs/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, appdirs
+, buildPythonPackage
+, fetchFromGitHub
+, hatch-vcs
+, hatchling
+, pytest-mock
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "platformdirs";
+  version = "3.0.0";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "refs/tags/${version}";
+    hash = "sha256-RiZ26BGqS8nN5qHpUt7LIXSck/cGM8qlet3uL81TyPo=";
+  };
+
+  SETUPTOOLS_SCM_PRETEND_VERSION = version;
+
+  nativeBuildInputs = [
+    hatchling
+    hatch-vcs
+  ];
+
+  nativeCheckInputs = [
+    appdirs
+    pytest-mock
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "platformdirs"
+  ];
+
+  meta = with lib; {
+    description = "Module for determining appropriate platform-specific directories";
+    homepage = "https://platformdirs.readthedocs.io/";
+    changelog = "https://github.com/platformdirs/platformdirs/releases/tag/${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ fab ];
+  };
+}