treewide: fix sourceRoot for fetchgit-based src

According to Nixpkgs manual[1] and NixOS 23.11 Release Note[2], the
`sourceRoot` attribute passed to `stdenv.mkDerivation` should be
specified as `"${src.name}"` or `"${src.name}/subdir"` when `src` is
produced using `fetchgit`-based fetchers.

`sourceRoot = "source"` or `sourceRoot = "source/subdir"` is based on
the assumption that the `name` attribute of these pre-unpacked fetchers
are always `"source"`, which is not the case. Expecting constant `name`
also makes the source FODs prone to irrelevent hashes during version
bumps.

[1]: https://nixos.org/manual/nixpkgs/unstable/#var-stdenv-sourceRoot
[2]: https://nixos.org/manual/nixos/stable/release-notes#sec-release-23.11
This commit is contained in:
Yueh-Shun Li 2024-03-09 01:04:40 +08:00
parent 89d56ddd5b
commit 91b3db1309
44 changed files with 64 additions and 61 deletions

View File

@ -996,7 +996,7 @@
spectre_oxi = rustPlatform.buildRustPackage { spectre_oxi = rustPlatform.buildRustPackage {
pname = "spectre_oxi"; pname = "spectre_oxi";
inherit (old) version src; inherit (old) version src;
sourceRoot = "source/spectre_oxi"; sourceRoot = "${old.src.name}/spectre_oxi";
cargoHash = "sha256-gCGuD5kipgfR0Le8npNmyBxNsUq0PavXvKkxkiPx13E="; cargoHash = "sha256-gCGuD5kipgfR0Le8npNmyBxNsUq0PavXvKkxkiPx13E=";

View File

@ -14,7 +14,7 @@ let
qtnproperty = mkDerivation { qtnproperty = mkDerivation {
name = "qtnproperty"; name = "qtnproperty";
inherit src; inherit src;
sourceRoot = "AwesomeBump/Sources/utils/QtnProperty"; sourceRoot = "${src.name}/Sources/utils/QtnProperty";
patches = [ ./qtnproperty-parallel-building.patch ]; patches = [ ./qtnproperty-parallel-building.patch ];
buildInputs = [ qtscript qtbase qtdeclarative ]; buildInputs = [ qtscript qtbase qtdeclarative ];
nativeBuildInputs = [ qmake flex bison ]; nativeBuildInputs = [ qmake flex bison ];

View File

@ -64,7 +64,7 @@ in
pname = "${pname}-pnpm-deps"; pname = "${pname}-pnpm-deps";
inherit src version; inherit src version;
sourceRoot = "source/gephgui-wry/gephgui"; sourceRoot = "${src.name}/gephgui-wry/gephgui";
nativeBuildInputs = [ nativeBuildInputs = [
jq jq
@ -95,7 +95,7 @@ in
pname = "gephgui-wry"; pname = "gephgui-wry";
inherit version src; inherit version src;
sourceRoot = "source/gephgui-wry"; sourceRoot = "${src.name}/gephgui-wry";
cargoLock = { cargoLock = {
lockFile = ./Cargo.lock; lockFile = ./Cargo.lock;

View File

@ -13,7 +13,7 @@ let
pname = "localsend"; pname = "localsend";
version = "1.14.0"; version = "1.14.0";
linux = flutter313.buildFlutterApplication { linux = flutter313.buildFlutterApplication rec {
inherit pname version; inherit pname version;
src = fetchFromGitHub { src = fetchFromGitHub {
@ -23,7 +23,7 @@ let
hash = "sha256-CO0uFcZnOfE31EZxRUpgtod3+1lyXPpbytHB45DEM98="; hash = "sha256-CO0uFcZnOfE31EZxRUpgtod3+1lyXPpbytHB45DEM98=";
}; };
sourceRoot = "source/app"; sourceRoot = "${src.name}/app";
pubspecLock = lib.importJSON ./pubspec.lock.json; pubspecLock = lib.importJSON ./pubspec.lock.json;
@ -59,7 +59,7 @@ let
passthru.updateScript = ./update.sh; passthru.updateScript = ./update.sh;
meta = meta // { meta = metaCommon // {
mainProgram = "localsend_app"; mainProgram = "localsend_app";
}; };
}; };
@ -81,13 +81,13 @@ let
cp -r *.app $out/Applications cp -r *.app $out/Applications
''; '';
meta = meta // { meta = metaCommon // {
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
platforms = [ "x86_64-darwin" "aarch64-darwin" ]; platforms = [ "x86_64-darwin" "aarch64-darwin" ];
}; };
}; };
meta = with lib; { metaCommon = with lib; {
description = "An open source cross-platform alternative to AirDrop"; description = "An open source cross-platform alternative to AirDrop";
homepage = "https://localsend.org/"; homepage = "https://localsend.org/";
license = licenses.mit; license = licenses.mit;

View File

@ -20,10 +20,10 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-yguUMEX0tn75wKrPKyqlCYbBFaEwC5b1s3k9xept1Fw="; hash = "sha256-yguUMEX0tn75wKrPKyqlCYbBFaEwC5b1s3k9xept1Fw=";
}; };
sourceRoot = sourceRoot = "${finalAttrs.src.name}/build/${
if stdenv.isDarwin if stdenv.hostPlatform.isDarwin then "mac"
then "source/build/mac/release" else "linux"
else "source/build/linux/release"; }/release";
buildInputs = [ buildInputs = [
boost' boost'

View File

@ -27,7 +27,7 @@ let
inherit src version; inherit src version;
pname = "openrefine-npm"; pname = "openrefine-npm";
sourceRoot = "source/main/webapp"; sourceRoot = "${src.name}/main/webapp";
npmDepsHash = "sha256-8GhcL4tohQ5u2HeYN6JyTMMobUOqAL8ETCLiP1SoDSk="; npmDepsHash = "sha256-8GhcL4tohQ5u2HeYN6JyTMMobUOqAL8ETCLiP1SoDSk=";

View File

@ -25,7 +25,7 @@ mkDerivation rec {
sha256 = "sha256-G4KlYAjOT1UV29vcX7Q8dMTj0BX0rsJcLtK2MQag5nU="; sha256 = "sha256-G4KlYAjOT1UV29vcX7Q8dMTj0BX0rsJcLtK2MQag5nU=";
}; };
sourceRoot = "source/src"; sourceRoot = "${src.name}/src";
qmakeFlags = [ "PREFIX=${placeholder "out"}" "CONFIG+=unixvlc" ]; qmakeFlags = [ "PREFIX=${placeholder "out"}" "CONFIG+=unixvlc" ];

View File

@ -17,7 +17,7 @@ buildGoModule rec {
ldflags = [ "-s" "-w" ]; ldflags = [ "-s" "-w" ];
sourceRoot = "source/c2FmZQ"; sourceRoot = "${src.name}/c2FmZQ";
vendorHash = "sha256-cTXSFwWGHV2QJM4mX/Z+ZxCXKwr+59lEPvJa/PTA1wU="; vendorHash = "sha256-cTXSFwWGHV2QJM4mX/Z+ZxCXKwr+59lEPvJa/PTA1wU=";

View File

@ -35,7 +35,7 @@ in buildGoModule rec {
hash = "sha256-tQ35GZuw7Ag1YfmOUarVY45yk4yugNLJetEV4m2w3GE="; hash = "sha256-tQ35GZuw7Ag1YfmOUarVY45yk4yugNLJetEV4m2w3GE=";
}; };
sourceRoot = "source/caddy"; sourceRoot = "${src.name}/caddy";
# frankenphp requires C code that would be removed with `go mod tidy` # frankenphp requires C code that would be removed with `go mod tidy`
# https://github.com/golang/go/issues/26366 # https://github.com/golang/go/issues/26366

View File

@ -27,7 +27,7 @@ flutter.buildFlutterApplication rec {
cargoDeps = rustPlatform.fetchCargoTarball { cargoDeps = rustPlatform.fetchCargoTarball {
name = "${pname}-${version}-cargo-deps"; name = "${pname}-${version}-cargo-deps";
inherit src; inherit src;
sourceRoot = "source/intiface-engine-flutter-bridge"; sourceRoot = "${src.name}/intiface-engine-flutter-bridge";
hash = "sha256-0sCHa3rMaLYaUG3E3fmsLi0dSdb9vGyv7qNR3JQkXuU="; hash = "sha256-0sCHa3rMaLYaUG3E3fmsLi0dSdb9vGyv7qNR3JQkXuU=";
}; };
cargoRoot = "intiface-engine-flutter-bridge"; cargoRoot = "intiface-engine-flutter-bridge";

View File

@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-Fb5TeRTdvUlo/5Yi2d+FC8a6KoRLk2h1VE0/peMhWPs="; hash = "sha256-Fb5TeRTdvUlo/5Yi2d+FC8a6KoRLk2h1VE0/peMhWPs=";
}; };
sourceRoot = "source/rust/tool"; sourceRoot = "${src.name}/rust/tool";
cargoHash = "sha256-g4WzqfH6DZVUuNb0jV3MFdm3h7zy2bQ6d3agrXesWgc="; cargoHash = "sha256-g4WzqfH6DZVUuNb0jV3MFdm3h7zy2bQ6d3agrXesWgc=";
env.TEST_SYSTEMD = systemd; env.TEST_SYSTEMD = systemd;

View File

@ -61,7 +61,7 @@ rustPlatform.buildRustPackage rec {
systemd systemd
]; ];
sourceRoot = "source/gui"; sourceRoot = "${src.name}/gui";
postInstall = '' postInstall = ''
install -Dm0644 ./ui/static/logos/liana-app-icon.svg $out/share/icons/hicolor/scalable/apps/liana.svg install -Dm0644 ./ui/static/logos/liana-app-icon.svg $out/share/icons/hicolor/scalable/apps/liana.svg

