summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/mk-python-derivation.nix
diff options
context:
space:
mode:
authorDavHau <hsngrmpf+github@gmail.com>2020-06-27 14:26:03 +0000
committerDavHau <hsngrmpf+github@gmail.com>2020-06-27 14:26:03 +0000
commitd1c1a0c656ccd8bd3b25d3c4287f2d075faf3cf3 (patch)
tree7473a71071659d75482a9aeaaadcd2ea7d45b01f /pkgs/development/interpreters/python/mk-python-derivation.nix
parentd651626eb9ed7a4913ac61147178d498d5867fe9 (diff)
downloadnixpkgs-d1c1a0c656ccd8bd3b25d3c4287f2d075faf3cf3.tar
nixpkgs-d1c1a0c656ccd8bd3b25d3c4287f2d075faf3cf3.tar.gz
nixpkgs-d1c1a0c656ccd8bd3b25d3c4287f2d075faf3cf3.tar.bz2
nixpkgs-d1c1a0c656ccd8bd3b25d3c4287f2d075faf3cf3.tar.lz
nixpkgs-d1c1a0c656ccd8bd3b25d3c4287f2d075faf3cf3.tar.xz
nixpkgs-d1c1a0c656ccd8bd3b25d3c4287f2d075faf3cf3.tar.zst
nixpkgs-d1c1a0c656ccd8bd3b25d3c4287f2d075faf3cf3.zip
fix indentation in mk-python-derivation.nix
Diffstat (limited to 'pkgs/development/interpreters/python/mk-python-derivation.nix')
-rw-r--r--pkgs/development/interpreters/python/mk-python-derivation.nix154
1 files changed, 77 insertions, 77 deletions
diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix
index a632efa416e..df945c645a8 100644
--- a/pkgs/development/interpreters/python/mk-python-derivation.nix
+++ b/pkgs/development/interpreters/python/mk-python-derivation.nix
@@ -105,81 +105,81 @@ let
     "disabled" "checkPhase" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format"
   ]) // {
 
