treewide: use src.name in sourceRoot

This commit is contained in:
Peder Bergebakken Sundt 2024-08-02 14:53:11 +02:00
parent 5eb429acb6
commit a0396ab411
21 changed files with 32 additions and 33 deletions

View File

@ -79,7 +79,7 @@ let
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ glib xorg.libX11 libdbusmenu ];
inherit src;
sourceRoot = "source/native/LinuxGlobalMenu";
sourceRoot = "${src.name}/native/LinuxGlobalMenu";
patches = [ ../patches/libdbm-headers.patch ];
postPatch = "cp ${libdbusmenu-jb}/lib/libdbusmenu-glib.a libdbusmenu-glib.a";
passthru.patched-libdbusmenu = libdbusmenu-jb;
@ -97,7 +97,7 @@ let
pname = "fsnotifier";
version = buildVer;
inherit src;
sourceRoot = "source/native/fsNotifier/linux";
sourceRoot = "${src.name}/native/fsNotifier/linux";
buildPhase = ''
runHook preBuild
$CC -O2 -Wall -Wextra -Wpedantic -D "VERSION=\"${buildVer}\"" -std=c11 main.c inotify.c util.c -o fsnotifier
@ -115,7 +115,7 @@ let
pname = "restarter";
version = buildVer;
inherit src;
sourceRoot = "source/native/restarter";
sourceRoot = "${src.name}/native/restarter";
cargoHash = restarterHash;
};
@ -138,7 +138,7 @@ let
pname = "jps-bootstrap";
version = buildVer;
inherit src;
sourceRoot = "source/platform/jps-bootstrap";
sourceRoot = "${src.name}/platform/jps-bootstrap";
nativeBuildInputs = [ ant makeWrapper jbr ];
patches = [ ../patches/kotlinc-path.patch ];
postPatch = "sed -i 's|KOTLIN_PATH_HERE|${kotlin}|' src/main/java/org/jetbrains/jpsBootstrap/KotlinCompiler.kt";

View File

@ -89,7 +89,7 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-ZQqi1RFb4Ey0A0UVCThuIxM7DoFfkLwaeRAc2z8u9so=";
};
sourceRoot = "source/cpp";
sourceRoot = "${finalAttrs.src.name}/cpp";
# versions are all taken from
# https://github.com/apache/arrow/blob/apache-arrow-${version}/cpp/thirdparty/versions.txt

View File

