about summary refs log tree commit diff
path: root/pkgs/development/python-modules/doit/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/doit/default.nix')
-rw-r--r--pkgs/development/python-modules/doit/default.nix129
1 files changed, 68 insertions, 61 deletions
diff --git a/pkgs/development/python-modules/doit/default.nix b/pkgs/development/python-modules/doit/default.nix
index f855de38ffa2a..188fb1ddbb3b7 100644
--- a/pkgs/development/python-modules/doit/default.nix
+++ b/pkgs/development/python-modules/doit/default.nix
@@ -1,72 +1,79 @@
-{ lib
-, stdenv
-, fetchPypi
-, buildPythonPackage
-, importlib-metadata
-, isPy3k
-, mock
-, pytestCheckHook
-, cloudpickle
-, pyinotify
-, macfsevents
-, toml
-, doit-py
-, pyflakes
-, configclass
-, mergedict
+{
+  lib,
+  stdenv,
+  fetchPypi,
+  buildPythonPackage,
+  importlib-metadata,
+  isPy3k,
+  mock,
+  pytestCheckHook,
+  cloudpickle,
+  pyinotify,
+  macfsevents,
+  toml,
+  doit-py,
+  pyflakes,
+  configclass,
+  mergedict,
 }:
 
-let doit = buildPythonPackage rec {
-  pname = "doit";
-  version = "0.36.0";
-  format = "setuptools";
+let
+  doit = buildPythonPackage rec {
+    pname = "doit";
+    version = "0.36.0";
+    format = "setuptools";
 
-  disabled = !isPy3k;
+    disabled = !isPy3k;
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-cdB8zJUUyyL+WdmJmVd2ZeqrV+FvZE0EM2rgtLriNLw=";
-  };
+    src = fetchPypi {
+      inherit pname version;
+      hash = "sha256-cdB8zJUUyyL+WdmJmVd2ZeqrV+FvZE0EM2rgtLriNLw=";
+    };
 
-  propagatedBuildInputs = [
-    cloudpickle
-    importlib-metadata
-    toml
-  ] ++ lib.optional stdenv.isLinux pyinotify
-    ++ lib.optional stdenv.isDarwin macfsevents;
+    propagatedBuildInputs =
+      [
+        cloudpickle
+        importlib-metadata
+        toml
+      ]
+      ++ lib.optional stdenv.hostPlatform.isLinux pyinotify
+      ++ lib.optional stdenv.hostPlatform.isDarwin macfsevents;
 
-  nativeCheckInputs = [
-    configclass
-    doit-py
-    mergedict
-    mock
-    pyflakes
-    pytestCheckHook
-  ];
+    nativeCheckInputs = [
+      configclass
+      doit-py
+      mergedict
+      mock
+      pyflakes
+      pytestCheckHook
+    ];
 
-  # escape infinite recursion with doit-py
-  doCheck = false;
+    # escape infinite recursion with doit-py
+    doCheck = false;
 
-  passthru.tests = {
-    # hangs on darwin
-    check = doit.overridePythonAttrs (_: { doCheck = !stdenv.isDarwin; });
-  };
+    passthru.tests = {
+      # hangs on darwin
+      check = doit.overridePythonAttrs (_: {
+        doCheck = !stdenv.hostPlatform.isDarwin;
+      });
+    };
 
-  pythonImportsCheck = [ "doit" ];
+    pythonImportsCheck = [ "doit" ];
 
-  meta = with lib; {
-    homepage = "https://pydoit.org/";
-    description = "A task management & automation tool";
-    mainProgram = "doit";
-    license = licenses.mit;
-    longDescription = ''
-      doit is a modern open-source build-tool written in python
-      designed to be simple to use and flexible to deal with complex
-      work-flows. It is specially suitable for building and managing
-      custom work-flows where there is no out-of-the-box solution
-      available.
-    '';
-    maintainers = with maintainers; [ pSub ];
+    meta = with lib; {
+      homepage = "https://pydoit.org/";
+      description = "Task management & automation tool";
+      mainProgram = "doit";
+      license = licenses.mit;
+      longDescription = ''
+        doit is a modern open-source build-tool written in python
+        designed to be simple to use and flexible to deal with complex
+        work-flows. It is specially suitable for building and managing
+        custom work-flows where there is no out-of-the-box solution
+        available.
+      '';
+      maintainers = with maintainers; [ pSub ];
+    };
   };
-
-}; in doit
+in
+doit