Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkgs/build-support/dotnet/add-nuget-deps/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
lib,
substituteAll,
nuget-to-nix,
nixfmt-rfc-style,
cacert,
fetchNupkg,
callPackage,
Expand Down Expand Up @@ -67,6 +68,7 @@ attrs
isExecutable = true;
inherit cacert;
nugetToNix = nuget-to-nix;
nixfmt = nixfmt-rfc-style;
Comment on lines 70 to 71

@MattSturgeon MattSturgeon Dec 3, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really relevant to this PR, but rather than substituting these in, would it make sense to instead set PATH using lib.makeBinPath [ nuget-to-nix nixfmt-rfc-style ]?

};

defaultDepsFile =
Expand Down
2 changes: 2 additions & 0 deletions pkgs/build-support/dotnet/add-nuget-deps/fetch-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ genericBuild
@nugetToNix@/bin/nuget-to-nix "${NUGET_PACKAGES%/}"
) > deps.nix

@nixfmt@/bin/nixfmt deps.nix

mv deps.nix "$1"
echo "Succesfully wrote lockfile to $1"
6 changes: 6 additions & 0 deletions pkgs/by-name/sc/scarab/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ buildDotnetModule rec {
--replace-fail 'net6.0' 'net8.0'
'';

preConfigureNuGet = ''
Comment thread
corngood marked this conversation as resolved.
# This should really be in the upstream nuget.config
dotnet nuget add source https://api.nuget.org/v3/index.json \
-n nuget.org --configfile NuGet.Config
'';

runtimeDeps = [
bc
];
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/dotnet/8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
releaseInfoFile = ./release-info.json;
bootstrapSdkFile = ./bootstrap-sdk.nix;
depsFile = ./deps.nix;
fallbackTargetPackages = dotnetCorePackages.sdk_8_0.targetPackages;
}
1 change: 1 addition & 0 deletions pkgs/development/compilers/dotnet/9/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
bootstrapSdkFile = ./bootstrap-sdk.nix;
allowPrerelease = true;
depsFile = ./deps.nix;
fallbackTargetPackages = dotnetCorePackages.sdk_9_0.targetPackages;
}
2 changes: 2 additions & 0 deletions pkgs/development/compilers/dotnet/dotnet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
bootstrapSdkFile,
allowPrerelease ? false,
depsFile,
fallbackTargetPackages,
pkgsBuildHost,
buildDotnetSdk,
}:
Expand All @@ -25,6 +26,7 @@ let
releaseManifestFile
tarballHash
depsFile
fallbackTargetPackages
;
bootstrapSdk = (buildDotnetSdk bootstrapSdkFile).sdk.unwrapped.overrideAttrs (old: {
passthru = old.passthru or { } // {
Expand Down
8 changes: 7 additions & 1 deletion pkgs/development/compilers/dotnet/stage0.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
nix,
cacert,
nuget-to-nix,
nixfmt-rfc-style,
dotnetCorePackages,
xmlstarlet,
patchNupkgs,
Expand All @@ -16,6 +17,7 @@
releaseManifestFile,
tarballHash,
depsFile,
fallbackTargetPackages,
bootstrapSdk,
}:

Expand Down Expand Up @@ -94,6 +96,7 @@ let
nix
cacert
nuget-to-nix
nixfmt-rfc-style
];
postPatch =
old.postPatch or ""
Expand Down Expand Up @@ -138,7 +141,10 @@ let
--arg list "[ ''${depsFiles[*]} ]" \
--argstr baseRid ${targetRid} \
--arg otherRids '${lib.generators.toPretty { multiline = false; } otherRids}' \
) > "${toString prebuiltPackages.sourceFile}"
) > deps.nix
nixfmt deps.nix

mv deps.nix "${toString prebuiltPackages.sourceFile}"
EOF
'';
};
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/dotnet/stage1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
tarballHash,
depsFile,
bootstrapSdk,
fallbackTargetPackages,
}@args:

let
Expand All @@ -33,8 +34,7 @@ let

in
mkPackages {
inherit vmr;
fallbackTargetPackages = bootstrapSdk.targetPackages;
inherit vmr fallbackTargetPackages;
}
// {
stage0 = lib.dontRecurseIntoAttrs stage0;
Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/tools/godot/3/mono/make-deps.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ godot3-mono, nuget-to-nix }:
{ godot3-mono, nuget-to-nix, nixfmt-rfc-style }:

godot3-mono.overrideAttrs (self: base: {
pname = "godot3-mono-make-deps";

nativeBuildInputs = base.nativeBuildInputs ++ [ nuget-to-nix ];
nativeBuildInputs = base.nativeBuildInputs ++ [ nuget-to-nix nixfmt-rfc-style ];

nugetDeps = null;
nugetSource = null;
Expand Down Expand Up @@ -50,6 +50,7 @@ godot3-mono.overrideAttrs (self: base: {
nugetRestore modules/mono/editor/GodotTools/GodotTools.sln

nuget-to-nix nugetPackages > "$outdir"/deps.nix
nixfmt "$outdir"/deps.nix
popd > /dev/null
'';

Expand Down