View File

@ -9,7 +9,7 @@ python3.pkgs.buildPythonApplication rec {
inherit (python3.pkgs.linien-common) src version; inherit (python3.pkgs.linien-common) src version;
sourceRoot = "source/linien-gui"; sourceRoot = "${src.name}/linien-gui";
nativeBuildInputs = with python3.pkgs; [ nativeBuildInputs = with python3.pkgs; [
setuptools setuptools

View File

@ -17,7 +17,7 @@ buildGoModule rec {
hash = "sha256-4Y+yZSZrBDLPbQXaOCSKk/EY20Ka8CS4ivUg1TEaqXo="; hash = "sha256-4Y+yZSZrBDLPbQXaOCSKk/EY20Ka8CS4ivUg1TEaqXo=";
}; };
sourceRoot = "source/caddy"; sourceRoot = "${src.name}/caddy";
vendorHash = "sha256-N0RmvhBlTiWmBb4TzLmaThD9jVkKgcIO9vPWxJAvLRQ="; vendorHash = "sha256-N0RmvhBlTiWmBb4TzLmaThD9jVkKgcIO9vPWxJAvLRQ=";

View File

@ -15,7 +15,7 @@ python3Packages.buildPythonApplication rec {
version = "2.7.0"; version = "2.7.0";
format = "other"; format = "other";
sourceRoot = "source/source"; sourceRoot = "${src.name}/source";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "zehkira"; owner = "zehkira";
repo = "monophony"; repo = "monophony";

View File

@ -39,7 +39,7 @@
sharedLibraryExt = rustc.stdenv.hostPlatform.extensions.sharedLibrary; sharedLibraryExt = rustc.stdenv.hostPlatform.extensions.sharedLibrary;
in flutter316.buildFlutterApplication { in flutter316.buildFlutterApplication rec {
pname = "rustdesk"; pname = "rustdesk";
version = "1.2.3-unstable-2024-02-11"; version = "1.2.3-unstable-2024-02-11";
src = fetchFromGitHub { src = fetchFromGitHub {
@ -52,7 +52,7 @@ in flutter316.buildFlutterApplication {
strictDeps = true; strictDeps = true;
# Configure the Flutter/Dart build # Configure the Flutter/Dart build
sourceRoot = "source/flutter"; sourceRoot = "${src.name}/flutter";
# curl https://raw.githubusercontent.com/rustdesk/rustdesk/16db977fd81e14af62ec5ac7760a7661a5c24be8/flutter/pubspec.lock | yq # curl https://raw.githubusercontent.com/rustdesk/rustdesk/16db977fd81e14af62ec5ac7760a7661a5c24be8/flutter/pubspec.lock | yq
pubspecLock = lib.importJSON ./pubspec.lock.json; pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = { gitHashes = {

View File

@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
pname = "snippetexpanderx"; pname = "snippetexpanderx";
sourceRoot = "source/cmd/snippetexpanderx"; sourceRoot = "${src.name}/cmd/snippetexpanderx";
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config pkg-config

View File

@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-6758ej7bTvwZPWifl239rQMazM8uw+Y4+3EbjE8XsTg="; hash = "sha256-6758ej7bTvwZPWifl239rQMazM8uw+Y4+3EbjE8XsTg=";
}; };
sourceRoot = "source/server"; sourceRoot = "${src.name}/server";
cargoLock = { cargoLock = {
lockFile = ./Cargo.lock; lockFile = ./Cargo.lock;

View File

@ -14,7 +14,7 @@ buildNpmPackage rec {
hash = "sha256-DPGigs6DifTRa7VQVHgizZ3BUy3FPX3YhZi++yoBFBA="; hash = "sha256-DPGigs6DifTRa7VQVHgizZ3BUy3FPX3YhZi++yoBFBA=";
}; };
sourceRoot = "source/tools/syn2mas"; sourceRoot = "${src.name}/tools/syn2mas";
npmDepsHash = "sha256-HvBFuRyP1APg5V+yhvlODAJ02MEkdpuLfNjWB/UT2vg="; npmDepsHash = "sha256-HvBFuRyP1APg5V+yhvlODAJ02MEkdpuLfNjWB/UT2vg=";

View File

@ -16,7 +16,7 @@ buildDotnetModule rec {
hash = "sha256-41zlzrQ+YGY2wEvq4Su/lp6lOmGW4u0F37ub2a3z+7o="; hash = "sha256-41zlzrQ+YGY2wEvq4Su/lp6lOmGW4u0F37ub2a3z+7o=";
}; };
sourceRoot = "source/src"; sourceRoot = "${src.name}/src";
projectFile = "TorrentStream.sln"; projectFile = "TorrentStream.sln";
nugetDeps = ./deps.nix; nugetDeps = ./deps.nix;

View File

@ -18,7 +18,7 @@ buildDartApplication.override { inherit dart; } rec {
dartOutputType = "jit-snapshot"; dartOutputType = "jit-snapshot";
src = flutterSrc; src = flutterSrc;
sourceRoot = "source/packages/flutter_tools"; sourceRoot = "${src.name}/packages/flutter_tools";
postUnpack = ''chmod -R u+w "$NIX_BUILD_TOP/source"''; postUnpack = ''chmod -R u+w "$NIX_BUILD_TOP/source"'';
inherit patches; inherit patches;

View File

@ -1,10 +1,10 @@
{ lib, mkCoqDerivation, coq, interval, compcert, flocq, bignums, version ? null }: { lib, mkCoqDerivation, coq, interval, compcert, flocq, bignums, version ? null }:
with lib; mkCoqDerivation { let self = with lib; mkCoqDerivation {
pname = "vcfloat"; pname = "vcfloat";
owner = "VeriNum"; owner = "VeriNum";
inherit version; inherit version;
sourceRoot = "source/vcfloat"; sourceRoot = "${self.src.name}/vcfloat";
postPatch = '' postPatch = ''
coq_makefile -o Makefile -f _CoqProject *.v coq_makefile -o Makefile -f _CoqProject *.v
''; '';
@ -21,4 +21,5 @@ with lib; mkCoqDerivation {
maintainers = with maintainers; [ quinn-dougherty ]; maintainers = with maintainers; [ quinn-dougherty ];
license = licenses.lgpl3Plus; license = licenses.lgpl3Plus;
}; };
} };
in self

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-aj/QmJ38ifsW36JFQcbp55aIQRvOpiqLHwEh/aFXsgo="; sha256 = "sha256-aj/QmJ38ifsW36JFQcbp55aIQRvOpiqLHwEh/aFXsgo=";
}; };
sourceRoot = "source/mpfi"; sourceRoot = "${src.name}/mpfi";
nativeBuildInputs = [ autoreconfHook texinfo ]; nativeBuildInputs = [ autoreconfHook texinfo ];
buildInputs = [ mpfr ]; buildInputs = [ mpfr ];

View File

@ -2,7 +2,7 @@
let let
version = "1.0.1"; version = "1.0.1";
in buildPecl { in buildPecl rec {
inherit version; inherit version;
pname = "opentelemetry"; pname = "opentelemetry";
@ -13,7 +13,7 @@ in buildPecl {
hash = "sha256-VHUzRhTtHygHoW+poItaphV+mxe4rmmSfGgesUgPz8Q="; hash = "sha256-VHUzRhTtHygHoW+poItaphV+mxe4rmmSfGgesUgPz8Q=";
}; };
sourceRoot = "source/ext"; sourceRoot = "${src.name}/ext";
doCheck = true; doCheck = true;

View File

@ -4,11 +4,11 @@
, flit-core , flit-core
}: }:
stdenv.mkDerivation { stdenv.mkDerivation rec {
pname = "${python.libPrefix}-bootstrap-${flit-core.pname}"; pname = "${python.libPrefix}-bootstrap-${flit-core.pname}";
inherit (flit-core) version src patches meta; inherit (flit-core) version src patches meta;
sourceRoot = "source/flit_core"; sourceRoot = "${src.name}/flit_core";
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild

View File

@ -13,11 +13,11 @@
, wheel , wheel
}: }:
buildPythonPackage { buildPythonPackage rec {
inherit (catboost) pname version src meta; inherit (catboost) pname version src meta;
format = "pyproject"; format = "pyproject";
sourceRoot = "source/catboost/python-package"; sourceRoot = "${src.name}/catboost/python-package";
nativeBuildInputs = [ nativeBuildInputs = [
setuptools setuptools

View File

@ -8,7 +8,7 @@
, wheel , wheel
, numpy , numpy
}: }:
buildPythonPackage { buildPythonPackage rec {
pname = "daqp"; pname = "daqp";
version = "0.5.1"; version = "0.5.1";
format = "pyproject"; format = "pyproject";
@ -20,7 +20,7 @@ buildPythonPackage {
hash = "sha256-in7Ci/wM7i0csJ4XVfo1lboWOyfuuU+8E+TzGmMV3x0="; hash = "sha256-in7Ci/wM7i0csJ4XVfo1lboWOyfuuU+8E+TzGmMV3x0=";
}; };
sourceRoot = "source/interfaces/daqp-python"; sourceRoot = "${src.name}/interfaces/daqp-python";
postPatch = '' postPatch = ''
sed -i 's|../../../daqp|../..|' setup.py sed -i 's|../../../daqp|../..|' setup.py

View File

@ -10,7 +10,7 @@ buildPythonPackage rec {
inherit (flit) src patches; inherit (flit) src patches;
sourceRoot = "source/flit_core"; sourceRoot = "${src.name}/flit_core";
# Tests are run in the "flit" package. # Tests are run in the "flit" package.
doCheck = false; doCheck = false;

View File

@ -22,7 +22,7 @@ let
pname = "kanidm"; pname = "kanidm";
version = "0.0.3-unstable-2023-08-23"; version = "0.0.3-unstable-2023-08-23";
in in
buildPythonPackage { buildPythonPackage rec {
inherit pname version; inherit pname version;
pyproject = true; pyproject = true;
@ -35,7 +35,7 @@ buildPythonPackage {
hash = "sha256-5qQb+Itguw2v1Wdvc2vp00zglfvNd3LFEDvaweRJcOc="; hash = "sha256-5qQb+Itguw2v1Wdvc2vp00zglfvNd3LFEDvaweRJcOc=";
}; };
sourceRoot = "source/pykanidm"; sourceRoot = "${src.name}/pykanidm";
nativeBuildInputs = [ nativeBuildInputs = [
poetry-core poetry-core

View File

@ -14,7 +14,7 @@ buildPythonPackage rec {
inherit (linien-common) src version; inherit (linien-common) src version;
sourceRoot = "source/linien-client"; sourceRoot = "${src.name}/linien-client";
preBuild = '' preBuild = ''
export HOME=$(mktemp -d) export HOME=$(mktemp -d)

View File

@ -22,7 +22,7 @@ buildPythonPackage rec {
hash = "sha256-ZgAp1SEiHijyjK74VZyRLYY3Hzfc3BQ6cnoO3hZzvbE="; hash = "sha256-ZgAp1SEiHijyjK74VZyRLYY3Hzfc3BQ6cnoO3hZzvbE=";
}; };
sourceRoot = "source/linien-common"; sourceRoot = "${src.name}/linien-common";
preBuild = '' preBuild = ''
export HOME=$(mktemp -d) export HOME=$(mktemp -d)

View File

@ -21,7 +21,7 @@ buildPythonPackage rec {
disabled = pythonOlder "3.8"; disabled = pythonOlder "3.8";
sourceRoot = "source/openllm-client"; sourceRoot = "${src.name}/openllm-client";
postPatch = '' postPatch = ''
substituteInPlace pyproject.toml \ substituteInPlace pyproject.toml \

View File

@ -36,7 +36,7 @@ buildPythonPackage rec {
hash = "sha256-kRR715Vnt9ZAmxuWvtH0z093crH0JFrEKPtbjO3QMRc="; hash = "sha256-kRR715Vnt9ZAmxuWvtH0z093crH0JFrEKPtbjO3QMRc=";
}; };
sourceRoot = "source/openllm-core"; sourceRoot = "${src.name}/openllm-core";
nativeBuildInputs = [ nativeBuildInputs = [
pythonRelaxDepsHook pythonRelaxDepsHook

View File

@ -51,7 +51,7 @@ buildPythonPackage rec {
disabled = pythonOlder "3.8"; disabled = pythonOlder "3.8";
sourceRoot = "source/openllm-python"; sourceRoot = "${src.name}/openllm-python";
nativeBuildInputs = [ nativeBuildInputs = [
pythonRelaxDepsHook pythonRelaxDepsHook

View File

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

View File

@ -32,7 +32,7 @@ buildPythonPackage rec {
hash = "sha256-liTg5Hm+FPpRQajBnnJKBh3JPGyu0Hflntf0isj1FiQ="; hash = "sha256-liTg5Hm+FPpRQajBnnJKBh3JPGyu0Hflntf0isj1FiQ=";
}; };
sourceRoot = "source/python"; sourceRoot = "${src.name}/python";
env.PROPHET_REPACKAGE_CMDSTAN = "false"; env.PROPHET_REPACKAGE_CMDSTAN = "false";

View File

@ -17,7 +17,7 @@ buildPythonPackage rec {
hash = "sha256-xJ/iPywOZA2kzHaVU43Bc8TUboj3OpDg1kLFMIc/T90="; hash = "sha256-xJ/iPywOZA2kzHaVU43Bc8TUboj3OpDg1kLFMIc/T90=";
}; };
sourceRoot = "source/python"; sourceRoot = "${src.name}/python";
# setup script tries to get data from the network but we use the nixpkgs' one # setup script tries to get data from the network but we use the nixpkgs' one
postPatch = '' postPatch = ''

View File

@ -34,9 +34,11 @@ in (chromium.override { upstream-info = info.chromium; }).mkDerivation (base: {
yarnLock = (fetchdep info.deps."src/electron") + "/yarn.lock"; yarnLock = (fetchdep info.deps."src/electron") + "/yarn.lock";
sha256 = info.electron_yarn_hash; sha256 = info.electron_yarn_hash;
}; };
npmDeps = fetchNpmDeps { npmDeps = fetchNpmDeps rec {
src = fetchdep info.deps."src"; src = fetchdep info.deps."src";
sourceRoot = "source/third_party/node"; # Assume that the fetcher always unpack the source,
# based on update.py
sourceRoot = "${src.name}/third_party/node";
hash = info.chromium_npm_hash; hash = info.chromium_npm_hash;
}; };

View File

@ -10,7 +10,7 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-0vbAHSN+uwxoXXZtbuycP67PxjcB8Ftxd/Oij1gqE3Y="; hash = "sha256-0vbAHSN+uwxoXXZtbuycP67PxjcB8Ftxd/Oij1gqE3Y=";
}; };
sourceRoot = "mingw-w64/mingw-w64-tools/gendef"; sourceRoot = "${finalAttrs.src.name}/mingw-w64-tools/gendef";
meta = { meta = {
description = "A tool which generate def files from DLLs"; description = "A tool which generate def files from DLLs";

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
inherit (opensnitch) src; inherit (opensnitch) src;
sourceRoot = "source/ebpf_prog"; sourceRoot = "${src.name}/ebpf_prog";
nativeBuildInputs = with llvmPackages; [ nativeBuildInputs = with llvmPackages; [
bc bc

View File

@ -15,7 +15,7 @@
}: }:
let let
src = tuxedo-rs.src; src = tuxedo-rs.src;
sourceRoot = "source/tailor_gui"; sourceRoot = "${src.name}/tailor_gui";
pname = "tailor_gui"; pname = "tailor_gui";
version = "0.2.3"; version = "0.2.3";
in in

View File

@ -27,7 +27,7 @@ let
inherit src version; inherit src version;
pname = "openobserve-ui"; pname = "openobserve-ui";
sourceRoot = "source/web"; sourceRoot = "${src.name}/web";
npmDepsHash = "sha256-RNUCR80ewFt9F/VHv7kXLa87h0fz0YBp+9gSOUhtrdU="; npmDepsHash = "sha256-RNUCR80ewFt9F/VHv7kXLa87h0fz0YBp+9gSOUhtrdU=";

View File

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
--replace "-march=native" "" --replace "-march=native" ""
''; '';
sourceRoot = "source/cpp"; sourceRoot = "${src.name}/cpp";
makeFlags = [ makeFlags = [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}" "CROSS_COMPILE=${stdenv.cc.targetPrefix}"

View File

@ -17,7 +17,7 @@ buildPythonApplication rec {
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-67CAR34VrMOzvNkukDeGRnUfoOLO66R37wsrRHjpp5E="; hash = "sha256-67CAR34VrMOzvNkukDeGRnUfoOLO66R37wsrRHjpp5E=";
}; };
sourceRoot = "source/tools/mpremote"; sourceRoot = "${src.name}/tools/mpremote";
format = "pyproject"; format = "pyproject";
nativeBuildInputs = [ nativeBuildInputs = [