@ -13,7 +13,7 @@
stdenv.mkDerivation rec {
pname = "arrow-glib";
inherit (arrow-cpp) src version;
sourceRoot = "source/c_glib";
sourceRoot = "${arrow-cpp.src.name}/c_glib";
strictDeps = true;

View File

@ -13,7 +13,7 @@
adaptor ? "sql",
}:
rustPlatform.buildRustPackage {
rustPlatform.buildRustPackage rec {
pname = "crabfit-api";
version = "0-unstable-2023-08-02";
@ -24,7 +24,7 @@ rustPlatform.buildRustPackage {
hash = "sha256-jy8BrJSHukRenPbZHw4nPx3cSi7E2GSg//WOXDh90mY=";
};
sourceRoot = "source/api";
sourceRoot = "${src.name}/api";
patches = [
(fetchpatch {

View File

@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-jy8BrJSHukRenPbZHw4nPx3cSi7E2GSg//WOXDh90mY=";
};
sourceRoot = "source/frontend";
sourceRoot = "${finalAttrs.src.name}/frontend";
patches = [
./01-localfont.patch

View File

@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec {
'';
};
sourceRoot = "source/src-tauri";
sourceRoot = "${src.name}/src-tauri";
cargoLock = {
lockFile = ./Cargo.lock;
@ -86,4 +86,3 @@ rustPlatform.buildRustPackage rec {
maintainers = with lib.maintainers; [ tomasajt ];
};
}

View File

@ -15,7 +15,7 @@ buildGoModule rec {
hash = "sha256-ANo9OkdNVCjV5uEqr9lNNbStquNb/3oxuTfMqE2nUzo=";
};
sourceRoot = "source/cmd/jv";
sourceRoot = "${src.name}/cmd/jv";
passthru.updateScript = nix-update-script { };
vendorHash = "sha256-FuUkC7iwn/jO3fHjT9nGUXc2X1QuuxPc8DAzVpzhANk=";

View File

@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-nk5oJRTBRj0LE2URJqno8AoZ+/342C2tEt8d6k2MAc8=";
};
sourceRoot = "source/kclvm";
sourceRoot = "${src.name}/kclvm";
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {

View File

@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-nk5oJRTBRj0LE2URJqno8AoZ+/342C2tEt8d6k2MAc8=";
};
sourceRoot = "source/cli";
sourceRoot = "${src.name}/cli";
cargoHash = "sha256-LZUE2J/UYepl5BGf4T4eWKIZfN3mVJtMDLtm0uUmvI8=";
cargoPatches = [ ./cargo_lock.patch ];

View File

@ -174,7 +174,7 @@ let
espeak-ng' = espeak-ng.overrideAttrs (self: {
name = "espeak-ng'";
inherit (go-piper) src;
sourceRoot = "source/espeak";
sourceRoot = "${go-piper.src.name}/espeak";
patches = [ ];
nativeBuildInputs = [ cmake ];
cmakeFlags = (self.cmakeFlags or [ ]) ++ [
@ -194,7 +194,7 @@ let
piper-phonemize = stdenv.mkDerivation {
name = "piper-phonemize";
inherit (go-piper) src;
sourceRoot = "source/piper-phonemize";
sourceRoot = "${go-piper.src.name}/piper-phonemize";
buildInputs = [ espeak-ng' onnxruntime ];
nativeBuildInputs = [ cmake pkg-config ];
cmakeFlags = [
@ -207,7 +207,7 @@ let
piper-tts' = (piper-tts.override { inherit piper-phonemize; }).overrideAttrs (self: {
name = "piper-tts'";
inherit (go-piper) src;
sourceRoot = "source/piper";
sourceRoot = "${go-piper.src.name}/piper";
installPhase = null;
postInstall = ''
cp CMakeFiles/piper.dir/src/cpp/piper.cpp.o $out/piper.o
@ -339,7 +339,7 @@ let
go-tiny-dream-ncnn = ncnn.overrideAttrs (self: {
name = "go-tiny-dream-ncnn";
inherit (go-tiny-dream) src;
sourceRoot = "source/ncnn";
sourceRoot = "${go-tiny-dream.src.name}/ncnn";
cmakeFlags = self.cmakeFlags ++ [
(lib.cmakeBool "NCNN_SHARED_LIB" false)
(lib.cmakeBool "NCNN_OPENMP" false)

View File

@ -1,5 +1,5 @@
{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage {
rustPlatform.buildRustPackage rec {
pname = "loco-cli";
version = "0.2.6";
@ -17,7 +17,7 @@ rustPlatform.buildRustPackage {
ln -s ${./Cargo.lock} Cargo.lock
'';
sourceRoot = "source/loco-cli";
sourceRoot = "${src.name}/loco-cli";
meta = with lib; {
mainProgram = "loco";

View File

@ -10,7 +10,7 @@ rustPlatform.buildRustPackage rec {
pname = "mycelium";
version = "0.5.3";
sourceRoot = "source/myceliumd";
sourceRoot = "${src.name}/myceliumd";
src = fetchFromGitHub {
owner = "threefoldtech";

View File

@ -22,7 +22,7 @@
pname = "nix-inspect-worker";
version = "0.1.2";
sourceRoot = "source/worker";
sourceRoot = "${src.name}/worker";
nativeBuildInputs = [meson ninja pkg-config];

View File

@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-k2+ddJIgGE41KGZODovU9VdurbWerEtdqNrFDwyuFjo=";
};
sourceRoot = "source/src";
sourceRoot = "${finalAttrs.src.name}/src";
patches = [
# https://github.com/ablab/spades/pull/1314

View File

@ -12,7 +12,7 @@ let
rev = "v${version}";
hash = "sha256-Z2J17YMzQNZqABIa5eyJDT7BWfXveymzs+DWsrklPIs=";
};
sourceRoot = "source/Box2D";
sourceRoot = "${src.name}/Box2D";
cmakeFlags = old.cmakeFlags or [ ] ++ [
(cmakeBool "BOX2D_INSTALL" true)
(cmakeBool "BOX2D_BUILD_SHARED" true)

View File

@ -11,7 +11,7 @@ buildPythonPackage {
pname = "capstone";
inherit (capstone_4) version src;
sourceRoot = "source/bindings/python";
sourceRoot = "${capstone_4.src.name}/bindings/python";
patches = [
# Drop distutils in python binding (PR 2271)
(fetchpatch {

View File

@ -45,7 +45,7 @@ buildPythonPackage rec {
cargoRoot = "rust";
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
sourceRoot = "source/rust";
sourceRoot = "${src.name}/rust";
name = "${pname}-${version}";
hash = "sha256-6fw0KgnPIMfdseWcunsGjvjVB+lJNoG3pLDqkORPJ0I=";
postPatch = ''

View File

@ -33,7 +33,7 @@ buildPythonPackage rec {
disabled = pythonOlder "3.7";
sourceRoot = "source/python";
sourceRoot = "${src.name}/python";
nativeBuildInputs = [
cmake

View File

@ -6,7 +6,7 @@
pytestCheckHook,
}:
buildPythonPackage {
buildPythonPackage rec {
pname = "yapsy";
version = "1.12.2-unstable-2023-03-29";
pyproject = true;
@ -18,7 +18,7 @@ buildPythonPackage {
hash = "sha256-QKZlUAhYMCCsT/jbEHb39ESZ2+2FZYnhJnc1PgsozBA=";
};
sourceRoot = "source/package";
sourceRoot = "${src.name}/package";
build-system = [ setuptools ];

View File

@ -5,7 +5,7 @@
kernel,
}:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "hid-t150";
#https://github.com/scarburato/t150_driver/blob/165d0601e11576186c9416c40144927549ef804d/install.sh#L3
version = "0.8a";
@ -19,7 +19,7 @@ stdenv.mkDerivation {
nativeBuildInputs = kernel.moduleBuildDependencies;
sourceRoot = "source/hid-t150";
sourceRoot = "${src.name}/hid-t150";
makeFlags = kernel.makeFlags ++ [
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"

View File

@ -97,7 +97,7 @@ let
pname = "title-wrap";
version = official_extensions_version;
src = official_extensions_src;
sourceRoot = "source/xExtension-TitleWrap";
sourceRoot = "${official_extensions_src.name}/xExtension-TitleWrap";
meta = {
description = "FreshRSS extension instead of truncating the title is wrapped.";
homepage = "https://github.com/FreshRSS/Extensions/tree/master/xExtension-TitleWrap";
@ -111,7 +111,7 @@ let
pname = "youtube";
version = official_extensions_version;
src = official_extensions_src;
sourceRoot = "source/xExtension-YouTube";
sourceRoot = "${official_extensions_src.name}/xExtension-YouTube";
meta = {
description = "FreshRSS extension allows you to directly watch YouTube/PeerTube videos from within subscribed channel feeds.";
homepage = "https://github.com/FreshRSS/Extensions/tree/master/xExtension-YouTube";