summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
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 83db24896cb..3b92fc06a91 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 97e725bb711..531ed8ae8d9 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 4f5f25d0159..39fef995bf9 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 ecae25b067f..c8bd5646970 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 ebdbbe4d159..158c3f3f19c 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 8db89a43266..578fd84db77 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 f1a37fb70a0..6846ed86f6f 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 fc6a645ade6..d60e1e60d97 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 6a320209ecf..6ceaac115ff 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 18765f12d23..58319625b1e 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 20df82303a4..db923f1a192 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 ad3600b2eab..369879878bb 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 e587c281c03..5bcc3050497 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 c939022a29b..141a5f349b7 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 ae53a5eef6b..f8e6fb4a2bf 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 4c69172fdd4..39e3cf9d47b 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 c636897fc6a..491caa5f929 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 bf96d35b531..b1f66e25ced 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 5066455e294..4d755266180 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 b3bd2d3a054..f09f7ce0453 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 3488ab56586..ca1c67ad121 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 4cbf0ecd712..bfb8c31a48a 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 ec014c5460a..270999b5507 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 30c3f8fb3b4..357db8d2b8e 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 895253d5a45..89a0bd110d4 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 f1dd6f12959..0031c7a2794 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 f477a1446a6..ae5c7e309cd 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 930aafc5ebf..46c98cfc78c 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 2d84cd87e08..de5e03d6132 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 9b8487ffa8e..c00d7d5b468 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 ca88e6dee4e..991a51203d7 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 257fb589ba7..13e7a870b00 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 0012633d0eb..f2615499f7b 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 0d7e82be63f..cc92086747e 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 66c1939c7ed..1044fe0a274 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 39cd201c965..e255a9b8915 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 348f10b3aee..7a186276dfc 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 4d30e553c93..06a2c3966a2 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 c1ad64b3f5e..dc7335b351f 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 cc138695e3f..aa8a970364d 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 a94a1205e12..fd6153b940a 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 5110e5e2a5c..1c9144226bc 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 74780c7e032..c1f17ce880a 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 9c43844888c..2427e125699 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
   ];