-  name = namePrefix + name;
-
-  nativeBuildInputs = [
-    python
-    wrapPython
-    ensureNewerSourcesForZipFilesHook  # move to wheel installer (pip) or builder (setuptools, flit, ...)?
-    pythonRecompileBytecodeHook  # Remove when solved https://github.com/NixOS/nixpkgs/issues/81441
-    pythonRemoveTestsDirHook
-  ] ++ lib.optionals catchConflicts [
-    setuptools pythonCatchConflictsHook
-  ] ++ lib.optionals removeBinBytecode [
-    pythonRemoveBinBytecodeHook
-  ] ++ lib.optionals (lib.hasSuffix "zip" (attrs.src.name or "")) [
-    unzip
-  ] ++ lib.optionals (format == "setuptools") [
-    setuptoolsBuildHook
-  ] ++ lib.optionals (format == "flit") [
-    flitBuildHook
-  ] ++ lib.optionals (format == "pyproject") [
-    pipBuildHook
-  ] ++ lib.optionals (format == "wheel") [
-    wheelUnpackHook
-  ] ++ lib.optionals (format == "egg") [
-    eggUnpackHook eggBuildHook eggInstallHook
-  ] ++ lib.optionals (!(format == "other") || dontUsePipInstall) [
-    pipInstallHook
-  ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
-    # This is a test, however, it should be ran independent of the checkPhase and checkInputs
-    pythonImportsCheckHook
-  ] ++ lib.optionals (python.pythonAtLeast "3.3") [
-    # Optionally enforce PEP420 for python3
-    pythonNamespacesHook
-  ] ++ nativeBuildInputs;
-
-  buildInputs = buildInputs ++ pythonPath;
-
-  propagatedBuildInputs = propagatedBuildInputs ++ [ python ];
-
-  inherit strictDeps;
-
-  LANG = "${if python.stdenv.isDarwin then "en_US" else "C"}.UTF-8";
-
-  # Python packages don't have a checkPhase, only an installCheckPhase
-  doCheck = false;
-  doInstallCheck = attrs.doCheck or true;
-  installCheckInputs = [
-  ] ++ lib.optionals (format == "setuptools") [
-    # Longer-term we should get rid of this and require
-    # users of this function to set the `installCheckPhase` or
-    # pass in a hook that sets it.
-    setuptoolsCheckHook
-  ] ++ checkInputs;
-
-  postFixup = lib.optionalString (!dontWrapPythonPrograms) ''
-    wrapPythonPrograms
-  '' + attrs.postFixup or '''';
-
-  # Python packages built through cross-compilation are always for the host platform.
-  disallowedReferences = lib.optionals (python.stdenv.hostPlatform != python.stdenv.buildPlatform) [ python.pythonForBuild ];
-
-  # For now, revert recompilation of bytecode.
-  dontUsePythonRecompileBytecode = true;
-
-  meta = {
-    # default to python's platforms
-    platforms = python.meta.platforms;
-    isBuildPythonPackage = python.meta.platforms;
-  } // meta;
-} // lib.optionalAttrs (attrs?checkPhase) {
-  # If given use the specified checkPhase, otherwise use the setup hook.
-  # Longer-term we should get rid of `checkPhase` and use `installCheckPhase`.
-  installCheckPhase = attrs.checkPhase;
-}));
-
-passthru.updateScript = let
-    filename = builtins.head (lib.splitString ":" self.meta.position);
-  in attrs.passthru.updateScript or [ update-python-libraries filename ];
+    name = namePrefix + name;
+
+    nativeBuildInputs = [
+      python
+      wrapPython
+      ensureNewerSourcesForZipFilesHook  # move to wheel installer (pip) or builder (setuptools, flit, ...)?
+      pythonRecompileBytecodeHook  # Remove when solved https://github.com/NixOS/nixpkgs/issues/81441
+      pythonRemoveTestsDirHook
+    ] ++ lib.optionals catchConflicts [
+      setuptools pythonCatchConflictsHook
+    ] ++ lib.optionals removeBinBytecode [
+      pythonRemoveBinBytecodeHook
+    ] ++ lib.optionals (lib.hasSuffix "zip" (attrs.src.name or "")) [
+      unzip
+    ] ++ lib.optionals (format == "setuptools") [
+      setuptoolsBuildHook
+    ] ++ lib.optionals (format == "flit") [
+      flitBuildHook
+    ] ++ lib.optionals (format == "pyproject") [
+      pipBuildHook
+    ] ++ lib.optionals (format == "wheel") [
+      wheelUnpackHook
+    ] ++ lib.optionals (format == "egg") [
+      eggUnpackHook eggBuildHook eggInstallHook
+    ] ++ lib.optionals (!(format == "other") || dontUsePipInstall) [
+      pipInstallHook
+    ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
+      # This is a test, however, it should be ran independent of the checkPhase and checkInputs
+      pythonImportsCheckHook
+    ] ++ lib.optionals (python.pythonAtLeast "3.3") [
+      # Optionally enforce PEP420 for python3
+      pythonNamespacesHook
+    ] ++ nativeBuildInputs;
+
+    buildInputs = buildInputs ++ pythonPath;
+
+    propagatedBuildInputs = propagatedBuildInputs ++ [ python ];
+
+    inherit strictDeps;
+
+    LANG = "${if python.stdenv.isDarwin then "en_US" else "C"}.UTF-8";
+
+    # Python packages don't have a checkPhase, only an installCheckPhase
+    doCheck = false;
+    doInstallCheck = attrs.doCheck or true;
+    installCheckInputs = [
+    ] ++ lib.optionals (format == "setuptools") [
+      # Longer-term we should get rid of this and require
+      # users of this function to set the `installCheckPhase` or
+      # pass in a hook that sets it.
+      setuptoolsCheckHook
+    ] ++ checkInputs;
+
+    postFixup = lib.optionalString (!dontWrapPythonPrograms) ''
+      wrapPythonPrograms
+    '' + attrs.postFixup or '''';
+
+    # Python packages built through cross-compilation are always for the host platform.
+    disallowedReferences = lib.optionals (python.stdenv.hostPlatform != python.stdenv.buildPlatform) [ python.pythonForBuild ];
+
+    # For now, revert recompilation of bytecode.
+    dontUsePythonRecompileBytecode = true;
+
+    meta = {
+      # default to python's platforms
+      platforms = python.meta.platforms;
+      isBuildPythonPackage = python.meta.platforms;
+    } // meta;
+  } // lib.optionalAttrs (attrs?checkPhase) {
+    # If given use the specified checkPhase, otherwise use the setup hook.
+    # Longer-term we should get rid of `checkPhase` and use `installCheckPhase`.
+    installCheckPhase = attrs.checkPhase;
+  }));
+
+  passthru.updateScript = let
+      filename = builtins.head (lib.splitString ":" self.meta.position);
+    in attrs.passthru.updateScript or [ update-python-libraries filename ];
 in lib.extendDerivation true passthru self