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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
patchShebangs ../vpp-api/ patchShebangs ../vpp-api/
''; '';
sourceRoot = "source/src"; sourceRoot = "${src.name}/src";
enableParallelBuilding = true; enableParallelBuilding = true;
env.NIX_CFLAGS_COMPILE = "-Wno-error -Wno-array-bounds -Wno-maybe-uninitialized"; 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. # We do not use or modify files outside of the xar subdirectory.
patchFlags = [ "-p2" ]; patchFlags = [ "-p2" ];
sourceRoot = "source/xar"; sourceRoot = "${finalAttrs.src.name}/xar";
outputs = [ outputs = [
"out" "out"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation {
pname = "rr-zen_workaround"; pname = "rr-zen_workaround";
inherit (rr) src version; inherit (rr) src version;
sourceRoot = "source/third-party/zen-pmu-workaround"; sourceRoot = "${rr.src.name}/third-party/zen-pmu-workaround";
hardeningDisable = [ "pic" ]; hardeningDisable = [ "pic" ];
nativeBuildInputs = kernel.moduleBuildDependencies; 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 # See https://github.com/baduhai/Koi/blob/master/development/Nix%20OS/dev.nix
sourceRoot = "source/src"; sourceRoot = "${src.name}/src";
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
wrapQtAppsHook wrapQtAppsHook

View File

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

View File

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

View File

@ -95,13 +95,13 @@ stdenv.mkDerivation rec {
postUnpack = postUnpack =
lib.concatStringsSep "\n" ( 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 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)" pushd "$(mktemp -d)"

View File

@ -104,7 +104,7 @@ stdenv.mkDerivation rec {
dontUseNinjaCheck = true; dontUseNinjaCheck = true;
postUnpack = lib.concatStringsSep "\n" ( 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 lib.filterAttrs (n: v: v ? outPath) passthru.deps
) )
); );