diff --git a/pkgs/build-support/dotnet/add-nuget-deps/default.nix b/pkgs/build-support/dotnet/add-nuget-deps/default.nix index bf3df815af8a..fb349679e579 100644 --- a/pkgs/build-support/dotnet/add-nuget-deps/default.nix +++ b/pkgs/build-support/dotnet/add-nuget-deps/default.nix @@ -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 = diff --git a/pkgs/build-support/dotnet/add-nuget-deps/fetch-deps.sh b/pkgs/build-support/dotnet/add-nuget-deps/fetch-deps.sh index af560b96fcd5..4ffba4783677 100644 --- a/pkgs/build-support/dotnet/add-nuget-deps/fetch-deps.sh +++ b/pkgs/build-support/dotnet/add-nuget-deps/fetch-deps.sh @@ -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" diff --git a/pkgs/development/compilers/dotnet/stage0.nix b/pkgs/development/compilers/dotnet/stage0.nix index e8be69d1f038..0a8a2b4a7b5c 100644 --- a/pkgs/development/compilers/dotnet/stage0.nix +++ b/pkgs/development/compilers/dotnet/stage0.nix @@ -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 ''; }; diff --git a/pkgs/development/tools/godot/3/mono/make-deps.nix b/pkgs/development/tools/godot/3/mono/make-deps.nix index 553b125dc635..b654576daced 100644 --- a/pkgs/development/tools/godot/3/mono/make-deps.nix +++ b/pkgs/development/tools/godot/3/mono/make-deps.nix @@ -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 '';