From 5852f26bdcdca4a33b37d1631cfb3897bcc36fcc Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Tue, 25 Jul 2023 13:27:31 +0000 Subject: treewide: noop: refer to `src.name` or similar in `sourceRoot` where appropriate, part 1: trivial cases --- pkgs/development/compilers/llvm/13/clang/default.nix | 2 +- pkgs/development/compilers/llvm/13/compiler-rt/default.nix | 2 +- pkgs/development/compilers/llvm/13/libcxx/default.nix | 2 +- pkgs/development/compilers/llvm/13/libcxxabi/default.nix | 2 +- pkgs/development/compilers/llvm/13/libunwind/default.nix | 2 +- pkgs/development/compilers/llvm/13/lld/default.nix | 2 +- pkgs/development/compilers/llvm/13/llvm/default.nix | 2 +- pkgs/development/compilers/llvm/13/openmp/default.nix | 2 +- pkgs/development/coq-modules/metalib/default.nix | 8 ++++---- pkgs/development/embedded/fpga/tinyprog/default.nix | 2 +- pkgs/development/interpreters/kerf/default.nix | 2 +- pkgs/development/interpreters/wamr/default.nix | 2 +- pkgs/development/libraries/clfft/default.nix | 2 +- pkgs/development/libraries/clipper2/default.nix | 2 +- pkgs/development/libraries/cxxtest/default.nix | 2 +- pkgs/development/libraries/dab_lib/default.nix | 4 ++-- pkgs/development/libraries/fuzzylite/default.nix | 2 +- pkgs/development/libraries/herqq/default.nix | 2 +- pkgs/development/libraries/libclc/default.nix | 2 +- pkgs/development/libraries/libgeotiff/default.nix | 2 +- pkgs/development/libraries/libvmaf/default.nix | 2 +- pkgs/development/libraries/octomap/default.nix | 2 +- pkgs/development/libraries/orocos-kdl/default.nix | 2 +- pkgs/development/libraries/pico-sdk/default.nix | 2 +- pkgs/development/libraries/proj-datumgrid/default.nix | 2 +- pkgs/development/libraries/qrcodegen/default.nix | 4 +--- pkgs/development/libraries/qtstyleplugin-kvantum-qt4/default.nix | 2 +- pkgs/development/libraries/qtstyleplugin-kvantum/default.nix | 2 +- pkgs/development/libraries/rocfft/default.nix | 6 +++--- pkgs/development/php-packages/snuffleupagus/default.nix | 2 +- pkgs/development/python-modules/aardwolf/default.nix | 2 +- pkgs/development/python-modules/acme/default.nix | 2 +- .../development/python-modules/antlr4-python3-runtime/default.nix | 2 +- pkgs/development/python-modules/apache-beam/default.nix | 2 +- pkgs/development/python-modules/basemap-data/default.nix | 2 +- pkgs/development/python-modules/basemap/default.nix | 2 +- pkgs/development/python-modules/capstone/default.nix | 2 +- .../development/python-modules/certbot-dns-cloudflare/default.nix | 2 +- pkgs/development/python-modules/certbot-dns-google/default.nix | 2 +- pkgs/development/python-modules/certbot-dns-rfc2136/default.nix | 2 +- pkgs/development/python-modules/certbot-dns-route53/default.nix | 2 +- pkgs/development/python-modules/certbot/default.nix | 2 +- pkgs/development/python-modules/chart-studio/default.nix | 2 +- pkgs/development/python-modules/chirpstack-api/default.nix | 2 +- pkgs/development/python-modules/cirq-aqt/default.nix | 2 +- pkgs/development/python-modules/cirq-core/default.nix | 2 +- pkgs/development/python-modules/cirq-google/default.nix | 2 +- pkgs/development/python-modules/cirq-ionq/default.nix | 2 +- pkgs/development/python-modules/cirq-pasqal/default.nix | 2 +- pkgs/development/python-modules/cirq-rigetti/default.nix | 2 +- pkgs/development/python-modules/cirq-web/default.nix | 2 +- pkgs/development/python-modules/ctranslate2/default.nix | 2 +- pkgs/development/python-modules/dask-gateway/default.nix | 2 +- pkgs/development/python-modules/edlib/default.nix | 2 +- pkgs/development/python-modules/extractcode/7z.nix | 2 +- pkgs/development/python-modules/extractcode/libarchive.nix | 2 +- pkgs/development/python-modules/flatbuffers/default.nix | 2 +- pkgs/development/python-modules/gb-io/default.nix | 2 +- pkgs/development/python-modules/gremlinpython/default.nix | 2 +- pkgs/development/python-modules/hexdump/default.nix | 3 ++- pkgs/development/python-modules/libcst/default.nix | 2 +- pkgs/development/python-modules/openrazer/pylib.nix | 2 +- pkgs/development/python-modules/protobuf/default.nix | 2 +- pkgs/development/python-modules/pykdl/default.nix | 2 +- pkgs/development/python-modules/python-csxcad/default.nix | 2 +- pkgs/development/python-modules/python-olm/default.nix | 2 +- pkgs/development/python-modules/python-openems/default.nix | 2 +- pkgs/development/python-modules/safetensors/default.nix | 4 ++-- pkgs/development/python-modules/sentencepiece/default.nix | 2 +- pkgs/development/python-modules/simpleitk/default.nix | 2 +- pkgs/development/python-modules/tokenizers/default.nix | 2 +- pkgs/development/python-modules/typecode/libmagic.nix | 2 +- pkgs/development/python-modules/unicorn/default.nix | 2 +- pkgs/development/python-modules/zxing_cpp/default.nix | 2 +- pkgs/development/tools/analysis/spin/default.nix | 2 +- pkgs/development/tools/devpi-server/default.nix | 2 +- pkgs/development/tools/elkhound/default.nix | 2 +- pkgs/development/tools/kustomize/3.nix | 2 +- pkgs/development/tools/literate-programming/noweb/default.nix | 2 +- pkgs/development/tools/loganalyzer/default.nix | 2 +- pkgs/development/tools/minizinc/ide.nix | 2 +- pkgs/development/tools/misc/grpc-tools/default.nix | 2 +- pkgs/development/tools/misc/licenseclassifier/default.nix | 2 +- pkgs/development/tools/misc/micronucleus/default.nix | 2 +- pkgs/development/tools/misc/unixbench/default.nix | 2 +- pkgs/development/tools/misc/xxdiff/default.nix | 2 +- pkgs/development/tools/oh-my-posh/default.nix | 2 +- pkgs/development/tools/parsing/antlr/4.nix | 2 +- pkgs/development/tools/protoc-gen-dart/default.nix | 2 +- pkgs/development/tools/protoc-gen-grpc-web/default.nix | 2 +- pkgs/development/tools/rust/cargo-insta/default.nix | 2 +- pkgs/development/tools/rust/cargo-raze/default.nix | 2 +- pkgs/development/tools/rust/cargo-tauri/default.nix | 2 +- pkgs/development/tools/rust/crate2nix/default.nix | 2 +- pkgs/development/tools/rust/tauri-mobile/default.nix | 2 +- pkgs/development/web/ihp-new/default.nix | 2 +- 96 files changed, 104 insertions(+), 105 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/compilers/llvm/13/clang/default.nix b/pkgs/development/compilers/llvm/13/clang/default.nix index f1a3e74fa6bc9..5e06e85c02a94 100644 --- a/pkgs/development/compilers/llvm/13/clang/default.nix +++ b/pkgs/development/compilers/llvm/13/clang/default.nix @@ -10,7 +10,7 @@ let inherit version; inherit src; - sourceRoot = "source/clang"; + sourceRoot = "${src.name}/clang"; nativeBuildInputs = [ cmake python3 ] ++ lib.optional enableManpages python3.pkgs.sphinx diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix index faa123312bd76..18be4499d0fdb 100644 --- a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { inherit version; inherit src; - sourceRoot = "source/compiler-rt"; + sourceRoot = "${src.name}/compiler-rt"; nativeBuildInputs = [ cmake python3 libllvm.dev ] ++ lib.optional stdenv.isDarwin xcbuild.xcrun; diff --git a/pkgs/development/compilers/llvm/13/libcxx/default.nix b/pkgs/development/compilers/llvm/13/libcxx/default.nix index b18c9da18ffda..994ec7dd5a56e 100644 --- a/pkgs/development/compilers/llvm/13/libcxx/default.nix +++ b/pkgs/development/compilers/llvm/13/libcxx/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { inherit version; inherit src; - sourceRoot = "source/libcxx"; + sourceRoot = "${src.name}/libcxx"; outputs = [ "out" ] ++ lib.optional (!headersOnly) "dev"; diff --git a/pkgs/development/compilers/llvm/13/libcxxabi/default.nix b/pkgs/development/compilers/llvm/13/libcxxabi/default.nix index 06137ab067342..b1b57b3050ad0 100644 --- a/pkgs/development/compilers/llvm/13/libcxxabi/default.nix +++ b/pkgs/development/compilers/llvm/13/libcxxabi/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { inherit version; inherit src; - sourceRoot = "source/${pname}"; + sourceRoot = "${src.name}/${pname}"; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/compilers/llvm/13/libunwind/default.nix b/pkgs/development/compilers/llvm/13/libunwind/default.nix index b6017e7417289..d837bc60de370 100644 --- a/pkgs/development/compilers/llvm/13/libunwind/default.nix +++ b/pkgs/development/compilers/llvm/13/libunwind/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { inherit version; inherit src; - sourceRoot = "source/${pname}"; + sourceRoot = "${src.name}/${pname}"; patches = [ ./gnu-install-dirs.patch diff --git a/pkgs/development/compilers/llvm/13/lld/default.nix b/pkgs/development/compilers/llvm/13/lld/default.nix index c8c3e0b448bd5..d506f396f65cd 100644 --- a/pkgs/development/compilers/llvm/13/lld/default.nix +++ b/pkgs/development/compilers/llvm/13/lld/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { inherit version; inherit src; - sourceRoot = "source/${pname}"; + sourceRoot = "${src.name}/${pname}"; patches = [ ./gnu-install-dirs.patch diff --git a/pkgs/development/compilers/llvm/13/llvm/default.nix b/pkgs/development/compilers/llvm/13/llvm/default.nix index 59c3edb9e2db9..827e528581cfd 100644 --- a/pkgs/development/compilers/llvm/13/llvm/default.nix +++ b/pkgs/development/compilers/llvm/13/llvm/default.nix @@ -61,7 +61,7 @@ in stdenv.mkDerivation (rec { inherit version; inherit src; - sourceRoot = "source/${pname}"; + sourceRoot = "${src.name}/${pname}"; outputs = [ "out" "lib" "dev" "python" ]; diff --git a/pkgs/development/compilers/llvm/13/openmp/default.nix b/pkgs/development/compilers/llvm/13/openmp/default.nix index 71362be1fdc6e..8eca980d601cc 100644 --- a/pkgs/development/compilers/llvm/13/openmp/default.nix +++ b/pkgs/development/compilers/llvm/13/openmp/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { inherit version; inherit src; - sourceRoot = "source/${pname}"; + sourceRoot = "${src.name}/${pname}"; nativeBuildInputs = [ cmake perl ]; buildInputs = [ diff --git a/pkgs/development/coq-modules/metalib/default.nix b/pkgs/development/coq-modules/metalib/default.nix index e0197db71b944..19a36c9692a93 100644 --- a/pkgs/development/coq-modules/metalib/default.nix +++ b/pkgs/development/coq-modules/metalib/default.nix @@ -1,6 +1,6 @@ { lib, mkCoqDerivation, coq, version ? null }: -mkCoqDerivation { +(mkCoqDerivation { pname = "metalib"; owner = "plclub"; inherit version; @@ -12,10 +12,10 @@ mkCoqDerivation { release."8.15".sha256 = "0wbp058zwa4bkdjj38aysy2g1avf9nrh8q23a3dil0q00qczi616"; release."8.10".sha256 = "0wbypc05d2lqfm9qaw98ynr5yc1p0ipsvyc3bh1rk9nz7zwirmjs"; - sourceRoot = "source/Metalib"; - meta = with lib; { license = licenses.mit; maintainers = [ maintainers.jwiegley ]; }; -} +}).overrideAttrs (oldAttrs: { + sourceRoot = "${oldAttrs.src.name}/Metalib"; +}) diff --git a/pkgs/development/embedded/fpga/tinyprog/default.nix b/pkgs/development/embedded/fpga/tinyprog/default.nix index 06a8c3e98712d..4872111b811c5 100644 --- a/pkgs/development/embedded/fpga/tinyprog/default.nix +++ b/pkgs/development/embedded/fpga/tinyprog/default.nix @@ -15,7 +15,7 @@ with python3Packages; buildPythonApplication rec { sha256 = "0zbrvvb957z2lwbfd39ixqdsnd2w4wfjirwkqdrqm27bjz308731"; }; - sourceRoot = "source/programmer"; + sourceRoot = "${src.name}/programmer"; propagatedBuildInputs = [ pyserial diff --git a/pkgs/development/interpreters/kerf/default.nix b/pkgs/development/interpreters/kerf/default.nix index 0987205f59d91..99d9bb8710e45 100644 --- a/pkgs/development/interpreters/kerf/default.nix +++ b/pkgs/development/interpreters/kerf/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { hash = "sha256-0sU2zOk5I69lQyrn1g0qsae7S/IBT6eA/911qp0GNkk="; }; - sourceRoot = "source/src"; + sourceRoot = "${src.name}/src"; buildInputs = [ libedit zlib ncurses ] ++ lib.optionals stdenv.isDarwin ([ Accelerate diff --git a/pkgs/development/interpreters/wamr/default.nix b/pkgs/development/interpreters/wamr/default.nix index 8506871e6e2cb..41c688c3a4d06 100644 --- a/pkgs/development/interpreters/wamr/default.nix +++ b/pkgs/development/interpreters/wamr/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ]; - sourceRoot = "source/product-mini/platforms/linux"; + sourceRoot = "${finalAttrs.src.name}/product-mini/platforms/linux"; meta = with lib; { description = "WebAssembly Micro Runtime"; diff --git a/pkgs/development/libraries/clfft/default.nix b/pkgs/development/libraries/clfft/default.nix index 8af7a57e65558..824449b0fafcc 100644 --- a/pkgs/development/libraries/clfft/default.nix +++ b/pkgs/development/libraries/clfft/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { hash = "sha256-yp7u6qhpPYQpBw3d+VLg0GgMyZONVII8BsBCEoRZm4w="; }; - sourceRoot = "source/src"; + sourceRoot = "${src.name}/src"; postPatch = '' sed -i '/-m64/d;/-m32/d' CMakeLists.txt diff --git a/pkgs/development/libraries/clipper2/default.nix b/pkgs/development/libraries/clipper2/default.nix index 7d9437da7a537..f7bb635e63d04 100644 --- a/pkgs/development/libraries/clipper2/default.nix +++ b/pkgs/development/libraries/clipper2/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-u/4GG1A2PAlk8VEWgJX8+EnZ5hpGhu1QbvHwct58sF4="; }; - sourceRoot = "source/CPP"; + sourceRoot = "${src.name}/CPP"; nativeBuildInputs = [ cmake diff --git a/pkgs/development/libraries/cxxtest/default.nix b/pkgs/development/libraries/cxxtest/default.nix index 273bfef3190cc..4228a3cb58763 100644 --- a/pkgs/development/libraries/cxxtest/default.nix +++ b/pkgs/development/libraries/cxxtest/default.nix @@ -11,7 +11,7 @@ python3Packages.buildPythonApplication rec { sha256 = "19w92kipfhp5wvs47l0qpibn3x49sbmvkk91yxw6nwk6fafcdl17"; }; - sourceRoot = "source/python"; + sourceRoot = "${src.name}/python"; nativeCheckInputs = [ python3Packages.ply ]; diff --git a/pkgs/development/libraries/dab_lib/default.nix b/pkgs/development/libraries/dab_lib/default.nix index f90c6633d7c7e..f643e5c7d49c2 100644 --- a/pkgs/development/libraries/dab_lib/default.nix +++ b/pkgs/development/libraries/dab_lib/default.nix @@ -2,7 +2,7 @@ , faad2, fftwFloat, zlib }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "dab_lib"; version = "unstable-2023-03-02"; @@ -13,7 +13,7 @@ stdenv.mkDerivation { hash = "sha256-KSkOg0a5iq+13kClQqj+TaEP/PsLUrm8bMmiJEAZ+C4="; }; - sourceRoot = "source/library/"; + sourceRoot = "${src.name}/library/"; nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ faad2 fftwFloat zlib ]; diff --git a/pkgs/development/libraries/fuzzylite/default.nix b/pkgs/development/libraries/fuzzylite/default.nix index b6c7767a8d6fd..a3f70c062e867 100644 --- a/pkgs/development/libraries/fuzzylite/default.nix +++ b/pkgs/development/libraries/fuzzylite/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { rev = "v${version}"; hash = "sha256-i1txeUE/ZSRggwLDtpS8dd4uuZfHX9w3zRH0gBgGXnk="; }; - sourceRoot = "source/fuzzylite"; + sourceRoot = "${src.name}/fuzzylite"; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/herqq/default.nix b/pkgs/development/libraries/herqq/default.nix index 65eacd7fffe3d..3e84432cd5077 100644 --- a/pkgs/development/libraries/herqq/default.nix +++ b/pkgs/development/libraries/herqq/default.nix @@ -9,7 +9,7 @@ mkDerivation rec { outputs = [ "out" "dev" ]; - sourceRoot = "source/herqq"; + sourceRoot = "${src.name}/herqq"; src = fetchFromGitHub { owner = "ThomArmax"; repo = "HUPnP"; diff --git a/pkgs/development/libraries/libclc/default.nix b/pkgs/development/libraries/libclc/default.nix index a0b8cb8efa08e..9148deeee6f40 100644 --- a/pkgs/development/libraries/libclc/default.nix +++ b/pkgs/development/libraries/libclc/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { rev = "llvmorg-${version}"; hash = "sha256-paWwnoU3XMqreRgh9JbT1tDMTwq/ZL0ss3SJTteEGL0="; }; - sourceRoot = "source/libclc"; + sourceRoot = "${src.name}/libclc"; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/libgeotiff/default.nix b/pkgs/development/libraries/libgeotiff/default.nix index 628f4dca8c56a..6b5e395efba6a 100644 --- a/pkgs/development/libraries/libgeotiff/default.nix +++ b/pkgs/development/libraries/libgeotiff/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - sourceRoot = "source/libgeotiff"; + sourceRoot = "${src.name}/libgeotiff"; configureFlags = [ "--with-jpeg=${libjpeg.dev}" diff --git a/pkgs/development/libraries/libvmaf/default.nix b/pkgs/development/libraries/libvmaf/default.nix index 55a08d59ed807..79b2e2ec29517 100644 --- a/pkgs/development/libraries/libvmaf/default.nix +++ b/pkgs/development/libraries/libvmaf/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-TkMy2tEdG1FPPWfH/wPnVbs5kocqe4Y0jU4yvbiRZ9k="; }; - sourceRoot = "source/libvmaf"; + sourceRoot = "${src.name}/libvmaf"; patches = [ # Backport fix for non-Linux, non-Darwin platforms. diff --git a/pkgs/development/libraries/octomap/default.nix b/pkgs/development/libraries/octomap/default.nix index 40e81e195aa10..6b1816d8addcc 100644 --- a/pkgs/development/libraries/octomap/default.nix +++ b/pkgs/development/libraries/octomap/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { hash = "sha256-qE5i4dGugm7tR5tgDCpbla/R7hYR/PI8BzrZQ4y6Yz8="; }; - sourceRoot = "source/octomap"; + sourceRoot = "${src.name}/octomap"; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/libraries/orocos-kdl/default.nix b/pkgs/development/libraries/orocos-kdl/default.nix index c60d79fd492ff..05a3cefaecebb 100644 --- a/pkgs/development/libraries/orocos-kdl/default.nix +++ b/pkgs/development/libraries/orocos-kdl/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; - sourceRoot = "source/orocos_kdl"; + sourceRoot = "${src.name}/orocos_kdl"; nativeBuildInputs = [ cmake ]; propagatedBuildInputs = [ eigen ]; diff --git a/pkgs/development/libraries/pico-sdk/default.nix b/pkgs/development/libraries/pico-sdk/default.nix index e04b79c16ddb7..12b4cb021c1fe 100644 --- a/pkgs/development/libraries/pico-sdk/default.nix +++ b/pkgs/development/libraries/pico-sdk/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { # SDK contains libraries and build-system to develop projects for RP2040 chip # We only need to compile pioasm binary - sourceRoot = "source/tools/pioasm"; + sourceRoot = "${src.name}/tools/pioasm"; installPhase = '' runHook preInstall diff --git a/pkgs/development/libraries/proj-datumgrid/default.nix b/pkgs/development/libraries/proj-datumgrid/default.nix index 2593c04fa158c..2fa5a4d268cc1 100644 --- a/pkgs/development/libraries/proj-datumgrid/default.nix +++ b/pkgs/development/libraries/proj-datumgrid/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "132wp77fszx33wann0fjkmi1isxvsb0v9iw0gd9sxapa9h6hf3am"; }; - sourceRoot = "source/scripts"; + sourceRoot = "${src.name}/scripts"; buildPhase = '' $CC nad2bin.c -o nad2bin diff --git a/pkgs/development/libraries/qrcodegen/default.nix b/pkgs/development/libraries/qrcodegen/default.nix index e5c4f036ffc3f..53ed6eeb80ec1 100644 --- a/pkgs/development/libraries/qrcodegen/default.nix +++ b/pkgs/development/libraries/qrcodegen/default.nix @@ -14,9 +14,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-aci5SFBRNRrSub4XVJ2luHNZ2pAUegjgQ6pD9kpkaTY="; }; - preBuild = '' - cd c - ''; + sourceRoot = "${finalAttrs.src.name}/c"; nativeBuildInputs = lib.optionals stdenv.cc.isClang [ stdenv.cc.cc.libllvm.out diff --git a/pkgs/development/libraries/qtstyleplugin-kvantum-qt4/default.nix b/pkgs/development/libraries/qtstyleplugin-kvantum-qt4/default.nix index 6198a05934589..b91449542958c 100644 --- a/pkgs/development/libraries/qtstyleplugin-kvantum-qt4/default.nix +++ b/pkgs/development/libraries/qtstyleplugin-kvantum-qt4/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ qmake4Hook ]; buildInputs = [ qt4 libX11 libXext ]; - sourceRoot = "source/Kvantum"; + sourceRoot = "${src.name}/Kvantum"; buildPhase = '' runHook preBuild diff --git a/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix b/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix index af4f194efc807..0d9d1d42c0fb0 100644 --- a/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix +++ b/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (lib.versionOlder qtbase.version "6") [ qtx11extras kwindowsystem ] ++ lib.optional (lib.versionAtLeast qtbase.version "6") qtwayland; - sourceRoot = "source/Kvantum"; + sourceRoot = "${src.name}/Kvantum"; patches = [ (fetchpatch { diff --git a/pkgs/development/libraries/rocfft/default.nix b/pkgs/development/libraries/rocfft/default.nix index 325de9151b4b1..d1136d4be8e6c 100644 --- a/pkgs/development/libraries/rocfft/default.nix +++ b/pkgs/development/libraries/rocfft/default.nix @@ -131,7 +131,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "${finalAttrs.pname}-test"; inherit (finalAttrs) version src; - sourceRoot = "source/clients/tests"; + sourceRoot = "${finalAttrs.src.name}/clients/tests"; nativeBuildInputs = [ cmake @@ -164,7 +164,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "${finalAttrs.pname}-benchmark"; inherit (finalAttrs) version src; - sourceRoot = "source/clients/rider"; + sourceRoot = "${finalAttrs.src.name}/clients/rider"; nativeBuildInputs = [ cmake @@ -197,7 +197,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "${finalAttrs.pname}-samples"; inherit (finalAttrs) version src; - sourceRoot = "source/clients/samples"; + sourceRoot = "${finalAttrs.src.name}/clients/samples"; nativeBuildInputs = [ cmake diff --git a/pkgs/development/php-packages/snuffleupagus/default.nix b/pkgs/development/php-packages/snuffleupagus/default.nix index 264df9fddb297..fd0f56924fd07 100644 --- a/pkgs/development/php-packages/snuffleupagus/default.nix +++ b/pkgs/development/php-packages/snuffleupagus/default.nix @@ -31,7 +31,7 @@ buildPecl rec { session ]; - sourceRoot = "source/src"; + sourceRoot = "${src.name}/src"; configureFlags = [ "--enable-snuffleupagus" 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 ]; diff --git a/pkgs/development/tools/analysis/spin/default.nix b/pkgs/development/tools/analysis/spin/default.nix index 6cf84434cdeca..6c0f359fff5d6 100644 --- a/pkgs/development/tools/analysis/spin/default.nix +++ b/pkgs/development/tools/analysis/spin/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; buildInputs = [ bison ]; - sourceRoot = "source/Src"; + sourceRoot = "${src.name}/Src"; preBuild = '' mkdir -p $out/bin diff --git a/pkgs/development/tools/devpi-server/default.nix b/pkgs/development/tools/devpi-server/default.nix index d9de1b09c2142..f3de637823148 100644 --- a/pkgs/development/tools/devpi-server/default.nix +++ b/pkgs/development/tools/devpi-server/default.nix @@ -36,7 +36,7 @@ buildPythonApplication rec { hash = "sha256-tevQ/Ocusz2PythGnedP6r4xARgetVosAc8uTD49H3M="; }; - sourceRoot = "source/server"; + sourceRoot = "${src.name}/server"; postPatch = '' substituteInPlace tox.ini \ diff --git a/pkgs/development/tools/elkhound/default.nix b/pkgs/development/tools/elkhound/default.nix index 5c29b10a6139a..19bb3b7005a53 100644 --- a/pkgs/development/tools/elkhound/default.nix +++ b/pkgs/development/tools/elkhound/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { patchShebangs scripts ''; - sourceRoot = "source/src"; + sourceRoot = "${src.name}/src"; nativeBuildInputs = [ bison cmake flex perl ]; diff --git a/pkgs/development/tools/kustomize/3.nix b/pkgs/development/tools/kustomize/3.nix index d9eb6ce298ec4..c7c3eb229e395 100644 --- a/pkgs/development/tools/kustomize/3.nix +++ b/pkgs/development/tools/kustomize/3.nix @@ -22,7 +22,7 @@ buildGoModule rec { doCheck = true; # avoid finding test and development commands - sourceRoot = "source/kustomize"; + sourceRoot = "${src.name}/kustomize"; vendorSha256 = "sha256-xLeetcmzvpILLLMhMx7oahWLxguFjG3qbYpeeWpFUlw="; diff --git a/pkgs/development/tools/literate-programming/noweb/default.nix b/pkgs/development/tools/literate-programming/noweb/default.nix index 4add6e5bae3a8..6b4452a391892 100644 --- a/pkgs/development/tools/literate-programming/noweb/default.nix +++ b/pkgs/development/tools/literate-programming/noweb/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation (finalAttrs: rec { sha256 = "1160i2ghgzqvnb44kgwd6s3p4jnk9668rmc15jlcwl7pdf3xqm95"; }; - sourceRoot = "source/src"; + sourceRoot = "${src.name}/src"; patches = [ # Remove FAQ diff --git a/pkgs/development/tools/loganalyzer/default.nix b/pkgs/development/tools/loganalyzer/default.nix index d8368df1e44c6..d992b539dafd2 100644 --- a/pkgs/development/tools/loganalyzer/default.nix +++ b/pkgs/development/tools/loganalyzer/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { wrapQtAppsHook ]; - sourceRoot = "source/src"; + sourceRoot = "${src.name}/src"; buildPhase = '' runHook preBuild diff --git a/pkgs/development/tools/minizinc/ide.nix b/pkgs/development/tools/minizinc/ide.nix index f89f067d20385..bacd769271e4c 100644 --- a/pkgs/development/tools/minizinc/ide.nix +++ b/pkgs/development/tools/minizinc/ide.nix @@ -15,7 +15,7 @@ mkDerivation rec { nativeBuildInputs = [ qmake ]; buildInputs = [ qtbase qtwebengine qtwebkit ]; - sourceRoot = "source/MiniZincIDE"; + sourceRoot = "${src.name}/MiniZincIDE"; dontWrapQtApps = true; diff --git a/pkgs/development/tools/misc/grpc-tools/default.nix b/pkgs/development/tools/misc/grpc-tools/default.nix index 96bdce6d0ef65..8a44d484ddde3 100644 --- a/pkgs/development/tools/misc/grpc-tools/default.nix +++ b/pkgs/development/tools/misc/grpc-tools/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; - sourceRoot = "source/packages/grpc-tools"; + sourceRoot = "${src.name}/packages/grpc-tools"; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/tools/misc/licenseclassifier/default.nix b/pkgs/development/tools/misc/licenseclassifier/default.nix index 11d8f8a390a23..05a858130b395 100644 --- a/pkgs/development/tools/misc/licenseclassifier/default.nix +++ b/pkgs/development/tools/misc/licenseclassifier/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { }; # The new and improved "License Classifier v2" is hidden in a subdirectory. - sourceRoot = "source/v2"; + sourceRoot = "${src.name}/v2"; vendorHash = "sha256-u0VR8DCmbZS0MF26Y4HfqtLaGyX2n2INdAidVNbnXPE="; diff --git a/pkgs/development/tools/misc/micronucleus/default.nix b/pkgs/development/tools/misc/micronucleus/default.nix index d3bca0b684c7b..560cfa0c0dce2 100644 --- a/pkgs/development/tools/misc/micronucleus/default.nix +++ b/pkgs/development/tools/misc/micronucleus/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { pname = "micronucleus"; version = "2.04"; - sourceRoot = "source/commandline"; + sourceRoot = "${src.name}/commandline"; src = fetchFromGitHub { owner = "micronucleus"; diff --git a/pkgs/development/tools/misc/unixbench/default.nix b/pkgs/development/tools/misc/unixbench/default.nix index 3d1b424ab0b8f..9f4546248e5ee 100644 --- a/pkgs/development/tools/misc/unixbench/default.nix +++ b/pkgs/development/tools/misc/unixbench/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { patchFlags = [ "-p2" ]; - sourceRoot = "source/UnixBench"; + sourceRoot = "${src.name}/UnixBench"; postPatch = '' substituteInPlace Makefile \ diff --git a/pkgs/development/tools/misc/xxdiff/default.nix b/pkgs/development/tools/misc/xxdiff/default.nix index abc4265a1ce7e..8f30a165df3c4 100644 --- a/pkgs/development/tools/misc/xxdiff/default.nix +++ b/pkgs/development/tools/misc/xxdiff/default.nix @@ -22,7 +22,7 @@ mkDerivation rec { # c++11 and above is needed for building with Qt 5.9+ env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; - sourceRoot = "source/src"; + sourceRoot = "${src.name}/src"; postPatch = '' substituteInPlace xxdiff.pro --replace ../bin ./bin diff --git a/pkgs/development/tools/oh-my-posh/default.nix b/pkgs/development/tools/oh-my-posh/default.nix index bf1787e23ae86..6c2a95ec26a7f 100644 --- a/pkgs/development/tools/oh-my-posh/default.nix +++ b/pkgs/development/tools/oh-my-posh/default.nix @@ -17,7 +17,7 @@ buildGoModule rec { vendorHash = "sha256-cATGMi/nL8dvlsR+cuvKH6Y9eR3UqcVjvZAj35Ydn2c="; - sourceRoot = "source/src"; + sourceRoot = "${src.name}/src"; nativeBuildInputs = [ installShellFiles diff --git a/pkgs/development/tools/parsing/antlr/4.nix b/pkgs/development/tools/parsing/antlr/4.nix index 94ca0fee523e8..512732d062794 100644 --- a/pkgs/development/tools/parsing/antlr/4.nix +++ b/pkgs/development/tools/parsing/antlr/4.nix @@ -81,7 +81,7 @@ let pname = "antlr-runtime-cpp"; inherit version; src = source; - sourceRoot = "source/runtime/Cpp"; + sourceRoot = "${source.name}/runtime/Cpp"; outputs = [ "out" "dev" "doc" ]; diff --git a/pkgs/development/tools/protoc-gen-dart/default.nix b/pkgs/development/tools/protoc-gen-dart/default.nix index 03e626ab78145..1df865b8292cd 100644 --- a/pkgs/development/tools/protoc-gen-dart/default.nix +++ b/pkgs/development/tools/protoc-gen-dart/default.nix @@ -13,7 +13,7 @@ buildDartApplication rec { rev = "protobuf-v${version}"; sha256 = "sha256-uBQ8s1NBSWm88mpLfZwobTe/BDDT6UymSra88oUuPIA="; }; - sourceRoot = "source/protoc_plugin"; + sourceRoot = "${src.name}/protoc_plugin"; pubspecLockFile = ./pubspec.lock; vendorHash = "sha256-jyhHZ1OUFo6ce3C5jEQPqmtRL4hr2nTfgVMR0k6AXtM="; diff --git a/pkgs/development/tools/protoc-gen-grpc-web/default.nix b/pkgs/development/tools/protoc-gen-grpc-web/default.nix index 15d2e9ec0caeb..28a83a07d8185 100644 --- a/pkgs/development/tools/protoc-gen-grpc-web/default.nix +++ b/pkgs/development/tools/protoc-gen-grpc-web/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "sha256-OetDAZ6zC8r7e82FILpQQnM+JHG9eludwhEuPaklrnw="; }; - sourceRoot = "source/javascript/net/grpc/web/generator"; + sourceRoot = "${finalAttrs.src.name}/javascript/net/grpc/web/generator"; enableParallelBuilding = true; strictDeps = true; diff --git a/pkgs/development/tools/rust/cargo-insta/default.nix b/pkgs/development/tools/rust/cargo-insta/default.nix index 0d8bfffdf9b6e..2fd9eaeb38525 100644 --- a/pkgs/development/tools/rust/cargo-insta/default.nix +++ b/pkgs/development/tools/rust/cargo-insta/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-hQaVUBw8X60DW1Ox4GzO+OCWMHmVYuCkjH5x/sMULiE="; }; - sourceRoot = "source/cargo-insta"; + sourceRoot = "${src.name}/cargo-insta"; cargoHash = "sha256-q6Ups4SDGjT5Zc9ujhRpRdh3uWq99lizgA7gpPVSl+A="; diff --git a/pkgs/development/tools/rust/cargo-raze/default.nix b/pkgs/development/tools/rust/cargo-raze/default.nix index 12d8ac1b5ad86..295ac413fe3e7 100644 --- a/pkgs/development/tools/rust/cargo-raze/default.nix +++ b/pkgs/development/tools/rust/cargo-raze/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { rev = "v${version}"; hash = "sha256-ip0WuBn1b7uN/pAhOl5tfmToK73ZSHK7rucdtufsbCQ="; }; - sourceRoot = "source/impl"; + sourceRoot = "${src.name}/impl"; cargoHash = "sha256-hNZgQwhm4UPqmANplZGxG0DYHa31tu06nmqYaCA7Vdg="; diff --git a/pkgs/development/tools/rust/cargo-tauri/default.nix b/pkgs/development/tools/rust/cargo-tauri/default.nix index fa3e03d415126..a8d959db555d9 100644 --- a/pkgs/development/tools/rust/cargo-tauri/default.nix +++ b/pkgs/development/tools/rust/cargo-tauri/default.nix @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { # Manually specify the sourceRoot since this crate depends on other crates in the workspace. Relevant info at # https://discourse.nixos.org/t/difficulty-using-buildrustpackage-with-a-src-containing-multiple-cargo-workspaces/10202 - sourceRoot = "source/tooling/cli"; + sourceRoot = "${src.name}/tooling/cli"; cargoHash = "sha256-ErUzhmPA2M1H4B4SrEt4FRWHcWLA1UzQqVA1gkrmdJQ="; diff --git a/pkgs/development/tools/rust/crate2nix/default.nix b/pkgs/development/tools/rust/crate2nix/default.nix index b3a12c5e10aa3..cba3b4b3dd7df 100644 --- a/pkgs/development/tools/rust/crate2nix/default.nix +++ b/pkgs/development/tools/rust/crate2nix/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-JaF9/H3m4Wrc5MtXcONkOAgKVkswLVw0yZe0dBr2e4Y="; }; - sourceRoot = "source/crate2nix"; + sourceRoot = "${src.name}/crate2nix"; cargoSha256 = "sha256-PD7R1vcb3FKd4hfpViKyvfCExJ5H1Xo2HPYden5zpxQ="; diff --git a/pkgs/development/tools/rust/tauri-mobile/default.nix b/pkgs/development/tools/rust/tauri-mobile/default.nix index 7870a440d1d5f..7bdf412ebe79e 100644 --- a/pkgs/development/tools/rust/tauri-mobile/default.nix +++ b/pkgs/development/tools/rust/tauri-mobile/default.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage { # Manually specify the sourceRoot since this crate depends on other crates in the workspace. Relevant info at # https://discourse.nixos.org/t/difficulty-using-buildrustpackage-with-a-src-containing-multiple-cargo-workspaces/10202 - # sourceRoot = "source/tooling/cli"; + # sourceRoot = "${src.name}/tooling/cli"; cargoHash = "sha256-MtLfcDJcLVhsIGD6pjpomuu9GYGqa7L8xnaQ++f+0H4="; diff --git a/pkgs/development/web/ihp-new/default.nix b/pkgs/development/web/ihp-new/default.nix index 10dd7950f96b4..614dd83df77f8 100644 --- a/pkgs/development/web/ihp-new/default.nix +++ b/pkgs/development/web/ihp-new/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; dontConfigure = true; - sourceRoot = "source/ProjectGenerator"; + sourceRoot = "${src.name}/ProjectGenerator"; nativeBuildInputs = [ makeWrapper ]; -- cgit 1.4.1