about summary refs log tree commit diff
path: root/pkgs/tools/package-management/pdm/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/package-management/pdm/default.nix')
-rw-r--r--pkgs/tools/package-management/pdm/default.nix121
1 files changed, 55 insertions, 66 deletions
diff --git a/pkgs/tools/package-management/pdm/default.nix b/pkgs/tools/package-management/pdm/default.nix
index c7856bde2796..234a6265144b 100644
--- a/pkgs/tools/package-management/pdm/default.nix
+++ b/pkgs/tools/package-management/pdm/default.nix
@@ -1,73 +1,65 @@
-{ lib
-, python3
-, fetchPypi
-, nix-update-script
-, runtimeShell
-, installShellFiles
-, testers
-, pdm
+{
+  lib,
+  python3,
+  fetchFromGitHub,
+  runtimeShell,
+  installShellFiles,
+  testers,
+  pdm,
 }:
 
-with python3.pkgs;
-buildPythonApplication rec {
+python3.pkgs.buildPythonApplication rec {
   pname = "pdm";
-  version = "2.18.0";
+  version = "2.18.1";
   pyproject = true;
 
-  disabled = pythonOlder "3.8";
+  disabled = python3.pkgs.pythonOlder "3.8";
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-+WP48VWMD/lNrYK54xIS1V0MWdIVIH4PXgQG1Bsql9w=";
+  src = fetchFromGitHub {
+    owner = "pdm-project";
+    repo = "pdm";
+    rev = "refs/tags/${version}";
+    hash = "sha256-pCBwt55tu9bEVVHfdPsJ5vaJXVXEZ2+4ft9LathwBt0=";
   };
 
-  nativeBuildInputs = [
-    installShellFiles
-  ];
+  nativeBuildInputs = [ installShellFiles ];
 
-  build-system = [
+  build-system = with python3.pkgs; [
     pdm-backend
     pdm-build-locked
   ];
 
-  dependencies = [
-    blinker
-    dep-logic
-    filelock
-    findpython
-    hishel
-    httpx
-    installer
-    msgpack
-    packaging
-    pbs-installer
-    platformdirs
-    pyproject-hooks
-    python-dotenv
-    resolvelib
-    rich
-    shellingham
-    tomlkit
-    unearth
-    virtualenv
-  ] ++ httpx.optional-dependencies.socks
-  ++ lib.optionals (pythonOlder "3.11") [
-    tomli
-  ]
-  ++ lib.optionals (pythonOlder "3.10") [
-    importlib-metadata
-  ]
-  ++ lib.optionals (pythonAtLeast "3.10") [
-    truststore
-  ];
-
-  makeWrapperArgs = [
-    "--set PDM_CHECK_UPDATE 0"
-  ];
-
+  dependencies =
+    with python3.pkgs;
+    [
+      blinker
+      dep-logic
+      filelock
+      findpython
+      hishel
+      httpx
+      installer
+      msgpack
+      packaging
+      pbs-installer
+      platformdirs
+      pyproject-hooks
+      python-dotenv
+      resolvelib
+      rich
+      shellingham
+      tomlkit
+      truststore
+      unearth
+      virtualenv
+    ]
+    ++ httpx.optional-dependencies.socks;
+
+  makeWrapperArgs = [ "--set PDM_CHECK_UPDATE 0" ];
+
+  # Silence network warning during pypaInstallPhase
+  # by disabling latest version check
   preInstall = ''
-    # Silence network warning during pypaInstallPhase
-    # by disabling latest version check
     export PDM_CHECK_UPDATE=0
   '';
 
@@ -80,7 +72,7 @@ buildPythonApplication rec {
     unset PDM_LOG_DIR
   '';
 
-  nativeCheckInputs = [
+  nativeCheckInputs = with python3.pkgs; [
     first
     pytestCheckHook
     pytest-mock
@@ -88,9 +80,7 @@ buildPythonApplication rec {
     pytest-httpserver
   ];
 
-  pytestFlagsArray = [
-    "-m 'not network'"
-  ];
+  pytestFlagsArray = [ "-m 'not network'" ];
 
   preCheck = ''
     export HOME=$TMPDIR
@@ -115,18 +105,17 @@ buildPythonApplication rec {
 
   __darwinAllowLocalNetworking = true;
 
-  passthru.tests.version = testers.testVersion {
-    package = pdm;
-  };
-
-  passthru.updateScript = nix-update-script { };
+  passthru.tests.version = testers.testVersion { package = pdm; };
 
   meta = with lib; {
     homepage = "https://pdm-project.org";
     changelog = "https://github.com/pdm-project/pdm/releases/tag/${version}";
     description = "Modern Python package and dependency manager supporting the latest PEP standards";
     license = licenses.mit;
-    maintainers = with maintainers; [ cpcloud ];
+    maintainers = with maintainers; [
+      cpcloud
+      natsukium
+    ];
     mainProgram = "pdm";
   };
 }