about summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2023-07-25 13:27:31 +0000
committerJan Malakhovski <oxij@oxij.org>2023-08-03 16:32:03 +0000
commit5852f26bdcdca4a33b37d1631cfb3897bcc36fcc (patch)
tree84541d3de93f39e98f7fabc53094498c6defbc74 /pkgs/development/python-modules
parent9aabdcf43f70b18bdebc39d7796c984672603d3e (diff)
treewide: noop: refer to `src.name` or similar in `sourceRoot` where appropriate, part 1: trivial cases
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/aardwolf/default.nix2
-rw-r--r--pkgs/development/python-modules/acme/default.nix2
-rw-r--r--pkgs/development/python-modules/antlr4-python3-runtime/default.nix2
-rw-r--r--pkgs/development/python-modules/apache-beam/default.nix2
-rw-r--r--pkgs/development/python-modules/basemap-data/default.nix2
-rw-r--r--pkgs/development/python-modules/basemap/default.nix2
-rw-r--r--pkgs/development/python-modules/capstone/default.nix2
-rw-r--r--pkgs/development/python-modules/certbot-dns-cloudflare/default.nix2
-rw-r--r--pkgs/development/python-modules/certbot-dns-google/default.nix2
-rw-r--r--pkgs/development/python-modules/certbot-dns-rfc2136/default.nix2
-rw-r--r--pkgs/development/python-modules/certbot-dns-route53/default.nix2
-rw-r--r--pkgs/development/python-modules/certbot/default.nix2
-rw-r--r--pkgs/development/python-modules/chart-studio/default.nix2
-rw-r--r--pkgs/development/python-modules/chirpstack-api/default.nix2
-rw-r--r--pkgs/development/python-modules/cirq-aqt/default.nix2
-rw-r--r--pkgs/development/python-modules/cirq-core/default.nix2
-rw-r--r--pkgs/development/python-modules/cirq-google/default.nix2
-rw-r--r--pkgs/development/python-modules/cirq-ionq/default.nix2
-rw-r--r--pkgs/development/python-modules/cirq-pasqal/default.nix2
-rw-r--r--pkgs/development/python-modules/cirq-rigetti/default.nix2
-rw-r--r--pkgs/development/python-modules/cirq-web/default.nix2
-rw-r--r--pkgs/development/python-modules/ctranslate2/default.nix2
-rw-r--r--pkgs/development/python-modules/dask-gateway/default.nix2
-rw-r--r--pkgs/development/python-modules/edlib/default.nix2
-rw-r--r--pkgs/development/python-modules/extractcode/7z.nix2
-rw-r--r--pkgs/development/python-modules/extractcode/libarchive.nix2
-rw-r--r--pkgs/development/python-modules/flatbuffers/default.nix2
-rw-r--r--pkgs/development/python-modules/gb-io/default.nix2
-rw-r--r--pkgs/development/python-modules/gremlinpython/default.nix2
-rw-r--r--pkgs/development/python-modules/hexdump/default.nix3
-rw-r--r--pkgs/development/python-modules/libcst/default.nix2
-rw-r--r--pkgs/development/python-modules/openrazer/pylib.nix2
-rw-r--r--pkgs/development/python-modules/protobuf/default.nix2
-rw-r--r--pkgs/development/python-modules/pykdl/default.nix2
-rw-r--r--pkgs/development/python-modules/python-csxcad/default.nix2
-rw-r--r--pkgs/development/python-modules/python-olm/default.nix2
-rw-r--r--pkgs/development/python-modules/python-openems/default.nix2
-rw-r--r--pkgs/development/python-modules/safetensors/default.nix4
-rw-r--r--pkgs/development/python-modules/sentencepiece/default.nix2
-rw-r--r--pkgs/development/python-modules/simpleitk/default.nix2
-rw-r--r--pkgs/development/python-modules/tokenizers/default.nix2
-rw-r--r--pkgs/development/python-modules/typecode/libmagic.nix2
-rw-r--r--pkgs/development/python-modules/unicorn/default.nix2
-rw-r--r--pkgs/development/python-modules/zxing_cpp/default.nix2
44 files changed, 46 insertions, 45 deletions
diff --git a/pkgs/development/python-modules/aardwolf/default.nix b/pkgs/development/python-modules/aardwolf/default.nix
index 83db24896cbca..3b92fc06a915d 100644
--- a/pkgs/development/python-modules/aardwolf/default.nix
+++ b/pkgs/development/python-modules/aardwolf/default.nix
@@ -38,7 +38,7 @@ buildPythonPackage rec {
 
   cargoDeps = rustPlatform.fetchCargoTarball {
     inherit src;
-    sourceRoot = "source/aardwolf/utils/rlers";
+    sourceRoot = "${src.name}/aardwolf/utils/rlers";
     name = "${pname}-${version}";
     hash = "sha256-JGXTCCyC20EuUX0pP3xSZG3qFB5jRL7+wW2YRC3EiCc=";
   };
diff --git a/pkgs/development/python-modules/acme/default.nix b/pkgs/development/python-modules/acme/default.nix
index 97e725bb7119a..531ed8ae8d9bb 100644
--- a/pkgs/development/python-modules/acme/default.nix
+++ b/pkgs/development/python-modules/acme/default.nix
@@ -27,7 +27,7 @@ buildPythonPackage rec {
   doCheck = false;
   pythonImportsCheck = [ "acme" ];
 
-  sourceRoot = "source/${pname}";
+  sourceRoot = "${src.name}/${pname}";
 
   meta = certbot.meta // {
     description = "ACME protocol implementation in Python";
diff --git a/pkgs/development/python-modules/antlr4-python3-runtime/default.nix b/pkgs/development/python-modules/antlr4-python3-runtime/default.nix
index 4f5f25d0159b6..39fef995bf98c 100644
--- a/pkgs/development/python-modules/antlr4-python3-runtime/default.nix
+++ b/pkgs/development/python-modules/antlr4-python3-runtime/default.nix
@@ -9,7 +9,7 @@ buildPythonPackage rec {
   inherit (antlr4.runtime.cpp) version src;
   disabled = python.pythonOlder "3.6";
 
-  sourceRoot = "source/runtime/Python3";
+  sourceRoot = "${src.name}/runtime/Python3";
 
   # in 4.9, test was renamed to tests
   checkPhase = ''
diff --git a/pkgs/development/python-modules/apache-beam/default.nix b/pkgs/development/python-modules/apache-beam/default.nix
index ecae25b067f93..c8bd564697021 100644
--- a/pkgs/development/python-modules/apache-beam/default.nix
+++ b/pkgs/development/python-modules/apache-beam/default.nix
@@ -87,7 +87,7 @@ buildPythonPackage rec {
     "pyarrow"
   ];
 
-  sourceRoot = "source/sdks/python";
+  sourceRoot = "${src.name}/sdks/python";
 
   nativeBuildInputs = [
     cython
diff --git a/pkgs/development/python-modules/basemap-data/default.nix b/pkgs/development/python-modules/basemap-data/default.nix
index ebdbbe4d15949..158c3f3f19c4e 100644
--- a/pkgs/development/python-modules/basemap-data/default.nix
+++ b/pkgs/development/python-modules/basemap-data/default.nix
@@ -17,7 +17,7 @@ buildPythonPackage rec {
   pname = "basemap-data";
   inherit (basemap) version src;
 
-  sourceRoot = "source/packages/basemap_data";
+  sourceRoot = "${src.name}/packages/basemap_data";
 
   # no tests
   doCheck = false;
diff --git a/pkgs/development/python-modules/basemap/default.nix b/pkgs/development/python-modules/basemap/default.nix
index 8db89a43266bf..578fd84db77c1 100644
--- a/pkgs/development/python-modules/basemap/default.nix
+++ b/pkgs/development/python-modules/basemap/default.nix
@@ -26,7 +26,7 @@ buildPythonPackage rec {
     hash = "sha256-oWKCUARTMCiXDp4SCOOrOUQLUDU4DIzwsmUXCXoDvx0=";
   };
 
-  sourceRoot = "source/packages/basemap";
+  sourceRoot = "${src.name}/packages/basemap";
 
   nativeBuildInputs = [
     cython
diff --git a/pkgs/development/python-modules/capstone/default.nix b/pkgs/development/python-modules/capstone/default.nix
index f1a37fb70a0f1..6846ed86f6f8a 100644
--- a/pkgs/development/python-modules/capstone/default.nix
+++ b/pkgs/development/python-modules/capstone/default.nix
@@ -10,7 +10,7 @@ buildPythonPackage rec {
   version = lib.getVersion capstone;
 
   src = capstone.src;
-  sourceRoot = "source/bindings/python";
+  sourceRoot = "${src.name}/bindings/python";
 
   postPatch = ''
     ln -s ${capstone}/lib/libcapstone${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/
diff --git a/pkgs/development/python-modules/certbot-dns-cloudflare/default.nix b/pkgs/development/python-modules/certbot-dns-cloudflare/default.nix
index fc6a645ade637..d60e1e60d9740 100644
--- a/pkgs/development/python-modules/certbot-dns-cloudflare/default.nix
+++ b/pkgs/development/python-modules/certbot-dns-cloudflare/default.nix
@@ -24,7 +24,7 @@ buildPythonPackage rec {
 
   pytestFlagsArray = [ "-o cache_dir=$(mktemp -d)" ];
 
-  sourceRoot = "source/certbot-dns-cloudflare";
+  sourceRoot = "${src.name}/certbot-dns-cloudflare";
 
   meta = certbot.meta // {
     description = "Cloudflare DNS Authenticator plugin for Certbot";
diff --git a/pkgs/development/python-modules/certbot-dns-google/default.nix b/pkgs/development/python-modules/certbot-dns-google/default.nix
index 6a320209ecf10..6ceaac115ff71 100644
--- a/pkgs/development/python-modules/certbot-dns-google/default.nix
+++ b/pkgs/development/python-modules/certbot-dns-google/default.nix
@@ -26,7 +26,7 @@ buildPythonPackage rec {
 
   pytestFlagsArray = [ "-o cache_dir=$(mktemp -d)" ];
 
-  sourceRoot = "source/certbot-dns-google";
+  sourceRoot = "${src.name}/certbot-dns-google";
 
   meta = certbot.meta // {
     description = "Google Cloud DNS Authenticator plugin for Certbot";
diff --git a/pkgs/development/python-modules/certbot-dns-rfc2136/default.nix b/pkgs/development/python-modules/certbot-dns-rfc2136/default.nix
index 18765f12d233e..58319625b1e76 100644
--- a/pkgs/development/python-modules/certbot-dns-rfc2136/default.nix
+++ b/pkgs/development/python-modules/certbot-dns-rfc2136/default.nix
@@ -24,7 +24,7 @@ buildPythonPackage rec {
 
   pytestFlagsArray = [ "-o cache_dir=$(mktemp -d)" ];
 
-  sourceRoot = "source/certbot-dns-rfc2136";
+  sourceRoot = "${src.name}/certbot-dns-rfc2136";
 
   meta = certbot.meta // {
     description = "RFC 2136 DNS Authenticator plugin for Certbot";
diff --git a/pkgs/development/python-modules/certbot-dns-route53/default.nix b/pkgs/development/python-modules/certbot-dns-route53/default.nix
index 20df82303a44e..db923f1a19269 100644
--- a/pkgs/development/python-modules/certbot-dns-route53/default.nix
+++ b/pkgs/development/python-modules/certbot-dns-route53/default.nix
@@ -24,7 +24,7 @@ buildPythonPackage rec {
 
   pytestFlagsArray = [ "-o cache_dir=$(mktemp -d)" ];
 
-  sourceRoot = "source/certbot-dns-route53";
+  sourceRoot = "${src.name}/certbot-dns-route53";
 
   meta = certbot.meta // {
     description = "Route53 DNS Authenticator plugin for Certbot";
diff --git a/pkgs/development/python-modules/certbot/default.nix b/pkgs/development/python-modules/certbot/default.nix
index ad3600b2eaba7..369879878bb2e 100644
--- a/pkgs/development/python-modules/certbot/default.nix
+++ b/pkgs/development/python-modules/certbot/default.nix
@@ -35,7 +35,7 @@ buildPythonPackage rec {
     hash = "sha256-BQsdhlYABZtz5+SORiCVnWMZdMmiWGM9W1YLqObyFo8=";
   };
 
-  sourceRoot = "source/${pname}";
+  sourceRoot = "${src.name}/${pname}";
 
   propagatedBuildInputs = [
     configargparse
diff --git a/pkgs/development/python-modules/chart-studio/default.nix b/pkgs/development/python-modules/chart-studio/default.nix
index e587c281c0386..5bcc3050497a9 100644
--- a/pkgs/development/python-modules/chart-studio/default.nix
+++ b/pkgs/development/python-modules/chart-studio/default.nix
@@ -20,7 +20,7 @@ buildPythonPackage rec {
     hash = "sha256-H+p2fPBXn+VqrW63KkdmPn2xqxC9uAOzQUV1ruKEUSs=";
   };
 
-  sourceRoot = "source/packages/python/chart-studio";
+  sourceRoot = "${src.name}/packages/python/chart-studio";
 
   propagatedBuildInputs = [
     plotly
diff --git a/pkgs/development/python-modules/chirpstack-api/default.nix b/pkgs/development/python-modules/chirpstack-api/default.nix
index c939022a29bba..141a5f349b70e 100644
--- a/pkgs/development/python-modules/chirpstack-api/default.nix
+++ b/pkgs/development/python-modules/chirpstack-api/default.nix
@@ -20,7 +20,7 @@ buildPythonPackage rec {
     hash = "sha256-69encHMk0eXE2Av87ysKvxoiXog5o68qCUlOx/lgHFU=";
   };
 
-  sourceRoot = "source/python/src";
+  sourceRoot = "${src.name}/python/src";
 
   propagatedBuildInputs = [
     google-api-core
diff --git a/pkgs/development/python-modules/cirq-aqt/default.nix b/pkgs/development/python-modules/cirq-aqt/default.nix
index ae53a5eef6bdf..f8e6fb4a2bf24 100644
--- a/pkgs/development/python-modules/cirq-aqt/default.nix
+++ b/pkgs/development/python-modules/cirq-aqt/default.nix
@@ -8,7 +8,7 @@ buildPythonPackage rec {
   pname = "cirq-aqt";
   inherit (cirq-core) version src meta;
 
-  sourceRoot = "source/${pname}";
+  sourceRoot = "${src.name}/${pname}";
 
   postPatch = ''
     substituteInPlace requirements.txt \
diff --git a/pkgs/development/python-modules/cirq-core/default.nix b/pkgs/development/python-modules/cirq-core/default.nix
index 4c69172fdd4c3..39e3cf9d47bed 100644
--- a/pkgs/development/python-modules/cirq-core/default.nix
+++ b/pkgs/development/python-modules/cirq-core/default.nix
@@ -45,7 +45,7 @@ buildPythonPackage rec {
     hash = "sha256-5j4hbG95KRfRQTyyZgoNp/eHIcy0FphyEhbYnzyUMO4=";
   };
 
-  sourceRoot = "source/${pname}";
+  sourceRoot = "${src.name}/${pname}";
 
   patches = [
     # https://github.com/quantumlib/Cirq/pull/5991
diff --git a/pkgs/development/python-modules/cirq-google/default.nix b/pkgs/development/python-modules/cirq-google/default.nix
index c636897fc6a22..491caa5f92933 100644
--- a/pkgs/development/python-modules/cirq-google/default.nix
+++ b/pkgs/development/python-modules/cirq-google/default.nix
@@ -10,7 +10,7 @@ buildPythonPackage rec {
   pname = "cirq-google";
   inherit (cirq-core) version src meta;
 
-  sourceRoot = "source/${pname}";
+  sourceRoot = "${src.name}/${pname}";
 
   postPatch = ''
     substituteInPlace requirements.txt \
diff --git a/pkgs/development/python-modules/cirq-ionq/default.nix b/pkgs/development/python-modules/cirq-ionq/default.nix
index bf96d35b53184..b1f66e25ced29 100644
--- a/pkgs/development/python-modules/cirq-ionq/default.nix
+++ b/pkgs/development/python-modules/cirq-ionq/default.nix
@@ -8,7 +8,7 @@ buildPythonPackage rec {
   pname = "cirq-ionq";
   inherit (cirq-core) version src meta;
 
-  sourceRoot = "source/${pname}";
+  sourceRoot = "${src.name}/${pname}";
 
   postPatch = ''
     substituteInPlace requirements.txt \
diff --git a/pkgs/development/python-modules/cirq-pasqal/default.nix b/pkgs/development/python-modules/cirq-pasqal/default.nix
index 5066455e294a7..4d755266180bb 100644
--- a/pkgs/development/python-modules/cirq-pasqal/default.nix
+++ b/pkgs/development/python-modules/cirq-pasqal/default.nix
@@ -8,7 +8,7 @@ buildPythonPackage rec {
   pname = "cirq-pasqal";
   inherit (cirq-core) version src meta;
 
-  sourceRoot = "source/${pname}";
+  sourceRoot = "${src.name}/${pname}";
 
   postPatch = ''
     substituteInPlace requirements.txt \
diff --git a/pkgs/development/python-modules/cirq-rigetti/default.nix b/pkgs/development/python-modules/cirq-rigetti/default.nix
index b3bd2d3a0549f..f09f7ce045390 100644
--- a/pkgs/development/python-modules/cirq-rigetti/default.nix
+++ b/pkgs/development/python-modules/cirq-rigetti/default.nix
@@ -29,7 +29,7 @@ buildPythonPackage rec {
 
   disabled = pythonOlder "3.7";
 
-  sourceRoot = "source/${pname}";
+  sourceRoot = "${src.name}/${pname}";
 
   postPatch = ''
     substituteInPlace requirements.txt \
diff --git a/pkgs/development/python-modules/cirq-web/default.nix b/pkgs/development/python-modules/cirq-web/default.nix
index 3488ab56586c0..ca1c67ad12183 100644
--- a/pkgs/development/python-modules/cirq-web/default.nix
+++ b/pkgs/development/python-modules/cirq-web/default.nix
@@ -7,7 +7,7 @@ buildPythonPackage rec {
   pname = "cirq-web";
   inherit (cirq-core) version src meta;
 
-  sourceRoot = "source/${pname}";
+  sourceRoot = "${src.name}/${pname}";
 
   propagatedBuildInputs = [
     cirq-core
diff --git a/pkgs/development/python-modules/ctranslate2/default.nix b/pkgs/development/python-modules/ctranslate2/default.nix
index 4cbf0ecd71243..bfb8c31a48a89 100644
--- a/pkgs/development/python-modules/ctranslate2/default.nix
+++ b/pkgs/development/python-modules/ctranslate2/default.nix
@@ -23,7 +23,7 @@ buildPythonPackage rec {
   format = "setuptools";
 
   # https://github.com/OpenNMT/CTranslate2/tree/master/python
-  sourceRoot = "source/python";
+  sourceRoot = "${src.name}/python";
 
   nativeBuildInputs = [
     pybind11
diff --git a/pkgs/development/python-modules/dask-gateway/default.nix b/pkgs/development/python-modules/dask-gateway/default.nix
index ec014c5460a10..270999b55070f 100644
--- a/pkgs/development/python-modules/dask-gateway/default.nix
+++ b/pkgs/development/python-modules/dask-gateway/default.nix
@@ -20,7 +20,7 @@ buildPythonPackage rec {
     hash = "sha256-+YCHIfNq8E2rXO8b91Q1D21dVzNWnJZIKZeY4AETa7s=";
   };
 
-  sourceRoot = "source/dask-gateway";
+  sourceRoot = "${src.name}/dask-gateway";
 
   nativeBuildInputs = [ setuptools ];
 
diff --git a/pkgs/development/python-modules/edlib/default.nix b/pkgs/development/python-modules/edlib/default.nix
index 30c3f8fb3b42e..357db8d2b8e8d 100644
--- a/pkgs/development/python-modules/edlib/default.nix
+++ b/pkgs/development/python-modules/edlib/default.nix
@@ -13,7 +13,7 @@ buildPythonPackage {
 
   disabled = pythonOlder "3.6";
 
-  sourceRoot = "source/bindings/python";
+  sourceRoot = "${edlib.src.name}/bindings/python";
 
   preBuild = ''
     ln -s ${edlib.src}/edlib .
diff --git a/pkgs/development/python-modules/extractcode/7z.nix b/pkgs/development/python-modules/extractcode/7z.nix
index 895253d5a4582..89a0bd110d4b1 100644
--- a/pkgs/development/python-modules/extractcode/7z.nix
+++ b/pkgs/development/python-modules/extractcode/7z.nix
@@ -16,7 +16,7 @@ buildPythonPackage rec {
     sha256 = "02qinla281fc6pmg5xzsrmqnf9js76f2qcbf98zq7m2dkn70as4w";
   };
 
-  sourceRoot = "source/builtins/extractcode_7z-linux";
+  sourceRoot = "${src.name}/builtins/extractcode_7z-linux";
 
   propagatedBuildInputs = [
     plugincode
diff --git a/pkgs/development/python-modules/extractcode/libarchive.nix b/pkgs/development/python-modules/extractcode/libarchive.nix
index f1dd6f12959cf..0031c7a279413 100644
--- a/pkgs/development/python-modules/extractcode/libarchive.nix
+++ b/pkgs/development/python-modules/extractcode/libarchive.nix
@@ -23,7 +23,7 @@ buildPythonPackage rec {
     sha256 = "02qinla281fc6pmg5xzsrmqnf9js76f2qcbf98zq7m2dkn70as4w";
   };
 
-  sourceRoot = "source/builtins/extractcode_libarchive-linux";
+  sourceRoot = "${src.name}/builtins/extractcode_libarchive-linux";
 
   preBuild = ''
     pushd src/extractcode_libarchive/lib
diff --git a/pkgs/development/python-modules/flatbuffers/default.nix b/pkgs/development/python-modules/flatbuffers/default.nix
index f477a1446a6e9..ae5c7e309cd10 100644
--- a/pkgs/development/python-modules/flatbuffers/default.nix
+++ b/pkgs/development/python-modules/flatbuffers/default.nix
@@ -6,7 +6,7 @@
 buildPythonPackage rec {
   inherit (flatbuffers) pname version src;
 
-  sourceRoot = "source/python";
+  sourceRoot = "${src.name}/python";
 
   # flatbuffers needs VERSION environment variable for setting the correct
   # version, otherwise it uses the current date.
diff --git a/pkgs/development/python-modules/gb-io/default.nix b/pkgs/development/python-modules/gb-io/default.nix
index 930aafc5ebf3f..46c98cfc78c82 100644
--- a/pkgs/development/python-modules/gb-io/default.nix
+++ b/pkgs/development/python-modules/gb-io/default.nix
@@ -26,7 +26,7 @@ buildPythonPackage rec {
     hash = "sha256-lPnOFbEJgcaPPl9bTngugubhW//AUFp9RAjyiFHxC70=";
   };
 
-  sourceRoot = "source";
+  sourceRoot = src.name;
 
   nativeBuildInputs = [
     setuptools-rust
diff --git a/pkgs/development/python-modules/gremlinpython/default.nix b/pkgs/development/python-modules/gremlinpython/default.nix
index 2d84cd87e08e0..de5e03d613211 100644
--- a/pkgs/development/python-modules/gremlinpython/default.nix
+++ b/pkgs/development/python-modules/gremlinpython/default.nix
@@ -27,7 +27,7 @@ buildPythonPackage rec {
     hash = "sha256-SQ+LcHeHDB1Hd5wXGDJBZmBG4KEZ3NsV4+4X9WgPb9E=";
   };
 
-  sourceRoot = "source/gremlin-python/src/main/python";
+  sourceRoot = "${src.name}/gremlin-python/src/main/python";
 
   postPatch = ''
     sed -i '/pytest-runner/d' setup.py
diff --git a/pkgs/development/python-modules/hexdump/default.nix b/pkgs/development/python-modules/hexdump/default.nix
index 9b8487ffa8e70..c00d7d5b4680b 100644
--- a/pkgs/development/python-modules/hexdump/default.nix
+++ b/pkgs/development/python-modules/hexdump/default.nix
@@ -11,7 +11,6 @@ buildPythonPackage rec {
   };
 
   # the source zip has no prefix, so everything gets unpacked to /build otherwise
-  sourceRoot = "source";
   unpackPhase = ''
     runHook preUnpack
     mkdir source
@@ -21,6 +20,8 @@ buildPythonPackage rec {
     runHook postUnpack
   '';
 
+  sourceRoot = "source";
+
   pythonImportsCheck = [ "hexdump" ];
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/libcst/default.nix b/pkgs/development/python-modules/libcst/default.nix
index ca88e6dee4e4e..991a51203d720 100644
--- a/pkgs/development/python-modules/libcst/default.nix
+++ b/pkgs/development/python-modules/libcst/default.nix
@@ -33,7 +33,7 @@ buildPythonPackage rec {
 
   cargoDeps = rustPlatform.fetchCargoTarball {
     inherit src;
-    sourceRoot = "source/${cargoRoot}";
+    sourceRoot = "${src.name}/${cargoRoot}";
     name = "${pname}-${version}";
     hash = "sha256-rPB3bAMdvjgsT3jkEDoWatW8LPwgIaFSbFPqiqANtBY=";
   };
diff --git a/pkgs/development/python-modules/openrazer/pylib.nix b/pkgs/development/python-modules/openrazer/pylib.nix
index 257fb589ba7b4..13e7a870b00cf 100644
--- a/pkgs/development/python-modules/openrazer/pylib.nix
+++ b/pkgs/development/python-modules/openrazer/pylib.nix
@@ -12,7 +12,7 @@ in
 buildPythonPackage (common // {
   pname = "openrazer";
 
-  sourceRoot = "source/pylib";
+  sourceRoot = "${common.src.name}/pylib";
 
   propagatedBuildInputs = [
     dbus-python
diff --git a/pkgs/development/python-modules/protobuf/default.nix b/pkgs/development/python-modules/protobuf/default.nix
index 0012633d0ebb2..f2615499f7ba3 100644
--- a/pkgs/development/python-modules/protobuf/default.nix
+++ b/pkgs/development/python-modules/protobuf/default.nix
@@ -23,7 +23,7 @@ buildPythonPackage {
     then "${toString (lib.toInt versionMajor + 1)}.${versionMinor}.${versionPatch}"
     else protobuf.version;
 
-  sourceRoot = "source/python";
+  sourceRoot = "${protobuf.src.name}/python";
 
   patches = lib.optionals (pythonAtLeast "3.11") [
     (fetchpatch {
diff --git a/pkgs/development/python-modules/pykdl/default.nix b/pkgs/development/python-modules/pykdl/default.nix
index 0d7e82be63f3e..cc92086747e47 100644
--- a/pkgs/development/python-modules/pykdl/default.nix
+++ b/pkgs/development/python-modules/pykdl/default.nix
@@ -4,7 +4,7 @@ toPythonModule (stdenv.mkDerivation {
   pname = "pykdl";
   inherit (orocos-kdl) version src;
 
-  sourceRoot = "source/python_orocos_kdl";
+  sourceRoot = "${orocos-kdl.src.name}/python_orocos_kdl";
 
   # Fix hardcoded installation path
   postPatch = ''
diff --git a/pkgs/development/python-modules/python-csxcad/default.nix b/pkgs/development/python-modules/python-csxcad/default.nix
index 66c1939c7edc1..1044fe0a2748f 100644
--- a/pkgs/development/python-modules/python-csxcad/default.nix
+++ b/pkgs/development/python-modules/python-csxcad/default.nix
@@ -19,7 +19,7 @@ buildPythonPackage rec {
     sha256 = "072s765jyzpdq8qqysdy0dld17m6sr9zfcs0ip2zk8c4imxaysnb";
   };
 
-  sourceRoot = "source/python";
+  sourceRoot = "${src.name}/python";
 
   nativeBuildInputs = [
     cython
diff --git a/pkgs/development/python-modules/python-olm/default.nix b/pkgs/development/python-modules/python-olm/default.nix
index 39cd201c96550..e255a9b8915c1 100644
--- a/pkgs/development/python-modules/python-olm/default.nix
+++ b/pkgs/development/python-modules/python-olm/default.nix
@@ -12,7 +12,7 @@ buildPythonPackage {
 
   disabled = !isPy3k;
 
-  sourceRoot = "source/python";
+  sourceRoot = "${olm.src.name}/python";
   buildInputs = [ olm ];
 
   preBuild = ''
diff --git a/pkgs/development/python-modules/python-openems/default.nix b/pkgs/development/python-modules/python-openems/default.nix
index 348f10b3aeede..7a186276dfc79 100644
--- a/pkgs/development/python-modules/python-openems/default.nix
+++ b/pkgs/development/python-modules/python-openems/default.nix
@@ -21,7 +21,7 @@ buildPythonPackage rec {
     sha256 = "1dca6b6ccy771irxzsj075zvpa3dlzv4mjb8xyg9d889dqlgyl45";
   };
 
-  sourceRoot = "source/python";
+  sourceRoot = "${src.name}/python";
 
   nativeBuildInputs = [
     cython
diff --git a/pkgs/development/python-modules/safetensors/default.nix b/pkgs/development/python-modules/safetensors/default.nix
index 4d30e553c9307..06a2c3966a2d4 100644
--- a/pkgs/development/python-modules/safetensors/default.nix
+++ b/pkgs/development/python-modules/safetensors/default.nix
@@ -30,11 +30,11 @@ buildPythonPackage rec {
 
   cargoDeps = rustPlatform.fetchCargoTarball {
     inherit src;
-    sourceRoot = "source/bindings/python";
+    sourceRoot = "${src.name}/bindings/python";
     hash = "sha256-tC0XawmKWNGCaByHQfJEfmHM3m/qgTuIpcRaEFJC6dM";
   };
 
-  sourceRoot = "source/bindings/python";
+  sourceRoot = "${src.name}/bindings/python";
 
   nativeBuildInputs = [
     setuptools-rust
diff --git a/pkgs/development/python-modules/sentencepiece/default.nix b/pkgs/development/python-modules/sentencepiece/default.nix
index c1ad64b3f5e4f..dc7335b351f87 100644
--- a/pkgs/development/python-modules/sentencepiece/default.nix
+++ b/pkgs/development/python-modules/sentencepiece/default.nix
@@ -11,7 +11,7 @@ buildPythonPackage rec {
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ sentencepiece.dev ];
 
-  sourceRoot = "source/python";
+  sourceRoot = "${src.name}/python";
 
   # sentencepiece installs 'bin' output.
   meta = builtins.removeAttrs sentencepiece.meta [ "outputsToInstall" ];
diff --git a/pkgs/development/python-modules/simpleitk/default.nix b/pkgs/development/python-modules/simpleitk/default.nix
index cc138695e3fd1..aa8a970364d89 100644
--- a/pkgs/development/python-modules/simpleitk/default.nix
+++ b/pkgs/development/python-modules/simpleitk/default.nix
@@ -15,7 +15,7 @@ buildPythonPackage rec {
   format = "pyproject";
   disabled = pythonOlder "3.8";
 
-  sourceRoot = "source/Wrapping/Python";
+  sourceRoot = "${src.name}/Wrapping/Python";
   preBuild = ''
     make
   '';
diff --git a/pkgs/development/python-modules/tokenizers/default.nix b/pkgs/development/python-modules/tokenizers/default.nix
index a94a1205e123f..fd6153b940afd 100644
--- a/pkgs/development/python-modules/tokenizers/default.nix
+++ b/pkgs/development/python-modules/tokenizers/default.nix
@@ -79,7 +79,7 @@ buildPythonPackage rec {
     lockFile = ./Cargo.lock;
   };
 
-  sourceRoot = "source/bindings/python";
+  sourceRoot = "${src.name}/bindings/python";
 
   nativeBuildInputs = [
     pkg-config
diff --git a/pkgs/development/python-modules/typecode/libmagic.nix b/pkgs/development/python-modules/typecode/libmagic.nix
index 5110e5e2a5cfc..1c9144226bc24 100644
--- a/pkgs/development/python-modules/typecode/libmagic.nix
+++ b/pkgs/development/python-modules/typecode/libmagic.nix
@@ -16,7 +16,7 @@ buildPythonPackage rec {
     sha256 = "xnUGDMS34iMVMGo/nZwRarGzzbj3X4Rt+YHvvKpmy6A=";
   };
 
-  sourceRoot = "source/builtins/typecode_libmagic-linux";
+  sourceRoot = "${src.name}/builtins/typecode_libmagic-linux";
 
   propagatedBuildInputs = [
     plugincode
diff --git a/pkgs/development/python-modules/unicorn/default.nix b/pkgs/development/python-modules/unicorn/default.nix
index 74780c7e0320f..c1f17ce880a6b 100644
--- a/pkgs/development/python-modules/unicorn/default.nix
+++ b/pkgs/development/python-modules/unicorn/default.nix
@@ -12,7 +12,7 @@ buildPythonPackage rec {
 
   src = unicorn-emu.src;
 
-  sourceRoot = "source/bindings/python";
+  sourceRoot = "${src.name}/bindings/python";
 
   prePatch = ''
     ln -s ${unicorn-emu}/lib/libunicorn.* prebuilt/
diff --git a/pkgs/development/python-modules/zxing_cpp/default.nix b/pkgs/development/python-modules/zxing_cpp/default.nix
index 9c43844888c9a..2427e12569985 100644
--- a/pkgs/development/python-modules/zxing_cpp/default.nix
+++ b/pkgs/development/python-modules/zxing_cpp/default.nix
@@ -11,7 +11,7 @@ buildPythonPackage rec {
   pname = "zxing_cpp";
   inherit (zxing-cpp) src version;
 
-  sourceRoot = "source/wrappers/python";
+  sourceRoot = "${src.name}/wrappers/python";
   patches = [
     ./use-nixpkgs-pybind11.patch
   ];