treewide: fix some more sourceRoots

This change is almost a noop.
This commit is contained in:
Jan Malakhovski 2025-03-20 11:50:00 +00:00
parent cc0e8af20b
commit 992f592353
20 changed files with 27 additions and 27 deletions

View File

@ -45,7 +45,7 @@ let
};
in
rustPlatform.buildRustPackage {
rustPlatform.buildRustPackage (finalAttrs: {
inherit pname version;
# Use `fetchFromGitHub` instead of `fetchCrate` because the latter does not
@ -59,7 +59,7 @@ rustPlatform.buildRustPackage {
# Upstream doesn't include the lockfile so we need to add it back
postUnpack = ''
cp ${cargoLock} source/Cargo.lock
cp ${cargoLock} ${finalAttrs.src.name}/Cargo.lock
'';
useFetchCargoVendor = true;
@ -103,4 +103,4 @@ rustPlatform.buildRustPackage {
# The profiler runtime is (currently) disabled on non-Linux platforms
broken = !(stdenv.hostPlatform.isLinux && !stdenv.targetPlatform.isRedox);
};
}
})

View File

@ -5,13 +5,13 @@
fetchFromGitHub,
}:
flutter.buildFlutterApplication {
flutter.buildFlutterApplication rec {
pname = "firmware-updater";
version = "0-unstable-2024-20-11";
pubspecLock = lib.importJSON ./pubspec.lock.json;
sourceRoot = "./source/apps/firmware_updater";
sourceRoot = "${src.name}/apps/firmware_updater";
gitHashes = {
fwupd = "sha256-l/+HrrJk1mE2Mrau+NmoQ7bu9qhHU6wX68+m++9Hjd4=";

View File

@ -37,7 +37,7 @@ buildGoModule rec {
hash = "sha256-Ir+/ZZJHm6E+044wczU3UvL+Py9Wprgw2QKJaYyDrKU=";
};
sourceRoot = "source/src/runtime";
sourceRoot = "${src.name}/src/runtime";
vendorHash = null;

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation (finalAttrs: {
fetchSubmodules = true;
};
sourceRoot = "source/src";
sourceRoot = "${finalAttrs.src.name}/src";
postPatch = ''
patchShebangs configure

View File

@ -50,7 +50,7 @@ in
stdenv.mkDerivation {
inherit pname version src;
sourceRoot = "source/src";
sourceRoot = "${src.name}/src";
postPatch = ''
substituteInPlace Makefile \

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ pkgsCross.avr.stdenv.cc ];
sourceRoot = "source/src";
sourceRoot = "${finalAttrs.src.name}/src";
makeFlags = [ "all" ];

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
hash = "sha256-ynFuCD+tp8E/DDdB/HU9BCmwKcmQy6NBx26MKnP4W0o=";
};
sourceRoot = "./source/${pname}";
sourceRoot = "${src.name}/${pname}";
buildInputs = [
meson

View File

@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
patchShebangs ../vpp-api/
'';
sourceRoot = "source/src";
sourceRoot = "${src.name}/src";
enableParallelBuilding = true;
env.NIX_CFLAGS_COMPILE = "-Wno-error -Wno-array-bounds -Wno-maybe-uninitialized";

View File

@ -56,7 +56,7 @@ stdenv.mkDerivation (finalAttrs: {
# We do not use or modify files outside of the xar subdirectory.
patchFlags = [ "-p2" ];
sourceRoot = "source/xar";
sourceRoot = "${finalAttrs.src.name}/xar";
outputs = [
"out"

View File

@ -14,7 +14,7 @@ mkCoqDerivation {
release."0.5".sha256 = "sha256-mSD/xSweeK9WMxWDdX/vzN96iXo74RkufjuNvtzsP9o=";
sourceRoot = "source/coq";
setSourceRoot = "sourceRoot=$(echo */coq)";
meta = {
description = "Coq interface to VPL abstract domain of convex polyhedra";

View File

@ -216,8 +216,8 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = true;
postUnpack = ''
patchShebangs source/doc/*.py
patchShebangs source/doc/input-filter-h.sh
patchShebangs ${finalAttrs.src.name}/doc/*.py
patchShebangs ${finalAttrs.src.name}/doc/input-filter-h.sh
'';
postInstall = ''

View File

@ -67,7 +67,7 @@ let
pname = "indi-3rdparty-${pname}";
inherit src version;
sourceRoot = "source/${pname}";
sourceRoot = "${src.name}/${pname}";
cmakeFlags =
[

View File

@ -20,7 +20,7 @@ buildPythonPackage rec {
hash = "sha256-IrzFjjMNuD5UgdccHxIxZoeZpM1PGtVQRTWHOocnmAU=";
};
sourceRoot = "source/packages/biliass";
sourceRoot = "${src.name}/packages/biliass";
cargoRoot = "rust";
cargoDeps = rustPlatform.fetchCargoVendor {

View File

@ -177,7 +177,7 @@ buildPythonPackage rec {
requiredSystemFeatures = [ "big-parallel" ];
sourceRoot = "source/py-polars";
sourceRoot = "${src.name}/py-polars";
postPatch = ''
for f in * ; do
[[ "$f" == "tests" ]] || \

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation {
pname = "rr-zen_workaround";
inherit (rr) src version;
sourceRoot = "source/third-party/zen-pmu-workaround";
sourceRoot = "${rr.src.name}/third-party/zen-pmu-workaround";
hardeningDisable = [ "pic" ];
nativeBuildInputs = kernel.moduleBuildDependencies;

View File

@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
};
# See https://github.com/baduhai/Koi/blob/master/development/Nix%20OS/dev.nix
sourceRoot = "source/src";
sourceRoot = "${src.name}/src";
nativeBuildInputs = [
cmake
wrapQtAppsHook

View File

@ -21,7 +21,7 @@ let
baseAttrs = finalAttrs: {
releaseName = "ICU";
sourceRoot = "source/icu/icu4c/source";
sourceRoot = "${finalAttrs.src.name}/icu/icu4c/source";
patches = [
# Skip MessageFormatTest test, which is known to crash sometimes and should be suppressed if it does.

View File

@ -6,7 +6,7 @@
stdenvNoCC,
}:
stdenvNoCC.mkDerivation {
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "locale";
version = "118";
@ -20,7 +20,7 @@ stdenvNoCC.mkDerivation {
hash = "sha256-KzaAlqXqfJW2s31qmA0D7qteaZY57Va2o86aZrwyR74=";
};
sourceRoot = "source/usr-share-locale.tproj";
sourceRoot = "${finalAttrs.src.name}/usr-share-locale.tproj";
postPatch = ''
# bmake expects `Makefile` not `BSDmakefile`.
@ -60,4 +60,4 @@ stdenvNoCC.mkDerivation {
];
maintainers = lib.teams.darwin.members;
};
}
})

View File

@ -95,13 +95,13 @@ stdenv.mkDerivation rec {
postUnpack =
lib.concatStringsSep "\n" (
lib.mapAttrsToList (name: dep: "ln -sT ${dep.outPath} source/${name}") (
lib.mapAttrsToList (name: dep: "ln -sT ${dep.outPath} ${src.name}/${name}") (
lib.filterAttrs (n: v: v ? outPath) passthru.deps
)
)
+ ''
curltar=$(realpath -s source/curl-*.tar.gz)
curltar=$(realpath -s ${src.name}/curl-*.tar.gz)
pushd "$(mktemp -d)"

View File

@ -104,7 +104,7 @@ stdenv.mkDerivation rec {
dontUseNinjaCheck = true;
postUnpack = lib.concatStringsSep "\n" (
lib.mapAttrsToList (name: dep: "ln -sT ${dep.outPath} source/${name}") (
lib.mapAttrsToList (name: dep: "ln -sT ${dep.outPath} ${src.name}/${name}") (
lib.filterAttrs (n: v: v ? outPath) passthru.deps
)
);