dotnet: nixfmt output of nuget-to-nix

This commit is contained in:
David McFarland
2024-12-05 10:09:05 -04:00
parent 4c9ddcbc1a
commit 597474a8f1
4 changed files with 13 additions and 3 deletions
@@ -5,6 +5,7 @@
lib,
substituteAll,
nuget-to-nix,
nixfmt-rfc-style,
cacert,
fetchNupkg,
callPackage,
@@ -67,6 +68,7 @@ attrs
isExecutable = true;
inherit cacert;
nugetToNix = nuget-to-nix;
nixfmt = nixfmt-rfc-style;
};
defaultDepsFile =
@@ -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 -1
View File
@@ -7,6 +7,7 @@
nix,
cacert,
nuget-to-nix,
nixfmt-rfc-style,
dotnetCorePackages,
xmlstarlet,
patchNupkgs,
@@ -94,6 +95,7 @@ let
nix
cacert
nuget-to-nix
nixfmt-rfc-style
];
postPatch =
old.postPatch or ""
@@ -138,7 +140,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
'';
};
@@ -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;
@@ -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
'';