treewide: avoid running dotnet fetch-deps script twice (#388989)

This commit is contained in:
David McFarland
2025-03-12 09:36:16 -03:00
committed by GitHub
19 changed files with 23 additions and 86 deletions

View File

@@ -4,8 +4,9 @@
set -euo pipefail
export NIXPKGS_ALLOW_INSECURE=1 # uses EOL dotnet-sdk-7
package="$UPDATE_NIX_ATTR_PATH"
nix-update "$package"
nix-update "$package" --src-only
src=$(nix-build -A "$package".src --no-out-link)
npmDepsFile=$(nix-instantiate --eval -A "$package".npmDepsFile)
(

View File

@@ -4,7 +4,6 @@
fetchFromGitHub,
dotnetCorePackages,
testers,
_experimental-update-script-combinators,
nix-update-script,
}:
@@ -38,10 +37,7 @@ buildDotnetModule (finalAttrs: {
passthru = {
tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
updateScript = _experimental-update-script-combinators.sequence [
(nix-update-script { })
finalAttrs.passthru.fetch-deps
];
updateScript = nix-update-script { };
};
meta = with lib; {

View File

@@ -4,6 +4,7 @@
fetchFromGitHub,
dotnetCorePackages,
versionCheckHook,
nix-update-script,
}:
buildDotnetModule rec {
@@ -27,7 +28,7 @@ buildDotnetModule rec {
nativeInstallCheckInputs = [ versionCheckHook ];
passthru = {
updateScript = ./update.sh;
updateScript = nix-update-script { };
};
meta = {

View File

@@ -1,6 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash -p bash nix nix-update git cacert
set -euo pipefail
nix-update kryptor
$(nix-build . -A kryptor.fetch-deps --no-out-link)

View File

@@ -9,7 +9,7 @@
icoutils,
copyDesktopItems,
makeDesktopItem,
writeScript,
nix-update-script,
}:
buildDotnetModule rec {
pname = "lumafly";
@@ -34,16 +34,7 @@ buildDotnetModule rec {
selfContainedBuild = true;
passthru.updateScript = writeScript "update-lumafly" ''
#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash -p bash nix nix-update git cacert
set -eo pipefail
prev_version=$(nix eval --raw -f. lumafly.version)
nix-update lumafly
[[ $(nix eval --raw -f. lumafly.version) == "$prev_version" ]] ||
$(nix-build . -A lumafly.fetch-deps --no-out-link)
'';
passthru.updateScript = nix-update-script { };
runtimeDeps = [
zlib

View File

@@ -10,8 +10,7 @@
openssl,
libkrb5,
makeDesktopItem,
writeShellScript,
nix-update,
nix-update-script,
}:
buildDotnetModule (finalAttrs: rec {
pname = "msbuild-structured-log-viewer";
@@ -73,10 +72,7 @@ buildDotnetModule (finalAttrs: rec {
categories = [ "Development" ];
};
passthru.updateScript = writeShellScript "update-${finalAttrs.pname}" ''
${lib.getExe nix-update}
"$(nix-build -A "$UPDATE_NIX_ATTR_PATH.fetch-deps" --no-out-link)"
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Rich interactive log viewer for MSBuild logs";

View File

@@ -11,6 +11,7 @@
makeFontsConf,
runCommand,
xdg-utils,
nix-update-script,
pname ? "nexusmods-app",
}:
let
@@ -181,7 +182,7 @@ buildDotnetModule (finalAttrs: {
NexusMods.App list-tools
'';
};
updateScript = ./update.bash;
updateScript = nix-update-script { };
};
meta = {

View File

@@ -1,9 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p nix-update
#shellcheck shell=bash
set -o errexit -o nounset -o pipefail
package=nexusmods-app
nix-update "$package"
"$(nix-build --attr "$package".fetch-deps --no-out-link)"

View File

@@ -17,6 +17,7 @@
udev,
wrapGAppsHook3,
versionCheckHook,
nix-update-script,
}:
buildDotnetModule (finalAttrs: {
@@ -122,7 +123,7 @@ buildDotnetModule (finalAttrs: {
versionCheckProgram = "${placeholder "out"}/bin/otd-daemon";
passthru = {
updateScript = ./update.sh;
updateScript = nix-update-script { };
tests = {
otd-runs = nixosTests.opentabletdriver;
};

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash -p bash nix nix-update git cacert
set -euo pipefail
prev_version=$(nix eval --raw -f. opentabletdriver.version)
nix-update opentabletdriver
[[ $(nix eval --raw -f. opentabletdriver.version) == "$prev_version" ]] ||
"$(nix-build . -A opentabletdriver.fetch-deps --no-out-link)"

View File

@@ -5,6 +5,7 @@
zlib,
openssl,
dotnetCorePackages,
nix-update-script,
}:
buildDotnetModule rec {
@@ -37,7 +38,7 @@ buildDotnetModule rec {
openssl
];
passthru.updateScript = ./update.sh;
passthru.updateScript = nix-update-script { };
meta = {
description = "Handy utility to make decrypted PS3 disc dumps";

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash -p bash nix nix-update git cacert
set -eo pipefail
prev_version=$(nix eval --raw -f. ps3-disc-dumper.version)
nix-update ps3-disc-dumper
[[ $(nix eval --raw -f. ps3-disc-dumper.version) == "$prev_version" ]] ||
$(nix-build . -A ps3-disc-dumper.fetch-deps --no-out-link)

View File

@@ -5,6 +5,7 @@
ffmpeg-full,
dotnetCorePackages,
versionCheckHook,
nix-update-script,
}:
buildDotnetModule rec {
@@ -33,7 +34,7 @@ buildDotnetModule rec {
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru.updateScript = ./update.sh;
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/sandreas/tone";

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash -p bash nix nix-update git cacert
set -eo pipefail
prev_version=$(nix eval --raw -f. tone.version)
nix-update tone
[[ $(nix eval --raw -f. tone.version) == "$prev_version" ]] ||
"$(nix-build . -A tone.fetch-deps --no-out-link)"

View File

@@ -16,6 +16,7 @@
bash,
xorg,
xdg-utils,
nix-update-script,
}:
buildDotnetModule rec {
@@ -96,7 +97,7 @@ buildDotnetModule rec {
install -Dm644 v2rayN/v2rayN.Desktop/v2rayN.png $out/share/pixmaps/v2rayn.png
'';
passthru.updateScript = ./update.sh;
passthru.updateScript = nix-update-script { };
meta = {
description = "GUI client for Windows and Linux, support Xray core and sing-box-core and others";

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash nix nix-update
set -eou pipefail
nix-update v2rayn
$(nix-build -A v2rayn.fetch-deps)

View File

@@ -4,6 +4,7 @@
fetchFromGitHub,
lib,
versionCheckHook,
nix-update-script,
}:
buildDotnetModule rec {
@@ -38,7 +39,7 @@ buildDotnetModule rec {
];
versionCheckProgram = "${placeholder "out"}/bin/VrcAdvert";
passthru.updateScript = ./update.sh;
passthru.updateScript = nix-update-script { };
meta = {
description = "Advertise your OSC app through OSCQuery";

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash -p bash nix nix-update git cacert
set -eo pipefail
prev_version=$(nix eval --raw -f. vrcadvert.version)
nix-update vrcadvert
[[ $(nix eval --raw -f. vrcadvert.version) == "$prev_version" ]] ||
$(nix-build . -A vrcadvert.fetch-deps --no-out-link)

View File

@@ -9,7 +9,8 @@ attr=$UPDATE_NIX_ATTR_PATH
prev_version=$UPDATE_NIX_OLD_VERSION
nix-update "$attr" \
--version-regex "($versionPrefix\\b.*-stable)" \
--override-filename "$2"
--override-filename "$2" \
--src-only
[[ $(nix eval --raw -f. "$attr".version) != "$prev_version" ]] || exit 0
"$(nix build --impure --expr "((import ./. {}).$attr.override { withMono = true; }).fetch-deps" --print-out-paths --no-link)"